Inspiration
- Most NFT projects are doing unfair or super complicated allowlist distribution. Lots of professional speculative studios dominate the quote of allowlist. Ture holders have to buy the quote from those studios which encourage the middleman business. It does against what web3 builds.
- Current raffle tools like gleam, and premint are all centralized. We think the web3 raffle should leverage blockchain to make it more transparent.
- Present raffle rules are not strong enough to prevent Sybil's attack. Weight calculated from on-chain data per different scenarios should be widely applied.
What it does
- Scoring users with their on-chain PFP transactions. The user receives their PFP degenscore.
- Create an on-chain weighted raffle for allowlist distribution for NFT projects.
- Users can participate in the raffle with their PFP degenscore as weight.
How we built it
- Using Moralis API to retrieve on-chain NFT transactions.
- Calculate the user’s PFP degenscore off-chain.
- Setup a weighted random sampling contract for the allowlist raffle.
- Weighted random sampling is based on Algorithm A-Res which can also be called reservoir sampling. Every user needs to request his unique random word from chainlink VRF.
- Random words and weight will decide the user’s rank in the raffle. Final users in the reservoir will win the raffle.
Challenges we ran into
- Using on-chain data enabled degenscore as raffle weight to tackle Sybil's attack for the fair raffle.
- If there is a large scale of participants in the raffle, it will be a big challenge to choose m from n especially with weight in solidity because of the gas limit. Applying a reservoir sample algorithm and requesting random seeds for each single user help to resolve the problem. ## Accomplishments that we're proud of
- Find a degenscore-based solution for the fair on-chain raffle.
- Find an algorithm that can resolve large-scale on-chain raffle with solidity.
What's next for eggshill
Expand on-chain raffle applications to more scenarios than PFP allowlist distribution
Log in or sign up for Devpost to join the conversation.