ABT is a custom implementation of the ERC-20 token standard, built for educational and demonstrational purposes. It extends the standard ERC-20 functionality with additional features like transaction fees, staking, and rewards. While the deployed contract is designed for testing, this respository reflects a production-like implementation showcasing how such a token could operate in real-world scenarios.
- Deployed Address: 0xAE221f840F22E13ce60F837ac172FDa13c4C02D5
- Network: Sepolia Testnet
- ERC-20 Standad Compliance
- Implements OpenZeppelin's ERC-20 standard to ensure compatibility with wallets and exchanges.
- Custom Functionality
- Minting: Allows the owner to mint new tokens.
- Burning: Allows the owner to burn tokens from specific addressses.
- Transaction Fees: Deducts a configurable percentage of each transaction as a fee and send it to a designated recipient (e.g., a corporation or staking pool).
- Staking and Rewards
- Stake: Users can stake tokens to the contract, reflecting real-world holding incentive scenarios.
- Unstake: Users can withdraw staked tokens with additional rewards based on a reward rate.
- Ownership Control: Includes the OpenZeppelin Ownable module to restrict sensitive operations to the contract owner.
- Customization
- FeeRecipient and RewardRate: The feeRecipient address is a placeholder representing a corporation, bank or staking pool. The rewardRate can be configured for custom staking rewards.
- This GitHub version uses a placeholder address (0x123456789...) to represent the fee recipient. The ployed contract on Sepolia uses address(this) as the recipient for educational purposes
- A fee percentage (default: 3%) is deducted from every transfer and sent to the feeRecipient. The feeRecipient is set to address(this) in the deployed contract but is configurable for production use.
- Users can stake tokens to the contract.
- Upon unstaking, users receive their original tokens plus rewards calculated as a percentage of the staked amount.
- Rewards are minted to the user at the time of unstaking.
- The deployed contract demonstrates concepts like staking and fee deduction but is not production-ready. The GitHub version includes improvements for simulating real-world scenarios, such as external fee recipients.
- Reflects production-like logic where the feeRecipient and staking recipient are external addresses (e.g., a corporation or bank).
- Uses address(this) for both feeRecipient and staking recipient, making the contract itself act the recipient for demonstration purposes.
- Clone this repository
- Install dependencies (if applicable).
- Deploy the contract using Remix, Hardhat, or Truffle.
- Without redeploying:
- In Remix, select "Injected Provider - MetaMask" in the environment dropdown.
- Click "At Address" and paste the deployed contract address: 0xAE221f840F22E13ce60F837ac172FDa13c4C02D5.
- Access all functions like mint, burn, transfer, stake, and unstake.
- With MetaMask:
- Add ABT to MetaMask using the deployed address.
- Test functions like minting, transferring, and staking directly.
This project demonstrates the following:
- Extending the ERC-20 token standard.
- Implementing advanced token features like fees and staking.
- Configuring a contract for testing and production scenarios.
The deployed contract serves as a working example of these features in a controlled testnet environment.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please feel free to reach out via email: [email protected]