A lottery where
nobody loses.

Deposit USDC and keep it. Only the yield is played, so your principal is never at risk — and your balance, your odds and the winner stay encrypted on-chain.

How it works
The ticket space

Odds proportional to stake, with the stakes hidden.

The pool keeps one running cursor over a space of tickets. A deposit claims the next slice of it, so your odds are exactly your share — and because the cursor is a ciphertext, your slice never moves a number anybody can read.

0total tickets — publica depositoranotherreleasedanother stillevery boundary is encryptedthe drawn ticket — a ciphertext nobody can read
Withdrawing shrinks your range from the top. The tickets it releases stay inside the space but belong to nobody — so a draw can land on empty ground, and the prize rolls into the next round. That is the price of keeping stake sizes private, and it behaves like a rollover jackpot.
Confidentiality

What an observer actually sees.

On a transparent chain a prize-savings pool publishes every depositor's balance, every wallet's odds, and the winner of every draw. Here the same reads come back as ciphertext handles.

On a transparent chain
balanceOf(0xa1…)9,000.00 USDC
balanceOf(0xb2…)1,000.00 USDC
oddsOf(0xa1…)90.00%
winnerOf(round 7)0xa1…
On MegaPot
confidentialBalanceOf(0xa1…)0x43a7b143…a70500
confidentialBalanceOf(0xb2…)0x9c2f0ea8…a70500
rangesOf(0xa1…)0x1f77bd40…a70500
round.ticket0xfb5769b9…a70500

Every value on the right is an euint64 handle. Balances and ranges decrypt for their owner and nobody else. The winning ticket decrypts for nobody at all — not the keeper, not the deployer.

The loop

Only the yield is ever at stake.

Principal goes to work in a yield venue and stays yours. The surplus above it — and only the surplus — becomes the prize one depositor wins.

1Depositencrypted amount in
2Investprincipal to a vault
3Harvestsurplus only
4DrawFHE randomness
5Claimwinner decrypts
Your principalwithdrawable in full, at any point above
harvest() can only ever move what a venue earned above deployed principal, and it is permissionless. There is no code path that spends principal on a prize.
Two chains

The confidential ledger and the real jackpot.

Zama's FHE coprocessor does not exist on Base; Megapot exists nowhere else. So the encrypted ledger lives on Ethereum, the lottery position lives on Base, and Circle's CCTP joins them — with the destination fixed at burn time, so a keeper can delay the flow but never redirect it.

Ethereum
Zama Protocol · FHE
  • Encrypted per-user ledger
  • Encrypted ticket space
  • The draw and the winner
Base
Megapot · the real jackpot
  • Buys tickets as a contract
  • Claims winnings
  • Sends proceeds home
Nothing per-user crosses. Everything on Base is pool-aggregate — spend, tickets held, winnings — which MegaPot publishes in the clear anyway. Which depositor ends up with the money is decided on the Ethereum side, under encryption.

Try the whole cycle on Sepolia.

Deposit, watch a draw, decrypt what you won, withdraw in full. The test assets are free, and the principal comes back whatever happens.