Buy every outcome for less than one. Settlement pays exactly one.

An automated market maker for DreamDEX Event Contracts on Somnia. It rests a bid on both outcomes of a binary market, holds no inventory, and takes no view on the underlying.

LIVE FROM SOMNIA SHANNON, READ IN YOUR BROWSER, NO SERVER connecting
Up bid
selecting market…
Down bid
same book, mirrored, 1 minus the Up ask
Pair cost → redeems at 1.000

The arithmetic

An Up share and a Down share are worth exactly one, together, always.

A binary market resolves one way or the other. One outcome pays 1, the other pays 0, so holding both is worth exactly 1 at settlement, whatever happens in the world. Buy the pair for less than that and the difference is yours. No price move can take it, because you are not exposed to price.

Up bid 0.489 Down bid 0.483 ───── pair 0.972 redeems at 1.000 → 2.8pp, no directional risk

Two bids, never a sell

Selling an outcome you don't own reverts. There is no naked short. Buying both needs only collateral, and the venue mints the pair when two opposite-side buyers cross. So the maker never holds inventory.

An edge floor, not a chase

The order book includes your own resting order, so quoting one tick inside the best bid means outbidding yourself, a ratchet that walks the edge to zero. Quotes are capped so a pair never costs more than the floor allows.

Leg risk, handled out loud

If one bid fills and the other doesn't, you're briefly exposed. The loop completes the pair by crossing, but only while the total stays under 1. Above that it holds the position and says so.

The instrument

The gap is the number.

Up and Down stack toward a fixed 1.000 and the space left over is the edge. That gap is genuinely one to three points, so a true-scale column shows a sliver. Rather than inflate it, a vernier expands the last five points alongside, where the same quantity is legible. Coarse for honesty, fine for reading.

The Cleave instrument: unity line, vernier, live session trace, order books and activity log
Live testnet. Every figure comes from the chain. There is no demo mode and no seeded fixture.

Proof

Transactions this code produced.

Nothing on this page is a mock-up. These are real, on Somnia Shannon, and every one is clickable.

WhatTransaction
Complete set minted, 1 tUSDC → 1 Up + 1 Down0x63fa4e26
Merged back, exact, no leakage0x210c57e4
First maker order resting0x29f61034
Up leg filled0x6b1de65d
Down leg filled0x339a4102
Winnings redeemed, +20.000 tUSDC0xb785b4f0

Limits

What this isn't.

Stated plainly, because they're the first things worth asking.

Run it against the live venue in about two minutes.

npm install npm run newkey # fresh testnet key npm run fund # SDK mints its own collateral npm run serve --live # instrument on :5173