NavHook on Polygon

Uniswap v4 Hook Contract 0x40e037b434e3e2c4b566ae2f08abcbf8e9146888 on Polygon · Custom pricing · 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 vault that runs inside its own SHARE/ASSET pool: buys mint shares and sells burn shares at a net asset value, and later the vault seeds a concentrated buffer position around NAV so the pool trades near that value.

How it works step by step

  • Fills swaps directly at NAV in the Raise phase, minting shares on buys and burning them on sells
  • Accepts direct deposit() and redeem() calls that mint or burn shares at NAV minus fees
  • Launches a vault-owned concentrated liquidity position around NAV once the raise is roughly full
  • Applies a gap fee in the Buffer phase that protects the vault from selling below or buying above NAV
  • Lets anyone recenter the buffer position once the price drifts out of range or beyond maxGapFee
  • Blocks all external liquidity additions and keeps the pool's liquidity under the hook's control
Swap behaviour
Raise phase: every swap is filled by the hook at NAV with a fixed mint or redeem fee (custom accounting via return delta); buys stop at raiseCap. Buffer phase: swaps run on the pool curve with a dynamic gap fee that reverts when price strays too far from NAV.
Liquidity behaviour
beforeAddLiquidity always reverts (LiquidityLocked), so outside parties cannot add liquidity. The hook itself adds a single concentrated position around NAV when launchBuffer() runs, using bufferBps of idle assets plus freshly minted shares. Removal happens only via recenter() or rescueAll(). Users exit through redeem() at NAV minus fee.
Fee behaviour
Raise phase: no LP fee from the pool; the hook takes a fixed mintFeeBps on buys and redeemFeeBps on sells, applied to NAV-priced fills. Buffer phase: swaps use baseLpFee plus a dynamic gap fee (up to maxGapFee) that reverts if the pool price drifts too far from NAV on the wrong side. Fees accrue to NAV, benefiting remaining holders.
Owner & admin controls
Owner (Ownable2Step, transfer requires acceptance) can: initializePool(), launchBuffer() anytime, recenter() anytime, setPaused(bool) to halt swaps and deposits, rescueAll(to) which pulls every asset out of the vault and pauses it (test version), and rescueToken for non-asset tokens. Owner can renounce ownership. Parameters are immutable after deployment; there is no upgrade proxy.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize: restricts pool creation to the hook itself. beforeAddLiquidity: blocks all external liquidity provision. beforeSwap: replaces the pool curve in Raise phase with NAV-priced custom accounting via return delta, and applies a dynamic gap fee in Buffer phase. beforeSwapReturnDelta: lets the hook take over the swap amounts (custom accounting).

Security & trust assessment

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

Who controls it: The owner can call rescueAll() at any time to withdraw all pooled and idle assets to an arbitrary address, removing backing from every share holder while shares remain outstanding. The owner can also pause swaps and deposits, and can force recenter(). Ownership is transferable, so a compromised key has the same power.

Risk to user funds: The hook holds all deposited assets (idle and inside its pool position) and mints and burns shares. The owner can withdraw everything with rescueAll, and can pause deposits and swaps. Holders can redeem at NAV minus fee while not paused and while idle assets cover the redemption; after a rescue there are no idle assets left to pay out.

Security findings

  • [high] Owner can drain all vault assets: rescueAll(to) takes every asset out of the position and idle balance and sends it to any address, leaving outstanding shares unbacked. The code itself labels this a TEST VERSION.
  • [medium] Owner can pause trading and deposits: setPaused(true) blocks swaps and deposits (redeem stays open). The owner can freeze trading and minting at will, though holders can still redeem.
  • [low] NAV depends on pool state and fee accounting: NAV is computed from the pool position, uncollected fees and idle balances. Pool price deviation is limited by a gap fee, but the vault relies on the pool's own state, so manipulation risk depends on the gap-fee and recenter logic.
  • [info] Fees and parameters are immutable: Phase transitions, mint/redeem fees and buffer sizing are fixed at construction via immutables; redeemFeeBps and mintFeeBps are capped at 10%.
  • [info] Share supply controlled by hook only: Deposits are blocked above raiseCap and the hook only mints shares through its own NavShare contract, which can only be called by the hook.

Contract details

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

Pools using NavHook