Architecture
FairDrops is a web app, an API and a background worker in front of a set of smart contracts on several networks.
The parts
| Part | What it does |
|---|---|
| Web app | The site and the app players and hosts use. Sign-in, hosting, playing, results. |
| API | Accounts, giveaways, join checks, credits, game sessions over WebSocket, gas-free action quotes. |
| Worker | Runs the game runtime, indexes chain events, relays signed actions, commits seeds, drives settlement and sends notifications. |
| Contracts | Hold prizes, record seed commitments, accept verified results and pay winners. See smart contracts. |
| Subgraphs | Index contract events on each network so the worker can follow them. |
| Verifier nodes | Replay each finished game and sign the result only if they agree with it. |
Where trust sits
- Prizes are held by the contracts, not by FairDrops.
- Randomness is committed on-chain before play, so it can't be chosen afterwards.
- Results need verifier signatures the contract checks.
- Running the games is done by FairDrops. A player has to trust that the runtime recorded their actions; the transcript and the results page make what it recorded public.