Need for a counterparty
Someone has to take the short side. Funding rates attract hedgers who already hold the underlying, but bring complexity and a persistent cost to the trader.
We propose a mechanism for running a synthetic leveraged market in which the counterparty can never be owed more than it holds. Instead of a payout queue, a margin engine, or a funding rate, leverage is a function of the book. As traders take a larger share of the pool’s backing, their leverage falls, and the liquidity side’s leverage rises by exactly the same amount.
That gives leveraged markets a few emergent properties: no per-trader positions or liquidations, redemption at any time, no IOUs, a mark price that depends only on the oracle and the book, and a market that goes dormant instead of breaking when the underlying collapses.
Leveraged exposure without owning the underlying has existed onchain in several forms. Each answers the same question differently.
Despite that progress, several limitations persist.
Someone has to take the short side. Funding rates attract hedgers who already hold the underlying, but bring complexity and a persistent cost to the trader.
A pool that lets winners claim more than it holds is insolvent. Systems that allow this need a queue, an insurance fund, or socialized losses.
Per-trader margin, maintenance levels and liquidations need keepers. They fail in fast markets.
A mark advanced one oracle update at a time can be stepped past its own safety checks. If the gap between two updates is large, the step can overshoot.
Leverage is not stored. It is computed from the book whenever it is needed. Market creators specify a maximum leverage Lmax, an oracle and its freshness rules, a dormancy floor P_min, and swap, mint and redeem fees. They do not have to deal with funding rates, per-trader positions, margin calls or liquidations, a payout queue, or insurance funds and socialized losses.
The market has two sides. Traders hold a fungible token, the synth. Liquidity providers deposit quote-currency backing and receive shares. Tokens held by the pool itself are inventory and are not claims, so by construction T + LPE = Y.
Y = backing (quote currency held for the market)
X = trader tokens (synth held by traders, not by the pool)
P = mark price of one synth
T = X * P (trader claim)
LPE = Y - T (liquidity-provider equity)
s = T / Y (trader share of the book)The leverage of each side is a share of one fixed budget. At s = 0 the traders are tiny relative to backing and get the full Lmax. At parity each side has half. As s approaches 1, long leverage approaches 0.
L_long = Lmax * (1 - s)
L_short = Lmax * s
L_long + L_short = Lmax| s (trader share of backing) | Long leverage | Short (LP) leverage |
|---|---|---|
| 0.00 | 5.00 | 0.00 |
| 0.10 | 4.50 | 0.50 |
| 0.25 | 3.75 | 1.25 |
| 0.50 | 2.50 | 2.50 |
| 0.75 | 1.25 | 3.75 |
| 0.90 | 0.50 | 4.50 |
| 1.00 | 0.00 | 5.00 |
Between trades the book is fixed. Trader claim moves as dT = L_long × T × d ln S, where S is the oracle price. Integrating gives the closed form below. (S0, P0, X0, Y0) is an anchor, written only when the book changes (a buy, a sell, or a backing deposit or withdrawal) and optionally by a permissionless call. The mark is evaluated in log space, so there is no precision cliff and no floor value that cannot be left.
T / (Y - T) = (T0 / LPE0) * (S / S0)^Lmax
P(S) = P0 * Y * R / (LPE0 + T0 * R), R = (S / S0)^Lmax
with no traders: P(S) = P0 * RThe invariant is not a ratio to tune. It is structural. Traders can sell at any time and are paid X_sold × P from backing. No queue is needed because the claim is capped below backing by the leverage budget. A trader’s upside is bounded, and the cost of that bound is that long leverage falls when longs are crowded.
T < Y for every finite oracle priceIf the underlying collapses, the mark falls geometrically (about S^Lmax for a small book) but never reaches zero. The market stops accepting new buys when the mark falls below a floor. Sells and liquidity withdrawals are never gated. When the oracle recovers, the market wakes on its own. If liquidity providers left while traders stayed, the book is thinner and wakes at a lower mark than the start. With no change to the book it returns to the start mark exactly.
P_min = max(1, startMark / 1_000_000)Reaching P_min at 5× needs a drop of about 94% in the underlying. Reaching a 1 wei mark needs about 99.975%.
Y is tracked by the contract and not read from its token balance. A plain token transfer into the contract cannot be reverted, so it is treated as excess, not backing, and cannot move the mark or leverage. The owner can sweep the excess. X is read from the anchor, not from live balances, because balances move while a swap is in flight.
There are no token emissions and no funding rate. Liquidity providers earn swap, mint and redeem fees, and carry the opposite side of the trader’s exposure. Their expected return is positive if traders lose more than they win, net of fees. Solvency does not depend on that. Only LP returns do.
LPs deposit 10,000. A trader buys 5,000 of the synth at a mark of 200, receiving 25 tokens. The underlying doubles.
T / (Y - T) = (5,000 / 10,000) * 2^5 = 16
Y = 15,000 => T = 15,000 * 16 / 17 = 14,117.65
mark = 14,117.65 / 25 = 564.71
LP equity = 882.35
long leverage = 5 * (1 - 0.9412) = 0.29A linear step would have paid the trader the whole 15,000 backing and left no equity. The budget model caps the claim below backing, keeps LP equity positive, and lowers the trader’s leverage along the way. Buys, sells and withdrawals all stay open.
LPs and traders each hold half the backing (T0 = LPE0).
Underlying halves: T / (Y - T) = 0.5^5 = 0.03125 => T = 0.0303 Y
Underlying doubles: T / (Y - T) = 2^5 = 32 => T = 0.9697 YThe trader can lose almost all of their claim, but the pool never owes more than Y, and in the doubling case the trader’s claim approaches Y without reaching it.
A market has a mark of 1.0 and about 15% of backing held by traders, so leverage is about 4.23×. The oracle falls 36% between two updates with nobody updating the mark.
Linear step: 1 + 4.23 * (-0.36) = -0.52 (a negative price)
Closed form: mark = 0.0615A linear step projects a negative price. A floor then rounds it to 1 wei, and a $2 buy mints about 1.994 × 10^18 tokens. The closed form gives a mark of 0.0615, so the same $2 buy mints about 32 tokens.
We simulated the closed-form mark over 2,000 independent paths of 1,000 steps each. Each step the oracle moves by a normal return with a 3% standard deviation, plus a 1% chance of an additional jump with a 20% standard deviation. On about half of the steps a trade occurs: a buy of up to 5% of backing (55%), or a sell of up to half of the trader tokens. Backing starts at 100,000.
| Result | Value |
|---|---|
| Steps with a trader claim above backing | 0 |
| Highest trader claim / backing at any step | 0.996 |
| Paths that touched the dormancy floor | 25 of 2,000 |
| Median lowest mark across paths | 0.016 (start 1.0) |
| Steps where a linear update would give a price at or below zero | 4,051 (1,308 paths) |
| Steps where a linear update would put the claim above backing | 172 (75 paths) |
The linear-update rows are a counterfactual on the same book and the same oracle gap. This is a Python model of the closed form, not the contract. The contract is covered separately by unit, fuzz and invariant tests.
A strong motivation for this mechanism is to remove the cost of insolvency from the trader. A payout queue lets traders win more than the pool holds and delays payment until later losses refill it. That removes the need for seed capital. The cost is that a winner’s payout depends on other users losing, and that winners tend to win at the same time in a market that moves in one direction.
Dynamic leverage makes the opposite choice. It keeps the pool solvent by lowering the leverage of the side that is crowding the book, so winners are paid in full and at once. The cost is that liquidity providers must deposit backing before the market opens, and that a trader’s gain is bounded by the leverage budget.
We do not claim one is better for every market. A queue suits a market where seed capital is the binding constraint. Dynamic leverage suits a market where immediate redemption and a bounded counterparty are the product. Short-side liquidity is attracted by giving it short exposure to the market, with the added upside of earning fees from long orders.