NavHook on Polygon

Uniswap v4 Hook Contract 0x06db7a8f61238783845b3a176b85d6a532786888 on Polygon · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

A NAV-backed share vault that runs inside its own SHARE/ASSET v4 pool: during the raise, buys and sells are filled by the hook at NAV, and after launch it seeds a concentrated buffer position around NAV with a gap fee to protect the vault from trading below or above NAV.

How it works step by step

  • Raise phase: buys mint shares at NAV minus a fixed mint fee, up to raiseCap of assets
  • Raise phase: sells redeem shares at NAV minus a fixed redeem fee from idle assets
  • Direct deposit() and redeem() provide the same NAV mint and burn without a router
  • launchBuffer() closes the raise and moves bufferBps of assets plus minted shares into a concentrated position around NAV
  • Buffer phase: a gap fee on swaps keeps the vault from selling below or buying above NAV, reverting if too large
  • Owner-only recenter() and rescueAll() provide repricing and emergency withdrawal
Swap behaviour
In Raise phase, beforeSwap fills every swap at NAV via return deltas: buys mint shares at NAV minus mint fee against the raise cap, sells redeem shares at NAV minus redeem fee from idle assets. In Buffer phase, swaps execute on the concentrated curve with an overridden dynamic fee that includes a gap fee, and revert if the gap exceeds maxGapFee. All swaps revert while paused.
Liquidity behaviour
Public addLiquidity is blocked by beforeAddLiquidity (reverts LiquidityLocked). Liquidity is only added by the hook itself in launchBuffer() and recenter(), using bufferBps of idle assets plus freshly minted shares in a concentrated position around NAV. Users cannot LP into the pool; removal happens only internally during recenter or rescue.
Fee behaviour
During Raise, fees are a fixed mint fee (mintFeeBps) on buys and redeem fee (redeemFeeBps) on sells, both capped at 10%, taken from the NAV fill. During Buffer, swaps pay baseLpFee plus a dynamic gap fee that rises when the pool price deviates from NAV in the direction that would let the vault sell below or buy above NAV; swaps needing more than maxGapFee revert until recentered. Fees accrue to the vault's position and raise NAV for holders.
Owner & admin controls
Owner (Ownable2Step) can initialize the pool, call recenter(), pause/unpause via setPaused, transfer or renounce ownership, rescue non-asset tokens via rescueToken, and call rescueAll(to) which withdraws every asset to an arbitrary address, pauses the vault and leaves shares unbacked. Anyone can call launchBuffer() once the raise is 99% full; the owner can call it at any time.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize restricts pool creation to the hook itself. beforeAddLiquidity reverts all external liquidity additions. beforeSwap runs custom NAV accounting in Raise phase and applies dynamic gap fees in Buffer phase. beforeSwapReturnDelta lets the hook fill swaps itself, taking input as ERC-6909 claims and paying output from idle assets.

Security & trust assessment

Risk level: high (verified source, high confidence).

Who controls it: The owner can drain all vault assets to any address with rescueAll, leaving minted shares with no backing, and can pause all user deposits, redemptions and swaps. Owner can also move the pool price via recenter and withdraw non-asset tokens. Owner can transfer ownership to any address.

Risk to user funds: The hook holds all deposited assets (idle balance and the buffer position) and ERC-6909 claims on behalf of the pool. The owner can transfer all assets out via rescueAll or pause redemptions via setPaused, so user funds are fully exposed to the owner key. Redemption at NAV minus fee is the only user exit path and is blocked while paused.

Security findings

  • [high] Owner can drain all vault assets: rescueAll(to) is callable by the owner and transfers every asset (idle plus position proceeds) to an arbitrary address, pausing the vault while share supply remains outstanding.
  • [medium] Owner pause can freeze redemptions: setPaused lets the owner block deposit, redeem and all swaps at will, which can trap user funds in redemption.
  • [medium] Test version with emergency drain function: The contract is explicitly marked as a TEST VERSION in its source and is not hardened for production use.
  • [low] Owner-triggered repricing: Pool price is set by the owner-triggered recenter path, which removes and re-adds liquidity; a sandwich or price manipulation window exists around these calls.
  • [info] Ownership is two-step: Ownership is two-step (Ownable2Step) and can be renounced, which removes the drain and pause controls permanently.

Contract details

Verified source
Yes (NavHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
23,548 bytes
Upgradeable proxy
No
Detected patterns
erc20, erc6909-claims, launchpad, moves-currency, ownable, pausable, return-delta, self-unlock

Pools using NavHook