afterAddLiquidity · the hook callback that runs at deposit time
One deposit, one transaction.
The hook scores every active bid, selects the best match, locks collateral, and settles the split. All in the same block.
bids[poolId] · the on-chain order book
Protocols post bids.
The best one fills each deposit.
Any protocol can post a bid with their coverage terms and USDC collateral. Multiple bids compete. Each deposit automatically matches the highest-scoring bid that has enough collateral to cover the position's maxIL. No keepers, no per-deposit approvals, no separate settlement step.
ilCoverageBps
Fraction of IL this bid commits to cover, in basis points. 10000 = 100%. Frozen into the position at fill time.
feeShareBpsLPD
Basis points of swap fees routed to LP-D holder. LP-Y earns the remainder. Lower demand = higher score.
maxCollateral
Total USDC budget. Allocated proportionally across matched deposits until exhausted.
ilCoverageBps · 0 ... 10000
IL is not binary.
Every point on the spectrum is a distinct trade.
One parameter unlocks the full range between standard AMM LP and full IL protection. LPs set their coverage level. Protocols compete to offer the best terms. The hook is the matching engine.
AVAILABLE BIDS · ETH/USDC 0.3% · SORTED BY SCORE
LP SIDE
Sell IL risk at a price you choose
Pick the coverage level. Pick the fee split. The hook encodes your choice into the deposit. No second transaction. No manual negotiation.
PROTOCOL SIDE
Buy IL exposure at a price you set
Post a bid with your coverage terms and USDC collateral. Compete for LP order flow. Best score wins the position.
THE HOOK
Clears the market in one block
No oracle, no keeper, no counterparty risk. Settlement runs atomically inside afterAddLiquidity. The block is the settlement layer.
Token structure
One position, unbundled.
LP-Y takes the yield.
LP-D takes the delta.
WHO HOLDS LP-Y
WHO HOLDS LP-D
LP-Y
IL compensation follows the token, not the depositor. Transfer LP-Y and the protection goes with it. The contract checks your balance at claim time, not when you first deposited.
LP-D
Collateral only gets drawn when the LP exits underwater. If price holds or comes back, the LP-D holder keeps all of it. Plus whatever fee share they picked up along the way.
CASE: LP holds both
If you hold both tokens yourself, the IL settles internally. You end up in the same place as a regular Uniswap LP. The split still happens on-chain though, so the accounting stays clean if you need it.