It all started, as so many crypto rabbit holes do, with Reddit. While scrolling through the reddit AMA with the Ethereum Foundation late one night, a comment from Justin Drake caught my eye:
"I see a world lottery being a low-hanging Ethereum application: fair with provable randomness, truly global in scale, and virtually rake-free. I could see a $1B weekly world lottery on Ethereum being a thing :)"
Intrigued, I replied, "im going to build this". It seemed straightforward enough. But I couldn’t help wondering: why isn’t there a major lottery on Ethereum yet? For a space built on speculation, it seemed almost ironic that a fair, decentralized lottery didn’t exist.
As expected, there’s been no shortage of attempts at blockchain lotteries. But doing it right? That’s anything but trivial. While creating a lottery on a blockchain sounds straightforward, achieving true, verifiable randomness is incredibly complicated, and every project so far has made compromises.
Nobody has been able to guarantee:
100% decentralized (no one in control)
100% randomness (not "trust us" random)
100% fair (no hidden fees or token tricks)
And without all three, what’s the point? Might as well stick with the old-school bouncing balls.
But now, we finally have a way!
Two recent breakthroughs have finally made a truly fair blockchain lottery possible:
Justin Drake’s own research explains it best, we can combine Ethereum's RANDAO (which got introduced post merge) with VDFs to create something special - truly unbiasable randomness.
Let me put Justin’s deep-dive into words the rest of us can understand.
The First Piece: RANDAO
RANDAO is sort of like a cosmic dice roll that happens with each new block. Here’s how it works:
Every validator contributes a tiny bit of randomness.
These bits get combined into one truly random number.
A new number is generated with each block.
Pretty random, right? There’s a catch (of course): validators could, in theory, not create a block because they don’t like the RANDAO value. Has anyone done this since the Merge? No. But would you feel comfortable if there was a billion-dollar jackpot at stake? Exactly. We needed one more piece to make this lottery truly rock-solid.
Enter VDFS: The Missing Piece
Here’s where VDFs (Verifiable Delay Functions) come in. VDFs are like an old-fashioned cooking timer—they take a set time to complete, no matter what. Why do we need this? It lets us lock in the lottery numbers without anyone (not even the validators) knowing what they are until it’s too late to change them. Here’s a simpler analogy:
Set the Seed - Take Ethereum’s RANDAO and put it in the VDF "oven."
Let it Bake - The VDF needs time to "cook." Like a slow roast, no shortcuts.
Get the Results - Out comes the winning number — final, unchangeable, and fair.
The beauty here is that while the lottery result is technically settled at Step 1, nobody knows the outcome until Step 3. This delay removes any advantage validators might have from "knowing" the RANDAO value, as it remains meaningless until you get to Step 3. Like everyone else, they’re in the dark until it’s "done baking.”
After more caffeine-fueled nights and VDF deep-dives than I’d care to admit (thanks youtube!), I can finally reply "Mission accomplished!" on that Reddit thread. Eat The Pie is here - trustless, verifiable, and ready for anyone feeling lucky! Say goodbye to bouncing balls and "trust us" promises. Here’s the scoop:
Runs on Ethereum L1: fully decentralized and immutable
Low 1% fee (capped at a maximum of 100 ETH, no matter the jackpot)
Tickets at 0.1 ETH (the lowest viable price considering gas fees)
Self executing (nobody, not even me, controls the lottery)
For the devs, there's a command-line app so you can interact with Eat The Pie straight from your terminal. 🤯
npm install -g eatthepie
eatthepie setup
eatthepie buy
For everyone else, it’s live at www.eatthepie.xyz. And for the decentralization maxis, you can also access it via IPFS at eatthepie.eth.limo.
And hey, I even grabbed the first ticket myself—went with 8, 8, 8, 8 🙏 . So if you’re curious or feeling lucky, come check it out.
May the odds be ever in your favor. ✌
<100 subscribers
Danny