◆ 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.
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.
(crossed bands)
sits here
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:
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)):
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.
| band | ETH range | Hooky allocation | % of supply |
|---|---|---|---|
| 0 | 0–30 | 600,000 | 60.00 % |
| 1 | 30–60 | 150,000 | 15.00 % |
| 2 | 60–90 | 68,181 | 6.82 % |
| 3 | 90–120 | 38,961 | 3.90 % |
| … | … | … | tail bands shrink rapidly |
| 29 | 870–900 | 732 | 0.07 % |
| … | … | … | long tail to 3,000 ETH |
| 99 | 2970–3000 | 67 | 0.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:
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:
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:
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:
min(1 % × debt, 0.01 ETH) — the hard cap prevents disproportionate payouts on large positions.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:
◆ 05honest limits
Things to know:
◆ 06parameters
| parameter | value | rationale |
|---|---|---|
| Hooky supply | 1,000,000 | fixed at deploy, no mint/burn |
| Virtual ETH (V) | 20 ETH | phantom reserve to seed the curve |
| LDF bands | 30 × 30 ETH | covers 0–900 ETH cumulative inflow |
| LTV | 40 % | debt = 0.40 × collateralValue |
| Origination fee | 1 % of debt | → FeeCollector at borrow time |
| Liq threshold | 150 % | underwater when collateralValue < 1.5 × debt |
| Liq bounty | 1 % × debt, max 0.01 ETH | per-call cap, prevents whale subsidies |
| Repay cooldown | 2 blocks | post-borrow lockout |
| Min collateral | 0.1 ETH value | floor to prevent dust |
◆ 07references
Open the dashboard to see live curve depth, place trades, and manage open positions.