Revolve Credit (REVC) is a decentralized utility token deployed on the Binance Smart Chain (BSC). It enables automated minting through USDT transactions, where users can specify the number of cycles for swapping. The smart contract facilitates minting, transferring, and holding of REVC tokens with metrics tracking and transparent auditing.
The REVC token offers a unique mechanism for minting tokens based on user-provided USDT. Users specify a number of swap cycles, and the smart contract divides the USDT across cycles, mints REVC accordingly, and transfers a portion to the holding wallet while leaving 1 REVC in each cycle wallet to increase the holder count.
- Automated Minting: REVC tokens are minted each time USDT is swapped based on user input.
- Cycle-based Swapping: The total USDT amount is divided across a specified number of cycles.
- Metrics Tracking: Tracks metrics like total supply, transfers, swap values, and total USD equivalent.
- Holding Wallet: Accumulates the majority of minted REVC tokens while leaving 1 REVC in each cycle wallet.
- Transparency: Includes an audit URL for transparency, gas fee management, and event logging for each completed cycle.
- Token: Revolve Credit (REVC)
- Blockchain: Binance Smart Chain (BSC)
- Decimal Precision: 18
- Minting Rate: 1 REVC per 1 USDT (adjustable based on total USDT divided by cycles)
- Cycle Logic: Allows users to specify a number of cycles for minting and distribution.
-
mintREVC: Mints REVC tokens in exchange for USDT.
- Parameters:
usdtAmount(amount of USDT to mint REVC) - Operation: Transfers USDT, mints REVC to main wallet, and updates metrics.
- Parameters:
-
executeSwapCycle: Distributes USDT and mints REVC across multiple cycles.
- Parameters:
totalUsdtAmount,cycleWallets[] - Operation: Divides USDT across
swapCycles, mints REVC, and transfers most to holding wallet.
- Parameters:
-
setSwapCycles: Sets the number of cycles for swapping (only owner).
-
setHoldingWallet: Sets the holding wallet address where REVC tokens accumulate (only owner).
-
withdrawUSDT: Allows the owner to withdraw accumulated USDT from the contract.
-
getOverallValue: Returns the overall USD equivalent of the swapped USDT.
- getBNBBalance: Returns the contract’s current BNB balance.
- setAuditUrl: Sets or updates the audit URL for transparency.
- Specify Swap Cycles: Use
setSwapCyclesto define the number of cycles (e.g., 5). - Provide USDT: When a user wants to mint REVC, they can specify the USDT amount and desired cycles.
- Execute Cycles: The contract divides the USDT among cycles, mints REVC, transfers to the holding wallet, and retains 1 REVC in each cycle wallet.
Assume a user wants to mint with 100 USDT and set 5 cycles:
- Call
executeSwapCycle(100 * 10**18, cycleWallets), wherecycleWalletsis an array of 5 predefined wallet addresses. - Each cycle wallet will receive 20 USDT, mint 20 REVC, and send 19 REVC to the holding wallet.
- Node.js and npm
- Hardhat for contract deployment
- Binance Smart Chain (BSC) wallet address
-
Clone the Repository:
git clone https://github.com/your-username/revolve-credit cd revolve-credit -
Install Dependencies:
npm install
-
Configure Environment:
- Create a
.envfile with your BSC RPC URL and wallet private key.
BSC_RPC_URL="https://bsc-dataseed.binance.org/" PRIVATE_KEY="your-private-key" - Create a
-
Deploy the Contract:
npx hardhat run scripts/deploy.js --network bsc
-
Verify on BSCScan (Optional):
npx hardhat verify --network bsc <contract-address> <constructor-arguments>
- Fork the project.
- Create a feature branch (
git checkout -b feature-branch). - Commit changes (
git commit -am 'Add new feature'). - Push to branch (
git push origin feature-branch). - Open a Pull Request.
This project is licensed under the MIT License.