Overview

As a hook builder, it is important that the TVL of your hook is correctly picked up and displayed by DEXes and routers. This is particularly important if your hook deploys liquidity from external protocols, uses JIT strategies, or implements custom liquidity mechanisms that go beyond what PoolManager events can capture.

This guide outlines the simple standard for externalizing TVL so that Uniswap and other DEXes can accurately pick up your hook’s TVL. If you follow this standard, Uniswap will automatically detect and report your hooks TVL into its interfaces and use your pool’s TVL to calculate the best route for swaps.

Note that Uniswap does not customize TVL collection for different projects. If you decide to not report your TVL or to use a different approach to report TVL than that which is outlined in this guide, this may impact the visibility and route-ability of your hooked pool.

On-Chain Stats Interface

Hook builders should implement a simple read-only interface (or deploy a separate stats contract) to report both their total TVL and immediately swappable (”effective”) liquidity:

interface IHookStats {
    /// @notice Total reserves managed by the hook (true TVL)
    /// @dev Should include ALL assets under management: external deployments, 
    /// time-locked funds, rehypothecated assets, etc.
    /// @param key The pool key for the specific pool
    /// @return token0 Total amount of token0 reserves
    /// @return token1 Total amount of token1 reserves
    function getReserves(PoolKey calldata key)
        external
        view
        returns (uint256 token0, uint256 token1);
        
    /// @notice Assets available for immediate swapping
    /// @dev Returns liquidity that can be accessed right now for trading.
    /// Always <= getReserves()
    /// @param key The pool key for the specific pool
    /// @return token0 Immediately swappable token0 liquidity
    /// @return token1 Immediately swappable token1 liquidity
    function getEffectiveLiquidity(PoolKey calldata key)
        external
        view
        returns (uint256 token0, uint256 token1);
}

Implementation Options

Option A: Implement in Hook Contract Add the interface directly to your existing hook contract.

Option B: Separate Stats Contract Deploy a dedicated stats contract that implements the interface. This approach:

Hook Registration

Once you have implemented the TVL interface and deployed your hook (or separate stats contract) on chain, you must register your hook/stats contract via PR to our registry:

  1. Clone the Uniswap routing-api repo
    1. git clone [git@github.com](<mailto:git@github.com>):Uniswap/routing-api.git
  2. Create a new branch including the name of your hook
  3. [add x to y, with example]
  4. Commit and submit the PR