Impermanent loss, deleted in the algebra
One Uniswap v4 hook, one Euler credit account, leverage pinned at the single point where LP value is a straight line in price. Not hedged, not averaged out: removed from the formula.
ETH/USD · chainlink
$2,412
LTV · target 50%
50.0%
chainlinkETH/USD answer updated, age 14s
A constant-product pool loses to every price move. Pin leverage at exactly two, and value becomes a straight line. The loss is not reduced. It is deleted.
the loss
Every pool pays for volatility.
price move
+100%
vanilla LP
-5.72%
YB
0.00%
Loss against simply holding, for any move r. The curve is 2√r/(1+r) − 1. The violet line is not a small number. It is the term deleted.
the algebra
Three lines, and the loss term is gone.
At target the AMM spot equals the oracle exactly, so every off-target quote pays arbitrage to restore the line. Parity-tested against Egorov's AMM.vy, compiled with real Vyper 0.4.3.
the mechanism
One balance sheet does everything.
Deposits, credit, swaps, and exits are four moves on the same Euler account.
WETH in. Shares on NAV.
The hook supplies your WETH into Euler from its own account and mints yb shares on net asset value. A new depositor can never dilute the LPs already in.
deposit(rawCollateral, minShares, deadline)
wallet
yb hook
euler
The stable side is borrowed.
USDC is drawn against the same account and parked as inventory. Borrow and inventory move together, so share value never flinches on a rebalance.
rebalanceBorrow(rawAmount, id)
Trades hit the balance sheet.
USDC in repays debt and releases WETH. WETH in is supplied, and inventory or fresh credit pays out. The v4 pool itself holds nothing.
previewQuote(i, j, inAmount)
trader
yb hook
Leave with your slice.
Pro-rata collateral out, pro-rata debt repaid from your own inventory slice only. Every rounding in the system favors the LPs who stay.
withdraw(shares, minCollateralOut, maxRawStableCharge, deadline)
stayers · 75%
your slice · 25%
One primitive, four protocols
Every integration is load-bearing. Remove any one and the line stops being straight.
Via Uniswap v4
The hook is the venue: custom accounting, no pool reserves, every swap settles on the balance sheet.
swap routing
the v4 pool itself holds nothing
Via Euler
One credit account owns collateral, debt, and stable inventory. Same address, no adapters.
one account
collateral · eWETH
debt · eUSDC
inventory · USDC
Via Chainlink
Every quote, share mint, and LTV reading prices through ETH/USD, normalized to 10¹⁸. Stale answers revert.
price path
Via Reactive
Three loops keep L = 2 without bots or keepers, each callback gated by sender, RVM id, and a replay key.
three loops
Exactly what passes locally
Numbers from the local suite, with nothing claimed that has not run.
0
Foundry tests, 10 suites
0
randomized ops per invariant
0
Vyper parity examples, exact
0%
line coverage on the math
line coverage on the math
No live deployment until addresses and tx hashes land in docs/VERIFICATION.md. The app is an honest preview against simulated state until then.
the route
Pinned by a fork gate before any deployment is claimed.
See the balance sheet hold its line.
Open the app, or read the source and follow the math end to end.