Provable Fairness

We can't cheat.
Here's the math.

Every online lottery says "provably fair." Most aren't. Here is exactly what that means for BASEPOT, what you can verify, and the parts where trust still applies.

What provably fair means

A lottery is provably fair if three things hold:

  1. The random number is not chosen by anyone. Not by the team, not by the winner, not by a miner, not by the RPC.
  2. The winner is picked by a rule anyone can replay. Given the random number and the holder list, the output is deterministic.
  3. The payout follows the same rule every time. Nobody can override the outcome after the fact.

BASEPOT gets all three onchain. Nothing in the process lives on a server we control.

1. Where the random number comes from

Every draw, the contract asks Chainlink VRF v2.5 for a random number. VRF is a cryptographic primitive, not an API. When Chainlink responds, the response comes with a proof that the number was generated from a pre-committed key pair with a published seed.

The contract verifies the proof onchain before accepting the number. If the proof fails, the number gets rejected and no winner gets picked. Nobody, including Chainlink itself, can submit a random number without the matching proof.

What this means in practice

Even if Chainlink was run by people who wanted a specific wallet to win, they could not bias the output without producing a fake cryptographic proof. That requires breaking elliptic curve signatures. Nobody has done this.

2. How the winner gets picked

The random number R is a 256-bit integer. The contract reduces it modulo the total entry weight:

winningPoint = R % totalWeight
totalWeight  = sum of every holder's balance + active burn-bonuses

Then it walks a Fenwick tree stored inside the token contract to find which holder's cumulative balance range contains winningPoint. The tree updates onchain on every transfer. No offchain snapshot, no merkle root, no keeper posting data.

Example (simplified): holders: Alice (200) | Bob (500) | Carol (300) cumulative: [0, 200) | [200, 700)| [700, 1000) totalWeight: 1000 R = 0xABC...FFE (from VRF) winningPoint = R % 1000 = 642 642 falls in [200, 700) → Bob wins.

Every transfer updates the tree in the same transaction as the transfer. A buy adds to your slot. A sell subtracts. A burn removes it entirely. The whole system is a live onchain snapshot.

3. How the payout runs

The payout is three lines in the VRF callback:

prize    = currentPot * 80 / 100
rollover = currentPot - prize
WETH.transfer(winner, prize)

The callback runs as part of the VRF fulfillment transaction. Winner gets paid before the transaction ends. No claim button. No holding period. No human in the loop.

What you can verify yourself

A.

Read the contract on BaseScan

Source is verified. You can read the exact bytecode that holds the pot and picks the winner. No proxies. No upgradability. What you see is running.

B.

Inspect the VRF request and response

Every draw emits a DrawTriggered event with a VRF request ID. The Chainlink coordinator emits a matching RandomWordsFulfilled event with the number. You can replay the winner selection offchain and confirm it matches.

C.

Rebuild the tree yourself

Index every Transfer event since deploy. Compute each holder's balance. Sort by their registration order in the contract. The cumulative weights you derive should match the live Fenwick state to the wei.

D.

Check the payout

Every WinnerPaid event on the contract has a matching ETH transfer in the same transaction. BaseScan will show both side by side.

Where trust still applies

Full transparency matters more than a clean narrative. Here's where trust still applies:

In the spirit of Megapot

Megapot showed what a serious onchain lottery looks like: transparent mechanics, verifiable randomness, real payouts, no operator trust beyond what is absolutely required. BASEPOT takes that playbook and applies it to a memecoin on Base. Same philosophy. Smaller scale. More frequent draws. Token-as-ticket instead of USDC tickets.

If you read the contract and understand the code, you have everything you need to trust the game.