Smart contracts
FairDrops uses three contracts:
| Contract | What it does |
|---|---|
| FairDrops | Holds prizes, records seed commitments, accepts verified results and pays winners. |
| FairDropsAccount | An EIP-7702 delegate that lets embedded wallets act without gas. |
| FairDropsBonds | Holds delivery bonds: money an item host locks beside a giveaway, paid to winners whose item never arrives. |
Addresses for each network are on deployments.
A giveaway's lifecycle
Who can do what
| Role | Held by | Can |
|---|---|---|
| Admin | A multisig Safe, changed only in two steps with a delay | Grant roles, set fees, claim window and verifier threshold |
| Verifier | Settlement signers | Sign results |
| Operator | The game runtime | Commit seeds, cancel giveaways past their deadline |
| Pauser | An on-call key | Pause new giveaways, top-ups, seed commits and finalizing |
| Relayer | Relayer keys | Send gas-free actions people signed, collect prizes, return refunds |
A pause never stops claims, cancels or withdrawals.
Limits written into the contract
| Limit | Value |
|---|---|
| Highest platform fee | 5% |
| Highest relay fee | 2% |
| Most winners in one giveaway | 100,000 |
| Earliest start after opening | 2 minutes |
| Latest start after opening | 180 days |
| Shortest and longest game | 10 minutes to 30 days |
| Shortest and longest claim window | 7 days to 365 days |
| Longest a signature is valid | 1 hour |
| Most a pause extends a deadline | 2 days |
Coming to these docs
Function reference generated from the contracts' NatSpec, gas-free actions in detail, and the version history.