Enhanced Dex223 — ERC223 Token + Advanced Merkle-based Rewards Distributor
This project implements a comprehensive reward distribution system with the following components:
- Dex223Token: ERC223-compliant token with ERC20-style allowances, access control, and pausable functionality
- Dex223RewardsEnhanced: Advanced Merkle proof-based rewards distributor with anti-Sybil mechanisms
- ERC223 token standard implementation
- ERC20-style allowances for compatibility
- Access control with admin and minter roles
- Pausable functionality
- Minting and burning capabilities
- Merkle proof-based reward claims
- Anti-Sybil mechanisms:
- Minimum claim amounts
- Cooldown periods between claims
- Multi-token support with whitelisting
- Epoch-based reward distribution
- Referral system with configurable percentages
- Token recovery mechanism for wrong deposits
npm installnpm run compilenpm testnpm run deploy:localnpm run deploy:sepolianpm run deploy:mainnetDeploy both the token and rewards contracts using the deployment script.
// Configure a new epoch
rewards.configureEpoch(
epochId,
tokenAddress,
merkleRoot,
totalAllocated,
startTime,
endTime
);// Fund the epoch with tokens
rewards.fundEpoch(epochId, amount);// Users claim their rewards
rewards.claim(
epochId,
account,
amount,
merkleProof,
referrer
);- Access Control: Role-based permissions for admin and operator functions
- Pausable: Emergency stop functionality
- Reentrancy Protection: Prevents reentrancy attacks
- Anti-Sybil: Minimum amounts and cooldown periods
- Token Validation: Whitelist for supported reward tokens
- Recovery Mechanism: Safe recovery of wrongly sent tokens
GPL-3.0-or-later
Copyright (C) 2025 Dex223