Skip to main content

Donation Protocol

· 2 min read
Taurus
DePerp Labs

Donate

UI/UX LIVE Donate2 Link APP

Overview

The Donation contract is a smart contract that allows users to contribute ERC20 tokens to participate in a donation-based lottery. A portion of the contributions is allocated to a prize pool, a developer fee, and a charitable donation. Winners are selected based on a randomized draw using the Pyth Network's entropy service to ensure fairness.

Donation campaign

Donation campaign uses a smart-contract where participants contribute tokens, which act as lucky numbers, for a chance to win. Each participant receives a range of numbers proportional to the number of tokens contributed. At the end of the campaign, winners are randomly selected to share the prize pool.

How to Participate

Token Contribution Process: A participant sends tokens to the contract. The contributed tokens are distributed as follows:

  • 50% goes to the prize pool.
  • 10% goes to the devs fund
  • 40% goes to the donation address

Receiving Number Ranges: Each participant receives a range of numbers proportional to the tokens contributed. For example, if a participant contributes 2,000 tokens out of a total pool of 10,000 tokens, their number range will be from 1 to 2,000.

Winner Selection

Closing Token Contributions: After a certain period, token contributions are closed, and the winner selection process begins.

Requesting a Random Number: The contract requests a random number from the Pyth Network.

Determining the Winners: Random numbers (winning numbers) are generated from the total pool of tokens. These numbers are matched against the participants' number ranges to determine the winners.

Technical Overview Read Technical Guide