OttoFeeHookV2 on Robinhood Chain

Uniswap v4 Hook Contract 0xe10365af44cb192236994c9af915a06acf382080 on Robinhood Chain · Dynamic fee · Verified contract

Volume (24h)
$14.04K
Value locked (TVL)
$21.90K
All-time volume
$88.22K
Pools using this hook
5
Swaps (24h)
589 (77 traders)
Total swaps
3,283

What it does

A dynamic LP fee hook for tokenised-stock pools that raises swap fees around market hours, moves with large price departures, and can apply a governor-scheduled earnings-window surcharge, without ever blocking swaps or touching liquidity.

How it works step by step

  • Sets the LP fee per swap as the greater of min(session fee plus move fee, 1.00%) and the active earnings window fee.
  • Chooses the session fee from a governor-installed market calendar with regular, extended, overnight and weekend fees per pool.
  • Adds a move fee when a swap pushes price beyond a trigger distance from a decaying anchor price, using a tick walk to avoid liquidity-sandwich distortion.
  • Allows the governor to post earnings windows of up to 10% for at most 24 hours, spaced at least 30 days apart, with 24 hours notice.
  • Gates pool initialisation on a pre-committed opening price hash and never refuses swaps for any reason other than a non-pool-manager caller.
Swap behaviour
beforeSwap computes a fee from the session calendar, the price move versus a decaying anchor (walking up to 16 ticks), and any active earnings window, then returns it as an override LP fee with a zero balance delta.
Liquidity behaviour
No liquidity callbacks. The hook has no beforeAddLiquidity or beforeRemoveLiquidity permission, so the pool manager never calls it on deposits or withdrawals.
Fee behaviour
Each swap pays max(min(session fee + move fee, 1.00%), earnings window fee). The session fee comes from the calendar (regular, extended, overnight, weekend, or the highest of the four when the calendar lapses). The move fee rises with the distance the swap moves price beyond a time-decaying anchor, found by walking up to 16 initialised ticks. Earnings windows can lift the fee up to 10% for at most 24 hours in 30 days, posted at least 24 hours ahead and only by the governor. The fee is returned as an override fee and no balance delta is taken, so the whole fee goes to LPs plus the pool manager's protocol fee.
Owner & admin controls
A single governor address (set in the constructor, changeable via two-step proposeGovernor/acceptGovernor) controls all configuration: registering pools and opening price hash, posting, cancelling and reducing earnings windows, posting and cancelling fee tables (with a 24h notice and 7-day spacing), and installing the market calendar at once. Limits such as MAX_FEE_OUTSIDE_WINDOW, MAX_WINDOW_FEE and WALK_STEPS are constants with no setter, and the contract is not upgradeable.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap

beforeInitialize: checks that the pool was registered with the matching opening price hash, marks the pool open and sets its anchor price and time. beforeSwap: computes the dynamic LP fee for the swap, updates the anchor on the first swap of each second, and returns the fee with the override flag and a zero delta.

Security & trust assessment

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

Who controls it: The governor can change the fee for each pool within the bounded ranges (session fees up to 1.00%, earnings windows up to 10% for 24 hours, reducible at any time), can change the market calendar instantly, and can register pools. The governor cannot refuse or block swaps, cannot pause, and cannot move funds, so the worst case is raising fees up to the 10% window ceiling during a live window or changing the calendar to select a higher of the pool's four session fees.

Risk to user funds: The hook holds no tokens, takes no balance delta in beforeSwap, and has no liquidity callbacks, so it cannot hold, move or block user or pool funds. Exposure is limited to the fee charged on each swap, which is bounded by the contract's constants.

Security findings

  • [medium] Governor can raise swap fees to 10% through earnings windows: Within the constraints, an owner-posted earnings window can raise a pool's swap fee to 10% for up to 24 hours, and the calendar can switch a pool to its highest session fee. This is the main lever a privileged key has over traders' costs.
  • [info] No swap blocking or pause mechanism: Rather than refusing swaps, the hook falls back to the highest of the four session fees when the calendar lapses, and beforeSwap only reverts for non-pool-manager callers. A governor error or lapse raises fees but does not halt trading.
  • [low] Opening price commitment relies on off-chain randomness: Pool opening price is committed as keccak256(abi.encode(sqrtPriceX96)) so it cannot be front-run before the governor opens the pool. Its security depends on the governor choosing an unguessable price, which is an off-chain assumption.
  • [low] Single governor key without timelock: A single governor key, changeable through a two-step transfer with no timelock, controls all configuration. Compromise would allow fee manipulation within the bounded limits.

Contract details

Verified source
Yes (OttoFeeHookV2)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
16,081 bytes
Upgradeable proxy
No

Pools using OttoFeeHookV2