ZM Predicts
Binary event markets with an automated market maker and a double-entry ledger underneath
A platform where users trade YES/NO positions on real-world events. Prices come from an automated market maker rather than a matched order book, every balance movement is a double-entry ledger posting, and settlement pays out positions when an event resolves. Most of it is ordinary web work sitting on top of two things that aren't ordinary at all: pricing and money.

- Built for
- Opinionated Tech (Hytel)
- My role
- Full-stack feature development across the trading, wallet, settlement and admin surfaces, and the reconciliation engine behind them, in a remote engineering team.
- When
- 2025 to 2026
- Next.js
- React
- TypeScript
- PostgreSQL
- Prisma
- Zustand
- Tailwind
- LMSR
- tRPC
- Firebase Cloud Functions
- Firestore
- Turborepo
The longer version
Why an automated market maker
A prediction market with no liquidity isn't a market. It's a form. An order book needs traders on both sides before it can quote anything, and a platform launching new markets continuously never has that on day one.
A scoring-rule market maker always quotes, and its prices move as a function of the positions held rather than of who happens to be online. The cost is that the platform itself carries inventory risk, bounded by the liquidity parameter. That's a trade you make on purpose, in exchange for a market that works from the very first trade.
Why the ledger is double-entry
Because the alternative is a balance column, and a balance column can't tell you when it's wrong. In a system taking deposits, charging fees and paying out settlements, the property you want isn't that the arithmetic is correct. It's that incorrect arithmetic is detectable. Double-entry hands you an invariant to check instead of a number to trust.
Reconciliation: why exceptions rather than validation
The instinct with financial data is to validate on the way in and reject whatever doesn't balance. That instinct is wrong here, and understanding why is most of the design.
A finance office adopting a reconciliation tool already has inconsistent records. That's why they're adopting it. A system that refuses the inconsistent ones imports a clean subset and leaves the actual problem sitting outside the tool. So every check writes exceptions instead: typed, tracked, assignable and countable. The product is the worklist.
Reconciliation: the part that is genuinely hard
The five checks aren't independent, and they can contradict each other. A record can sit inside budget, tie out against revenue, and still fail the general-ledger match. Which of those an administrator should act on depends on context the system doesn't have. Most checks recompute on every write so the position stays current. The general-ledger tie-out is heavy enough that it runs on demand and after a journal import instead.
Deciding which checks are cheap enough to run continuously and which have to be explicit is the same shape of problem as splitting risk limits between an order path and a supervision loop, elsewhere in this portfolio. The cost of evaluating a rule determines where that rule is allowed to live.
A note on this write-up
This was built for an employer. The engineering described is my own work on it; the commercial detail, the numbers and the brand are theirs.
Screens and demos
What it looks like in use, not just what it was designed to do.

Home page and featured market 
Markets 
Market stats 
On a phone
What made it hard
The problems worth reading about. Everything else in this system was ordinary work.
- 01
Prices come from a logarithmic market scoring rule rather than from matching buyers against sellers. That single decision is what makes a thin market usable at all. A new market with two participants still has a quotable price, where an order book with two participants has a spread nobody will cross.
- 02
Every balance change is a double-entry posting rather than an increment on a user row. Deposits, trades, fees, settlement payouts and withdrawals all have to balance, which turns a discrepancy into a detectable condition instead of a number that quietly drifts.
- 03
Withdrawals above a threshold are gated on identity verification, and the fee is charged on profit rather than on volume. Both are policy decisions, and policy decisions have to be enforced in the ledger rather than described in the interface.
- 04
Markets are embeddable in partner media sites as a widget, with affiliate attribution carried through so commission can be traced back to the placement that produced the trade.
- 05
Five checks run over the same records and answer different questions: is a department inside its approved budget, do related revenue and expenses tie out, are the records clean, does our view agree with the institution's general ledger, and are approved expenses actually paid at the amount approved.
- 06
They produce tracked exceptions rather than blocking writes. A reconciliation engine that refuses data it can't reconcile is useless to a finance office, because the whole reason they need one is that the data is already inconsistent. The output is a worklist, not a validation error.
- 07
Money is tracked through a lifecycle of committed, then spent, then paid, instead of as a single amount. Those are three genuinely different states, and collapsing them is what produces a budget that looks fine right up until the invoices land.
- 08
An AI pass suggests object codes for records that look miscategorised, and never applies them. A suggestion a human accepts is a workflow. A silent recategorisation inside someone's books is a liability.
What it measures
Each figure says where it came from, so you can judge how much weight to give it. Some are measurements and some are chosen thresholds; the basis line tells you which.
- LMSR
- Pricing mechanism
- Double-entry
- Accounting model
- 3% on profit
- Fee basis
- 5
- Reconciliation checks
- 18
- Tracked exception types
- 0
- AI categorisations applied automatically
A logarithmic market scoring rule as the automated market maker, rather than a central limit order book.
A ledger module every balance movement posts through, including trades, fees, settlement and wallet operations.
Charged on realised profit rather than on traded volume.
Budget vs actual, revenue-to-expense tie-out, data quality, general-ledger match, and three-way invoice/expense/payment match.
Distinct exception types the five checks can raise, each separately triaged.
Structural. The AI pass annotates records with a suggested object code, and the suggestion requires human acceptance. Same reasoning as confining an assistant's write access elsewhere in this portfolio.