This project implements a DeFi staking system on BNB Chain, featuring a DRIP token with inflationary minting, a staking contract for LP tokens, a treasury for tax and reward management, and a vault for secure token storage.
- DripToken: Mintable BEP20 token with customizable inflation, transfer taxes, and whitelisting.
- DRIP_BNBLPToken: BEP20 LP token for staking.
- DripStaking: Users stake LP tokens for rewards, with lock periods (1–52 weeks) and boost multipliers.
- Treasury: Receives taxes, burns 90%, sends 10% to treasury, and distributes 1% daily to staking rewards.
- Vault: Holds DRIP tokens, only whitelisted addresses can withdraw.
- Adjustable DRIP inflation rate.
- Staking with lock periods (up to 52 weeks) and reward boosts.
- Automated tax handling: 90% burn, 10% to treasury.
- Daily reward distribution from treasury to stakers.
- Full test suite for deployment, staking, claiming, and withdrawal.
npm installnpx hardhat compilenpx hardhat test- Set your private key in
hardhat.config.js:const PRIVATE_KEY = "your_private_key";
- Deploy contracts:
npx hardhat run scripts/deploy.js --network <network-name>
- Supported networks:
bsctest,bsc,bbfork, orhardhat(local).
- Supported networks:
Deployment outputs contract addresses to contracts.env.
- Uses Hardhat, OpenZeppelin, and hardhat-faucet.
- All contract addresses are saved in
contracts.envafter deployment.
- Contract deployment and initialization.
- Staking and lock period logic.
- Reward calculation and claiming.
- Tax and treasury payout logic.
- Vault withdrawal and access control.
- Inflation rate, payout rate, and cooldowns are owner-configurable.
- Treasury and vault addresses can be updated post-deployment.
For more details, see the contract files in the contracts/ directory and the test suite in test/test.js.