Holdfast™ hook

Uniswap v4 → Base Sepolia

Yield → Aave V3

Status: live

A Uniswap v4 hook for volatile pools. It scores how long and how bravely liquidity stays, partially covers realized impermanent loss, and pays loyal LPs from a pool that compounds on Aave.

Liquidity that holds fast
when the market
doesn’t.

Interface
BaseHook + ISubscriber
Swapper fee
+0 bps
Redirected
15% of pool fee
Tests
138 + 8 fork
(01) The problem

Mercenary capital leaves exactly when you need it most.

In volatile pools, LPs withdraw at the worst moment. Impermanent loss drives them out, depth collapses, and slippage spikes for everyone left behind.

A

IL drives exits

When price moves, LPs realize impermanent loss. The rational move is to flee high-volatility pools, the very pools that need depth.

B

Depth collapses

As liquidity leaves, the remaining LPs face wider spreads and worse fills. Volatility and thin books feed each other.

C

Incentives are external

Liquidity mining and ve-tokenomics patch this with emitted tokens and lockups, bolted on from outside the AMM.

Holdfast moves the incentive into the hook itself. No external token, no lockup. Loyalty is scored and rewarded natively, at the protocol level.

(02) Mechanism

Four parts, one loyalty loop.

01

Retention scoring

Every position accrues a score from liquidity share, tenure in blocks, and pool volatility. Staying power is rewarded, not just position size.

score = liquidity share × tenure (blocks) × pool volatility
02

Partial IL compensation

Realized impermanent loss is computed at claim time with log-return math (Solady lnWad), and a portion is paid back from a shared bonus pool. The compensation is partial and bounded by the pool. It is not a full hedge.

03

Tier badges

Bronze, Silver and Gold each need a score threshold and a minimum tenure in blocks. The dual criterion filters capital that arrives and leaves quickly. Every tier is an on-chain ERC-721 with IPFS art.

Holdfast Bronze badge Bronze
T1Bronze
Holdfast Silver badge Silver
T2Silver
Holdfast Gold badge Gold
T3Gold
04

Aave V3 compounding

Idle bonus pool USDC is supplied to Aave V3 and held as aUSDC. The reward pool earns yield while it waits to be claimed, so it grows on its own.

(03) Architecture

Subscriber-native, by design.

One contract is both a Uniswap v4 BaseHook and an ISubscriber. Ownership and liquidity come from the canonical PositionManager through subscriber callbacks, keyed by tokenId. No caller-asserted identity.

Swap path
  1. Swap on pool
  2. afterSwapcapture 15% of USDC delta
  3. YieldRouter
  4. Aave V3aUSDC
Subscriber path
  1. PositionManagermint, modify, burn
  2. Subscriber callbackskeyed by tokenId
  3. Holdfast hookscore, tier, claim

Fee capture redirects a fixed portion (default 15%) of the existing pool fee into the bonus pool. Swappers pay nothing extra; the share is taken as USDC and supplied to Aave.

(04) Demo

One loyalty cycle, on-chain.

A live cycle on Base Sepolia: accrue score, reach a tier, let real swaps fund the pool, then claim a share. The pool refills from swap flow, with no manual seeding.

  1. 01 → Accrue

    Score builds on every swap

    A subscribed position accrues score from liquidity share, tenure and volatility as swaps move through the pool.

  2. 02 → Reach tier

    A Silver badge is minted

    Once the score threshold and minimum tenure are both met, the hook mints a badge. In the live demo, position #24915 reached Silver.

  3. 03 → Capture

    Swaps fund the bonus pool

    WETH→USDC swaps redirect 15% of the USDC delta, scaled 1.0× to 1.5× by volatility, into the YieldRouter and on to Aave. Router aUSDC grew from 0 to ~0.20, purely from capture.

  4. 04 → Claim

    The loyal LP gets paid

    The pool splits into a 70% tier arm (Bronze 25 / Silver 35 / Gold 40, pro-rata by score) and a 30% realized-IL arm. As the only Silver member, the position claims about 24.5%.

(05) Deployment

Live on Base Sepolia.