◆ yellow paper · v2· ~ 9 min read· last updated 2026-05-10

Liquidity that does work.

Hooky is a Uniswap V4 hook that turns the LP underneath an AMM into borrowable depth. Same constant-product curve, same swap UX, but every band of liquidity can lend ETH against Hooky collateral and self-heal when prices move. This page explains it from scratch, with the math.

01the problem

Uniswap is the largest source of automated market-maker liquidity on Base. Across V2, V3, and the new V4 hook architecture, the protocol routinely holds billions of dollars in liquidity provider deposits.

value locked in Uniswap≈ $5–8Bacross V2/V3/V4 pools, per DeFiLlama (typical 2026 range)

That capital earns swap fees. But it is locked for everything else. A liquidity provider's $1M position cannot be borrowed against without first being withdrawn — and withdrawing kills the fee stream.

You can earn swap fees, OR use the tokens as collateral. Not both.

The same pattern repeats across DeFi: tokens locked into LP, into staking, into vaults are dead weight for any purpose other than their primary one. For a fair-launched community token, this means the deepest pool of capital — the LP itself — can never finance its own users.

02the idea

What if the AMM itself could lend? Every block, the V4 pool knows precisely how much ETH it holds and at what price. That is a perfect oracle and a perfect treasury, owned by the protocol — not a third party.

Hooky is a V4 hook that does exactly this. When a user wants to borrow ETH, the hook reaches into one of the LP positions backing the Hooky/ETH pool, pulls the requested ETH out, and hands it over. The LP shrinks slightly — but the spot price does not move, because we draw from a band that sits below the current spot.

band 0–N
ETH-only LP
(crossed bands)
↑ borrow draws from here
active band
spot price
sits here
swaps cross through

The key insight: V4's concentrated liquidity is divided into discrete tick ranges. Each range can hold ETH-only, Hooky-only, or a mix, depending on where the current spot is. We treat each range as a separate "band" of capital and lend from bands that have ETH to spare.

03the math

3.1 the curve

Like a vanilla constant-product AMM, Hooky maintains:

realTokens × (V + realETH) = K

where V = 20 ETH is a fixed virtual reserve so the curve is well-defined even with zero real ETH, and K = 20,000,000 is the product constant set at deployment to fix the launch supply at 1,000,000 Hooky.

Spot price is (V + realETH) / realTokens ETH per Hooky. As ETH flows in, realTokens drops and price rises. Standard stuff.

3.2 30-ETH bands

The pool is sliced into 100 discrete bands, each covering 30 ETH of cumulative inflow. Band i holds the Hooky that the constant-product curve would have sold across the ETH range [30i, 30(i+1)):

Hooky_i = K / (V + 30i) − K / (V + 30(i+1))

Mapped to V4 ticks, this gives 100 single-sided Hooky positions at deploy, covering pool-ETH inflow up to 3,000 ETH. As buyers push ETH into the pool, bands cross one by one — each band's Hooky is converted to ETH at exactly the prices it was priced at.

bandETH rangeHooky allocation% of supply
00–30600,00060.00 %
130–60150,00015.00 %
260–9068,1816.82 %
390–12038,9613.90 %
tail bands shrink rapidly
29870–9007320.07 %
long tail to 3,000 ETH
992970–3000670.007 %

The 100-band design covers a price range of ~7,000× from launch to band 99 saturation — well beyond any realistic short/medium-term protocol life.

3.3 borrowing — bound band selection

When a user locks C Hooky as collateral, we lend ETH at a 40 % loan-to-value:

debt = collateralValue × 0.40

Liquidation triggers when collateral value falls to 1.5 × debt — i.e. spot price drops to 60 % of the borrow price. Solving for that price level on the curve gives the predicted liquidation pool ETH:

ethLiq = √0.6 × (V + ethBorrow) − V

The "bound band" is then floor(ethLiq / 30). The hook draws the borrow's ETH from this specific band's LP. Since the band sits below current spot, removing ETH from it does not move the price — borrows are slippage-free.

3.4 dead zones & the shift

Sometimes the predicted bound band is the same band the spot price currently sits in (a "straddle"). V4's concentrated liquidity requires single-sided positions for ETH-only extraction, so a straddling band cannot supply pure ETH.

The hook resolves this with two mechanisms:

Bound-band shift. If the predicted band fully straddles or sits below current spot, the hook steps to the next band above spot (lower bandId, higher V4 ticks) which is guaranteed ETH-only.
Straddle-borrow. If no band sits fully above spot (cold-start case where currentTick is inside band 0), the hook removes liquidity from the straddling band's position directly. V4 returns both ETH (used for the loan) and a small amount of Hooky (kept by the hook as protocol surplus).

Together these guarantee every borrow can be served regardless of where the spot price is — no warmup period, no dead zones.

3.5 self-healing liquidation

When a position becomes underwater (collateral value < 1.5 × debt), anyone can call liquidate() for a small bounty. The hook:

Sells the collateral via a normal V4 swap, receiving ETH proceeds.
Pays the liquidator a bounty of min(1 % × debt, 0.01 ETH) — the hard cap prevents disproportionate payouts on large positions.
Refills the remainder back into the bound band as fresh ETH-only LP — the band we originally lent from becomes deeper than before. No Hooky burn.
The pool gets stronger every time a position liquidates. That's self-healing.

If the spot has moved so far during the liquidation swap that the original band is no longer above spot, the refill falls back to the closest other band that is above. If even that fails, the surplus goes to the FeeCollector as protocol revenue. ETH never sits unaccounted in the hook.

04a complete cycle

Concretely, here is what happens when a user borrows then later gets liquidated:

1
borrowAlice locks 30,000 Hooky. Pool ETH is 80, spot is ~0.0011 ETH/Hooky. Collateral value: 33 ETH. Debt issued: 13.2 ETH (40 % LTV). Origination fee: 0.13 ETH → FeeCollector. Net to Alice: 13.07 ETH.
2
bound bandPredicted ethLiq = √0.6 × 100 − 20 = 57.5. Bound band = floor(57.5 / 30) = 1. The hook removes ETH-only LP equivalent to 13.2 ETH from band 1's V4 position. Spot price does not move.
3
price dropsOther users sell Hooky. Pool ETH falls 80 → 55. New spot ~0.00064 ETH/Hooky. Alice's collateral now worth 19.2 ETH. Coverage = 19.2 / 13.2 = 1.45× — UNDERWATER (need ≥ 1.5×).
4
liquidateBot calls liquidate(alice, 1). Hook sells Alice's 30,000 Hooky via V4 swap, receiving ~17 ETH. Pays bot 0.01 ETH bounty (capped). Refill: 16.99 ETH → back into band 1 as ETH-only LP.
5
outcomeAlice's debt is cleared. Alice loses her 30k Hooky collateral. Bot earns 0.01 ETH. Band 1 holds MORE ETH-side LP than before Alice's borrow. Protocol depth strengthens.

05honest limits

Things to know:

Each band caps at 30 ETH borrow. A single position cannot borrow more than that from one band. Larger loans split across bands.
Same-block lockoutblocks borrow / liquidate in the same block as a swap, defeating one-block oracle manipulation. Multi-block manipulation is bounded by the LDF cap structure but not impossible — pump-and-borrow simulations show negative attacker P&L (origination fee + slippage cost the attacker more than they extract). A TWAP oracle would harden this further.
No cascade liquidation. Because borrows draw from a band below spot and don't move spot, no one position's liquidation can drag others underwater.
Fixed parameters, no governance. LTV (40 %), liq threshold (150 %), bounty (1 % capped at 0.01 ETH), LDF band count (30) are all set at deploy. No proxy, no upgrade.

06parameters

parametervaluerationale
Hooky supply1,000,000fixed at deploy, no mint/burn
Virtual ETH (V)20 ETHphantom reserve to seed the curve
LDF bands30 × 30 ETHcovers 0–900 ETH cumulative inflow
LTV40 %debt = 0.40 × collateralValue
Origination fee1 % of debt→ FeeCollector at borrow time
Liq threshold150 %underwater when collateralValue < 1.5 × debt
Liq bounty1 % × debt, max 0.01 ETHper-call cap, prevents whale subsidies
Repay cooldown2 blockspost-borrow lockout
Min collateral0.1 ETH valuefloor to prevent dust

07references

Uniswap V4 core — concentrated-liquidity AMM with hook callbacks.
DeFiLlama · Uniswap — live TVL across V2 / V3 / V4.
Uniswap V4 whitepaper — hook architecture and singleton design.
Hooky dashboard — live curve, depth chart, execute panel.
next

Open the dashboard to see live curve depth, place trades, and manage open positions.

← open dashboard