← Projects

zkPredict

An anonymous prediction market. Your bet stays yours — nobody can see what you backed, or that you backed anything.

  • Zero-Knowledge
  • Leo
  • Privacy
  • TypeScript

The problem

Prediction markets are one of the better mechanisms we have for aggregating what people actually believe — and they are almost all completely public. Your positions are visible, your wallet is traceable, and every bet you place is permanently attributable to you.

That has a cost beyond privacy. If your position can be watched, it can be traded against and copied; and people with genuinely informative views are the ones most likely to stay out.

What I built

A prediction market where betting is private end to end. You can create a market, mint outcome tokens, place a bet, and claim your winnings without revealing which side you took — rewards are claimed by proving entitlement rather than by presenting an identity.

Built as a Leo program on Aleo with a React front end that handles wallet connection, market creation, and the betting flow.

I built both the on-chain program and the interface.

How it works

Market state that must be public — the question, the deadline, the pools, whether it is open — is public. Everything identifying is not. A bet produces a private record held by the bettor rather than an entry in a public ledger.

Claiming a reward is the interesting part: instead of showing who you are and looking up what you are owed, you prove you hold a winning record and that it has not already been spent. The chain verifies the proof without learning which record it was.

Decisions and trade-offs

Privacy as the default, not a mode. An optional privacy feature is worse than none: the act of switching it on is itself a signal. Making every bet private means using the system reveals nothing.

Leo and Aleo over a general-purpose chain. Building this on a transparent chain means bolting on a mixer or a rollup and hoping the seams hold. A platform where private state is the native primitive makes the guarantee structural rather than an add-on.

A narrow feature set. Market creation, betting, closing, claiming, refunds. No order book, no secondary trading. The privacy guarantee is the product, and every extra surface is another place to leak.

What I'd do differently

I would design the resolution path first. Betting privately is the interesting cryptography, but a prediction market is only as trustworthy as its oracle, and we solved the elegant problem before the load-bearing one. Resolution deserved the first design conversation, not the last.

Built with

Leo · Aleo · Zero-knowledge proofs · React · TypeScript