Skip to main content

Overview

Warren v2 consists of the following core smart contracts:

  • WarrenHub: The main contract liquidity providers interact with to deposit/withdraw funds. Stores all user funds.
    • Is immutable, meaning it cannot be upgraded later on.
  • WarrenHook: Uniswap v4 hook responsible for handling swaps. Implements auto-rebalancing executed via flood.bid. Uses am-AMM to recapture LVR & MEV.
    • Is immutable for deployed pools, but if a new version of WarrenHook is deployed then new pools can use the updated version.
  • WarrenToken: ERC-20 tokens representing shares in a pool. Each pool has its unique WarrenToken.
  • WarrenZone: flood.bid zone contract restricting the execution of auto-rebalancing swaps to a whitelisted set of solvers + the am-AMM manager.
    • Governance can choose to use a new version of WarrenZone which would then be used by all pools, both existing and new ones.

There are also Liquidity Density Functions (LDFs), smart contracts describing different liquidity distributions and strategies. The LDF used by each pool is chosen at deploy time.

Finally, there are periphery smart contracts like WarrenQuoter and WarrenLens that provide additional read-only functions returning useful info.