Skip to main content

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​

PartWhat it does
Web appThe site and the app players and hosts use. Sign-in, hosting, playing, results.
APIAccounts, giveaways, join checks, credits, game sessions over WebSocket, gas-free action quotes.
WorkerRuns the game runtime, indexes chain events, relays signed actions, commits seeds, drives settlement and sends notifications.
ContractsHold prizes, record seed commitments, accept verified results and pay winners. See smart contracts.
SubgraphsIndex contract events on each network so the worker can follow them.
Verifier nodesReplay 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.