MetaBeyond is a decentralized smart contract designed to facilitate a prize distribution system based on random numbers generated by Chainlink VRF. The system distributes ERC20 tokens as airdrop rewards to users based on their participation in specified activities or games.
- Participant Registration: Users can register as participants in the prize distribution system by interacting with the smart contract.
- Activity Participation: Participants engage in specific activities (e.g., following, liking, or sharing) to earn points.
- Entry Generation: Upon completing an activity, participants receive entries into the prize distribution system. The number of entries earned may vary based on their level of participation.
- Prize Distribution: Once a predefined condition is met (e.g., a certain number of entries), the contract initiates a prize distribution event.
- Random Winner Selection: Chainlink VRF is integrated to generate random numbers for selecting winners from the participant pool. A configurable number of winners are randomly chosen.
- Airdrop Reward Calculation: Airdrop rewards are calculated based on the number of points accumulated by each winner. The rewards are transferred to the winners' addresses.
- Event Logging and Transparency: Events are emitted at each step of the prize distribution process to provide transparency and allow participants to verify the fairness of the distribution.
- Solidity Version: 0.8.9
- External Dependencies: OpenZeppelin ERC20 contracts, Chainlink VRF
- Custom Errors: Implemented custom errors for better error handling.
- Gas Efficiency: Utilized gas-efficient methods for ERC20 token calculations and distributions.
- Security Measures: Implemented proper error handling and security measures to prevent unauthorized access or manipulation of the distribution process.
- Participant Registration: Call the
register()
function to register as a participant. - Activity Participation: Engage in specific activities (e.g., following, liking, or sharing) to earn points.
- Prize Distribution: Once the entry point is reached, winners are selected randomly using Chainlink VRF. Airdrop rewards are then distributed to the winners automatically.
- Token Distribution: ERC20 tokens are distributed to winners' addresses efficiently and securely.
Clone the repository and deploy the smart contract on a supported Ethereum network. Make sure to provide the required parameters such as the VRF subscription ID and the address of the ERC20 token.
- Chainlink VRF: Integrated for random number generation.
- ERC20 Token: Integration with an ERC20 token for airdrop rewards.
- More enhancements of gas efficiency and security.
- Further integration of additional features for a more robust prize distribution system.
- Omemgboji Emmanuel - Smart Contract Developer