Skip to content

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.

Notifications You must be signed in to change notification settings

Signor1/airdrop-distribution

Repository files navigation

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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published