https://github.com/signor1/airdrop-distribution
Developed a smart contract that facilitates a decentralised 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 an activity.
https://github.com/signor1/airdrop-distribution
Last synced: over 1 year ago
JSON representation
Developed a smart contract that facilitates a decentralised 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 an activity.
- Host: GitHub
- URL: https://github.com/signor1/airdrop-distribution
- Owner: Signor1
- Created: 2024-02-29T15:53:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T17:22:19.000Z (over 2 years ago)
- Last Synced: 2025-01-06T04:12:21.628Z (over 1 year ago)
- Language: Solidity
- Homepage:
- Size: 163 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MetaBeyond Smart Contract
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.
## Features
- **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.
## Smart Contract Implementation
- **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.
## Usage
1. **Participant Registration**: Call the `register()` function to register as a participant.
2. **Activity Participation**: Engage in specific activities (e.g., following, liking, or sharing) to earn points.
3. **Prize Distribution**: Once the entry point is reached, winners are selected randomly using Chainlink VRF. Airdrop rewards are then distributed to the winners automatically.
4. **Token Distribution**: ERC20 tokens are distributed to winners' addresses efficiently and securely.
## Installation
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.
## Integrations
- **Chainlink VRF**: Integrated for random number generation.
- **ERC20 Token**: Integration with an ERC20 token for airdrop rewards.
## Future Improvements
- More enhancements of gas efficiency and security.
- Further integration of additional features for a more robust prize distribution system.
## Contributors
- [Omemgboji Emmanuel](mailto:emmanuelomemgboji@gmail.com) - Smart Contract Developer