AethraHook on Robinhood Chain

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

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

What it does

An upgradeable dynamic-fee hook where calm-market swaps pay a low base fee, volatile or oracle-diverging swaps pay more (capped at 10% currently), stock pools have an oracle circuit breaker, and a protocol share of fees goes to a buyback contract.

How it works step by step

  • Sets a dynamic swap fee based on recent volatility: calm markets pay the base fee (default 0.05% for normal pools, 0.30% for stock pools), bursts pay more up to a cap (default 2% or 3%, hard ceiling 10%).
  • For tokenized-stock pools, checks an oracle price: swaps moving the pool toward the oracle pay only the base fee, swaps moving it away pay a surcharge, and fees are doubled (by default) while the stock market is closed.
  • Acts as a circuit breaker on stock pools, blocking swaps that would leave the pool more than 5% (default) away from the oracle price, and blocking all swaps when the oracle is stale.
  • Takes a protocol share of each swap fee from the swap's unspecified side and lets anyone sweep it to the protocol's buyback contract.
  • Can restrict adding liquidity to a single approved position manager and restricts launchpad token pool creation to the launchpad.
Swap behaviour
Each swap pays a volatility-based fee (and on stock pools an oracle-aware fee), split between LPs and a protocol share taken from the output (exact-in) or input (exact-out); swaps revert if the pool is disabled by the hub, the oracle is stale, or the circuit breaker band would be breached.
Liquidity behaviour
Adding liquidity can be limited to the owner-set position manager contract; the remove-liquidity callback currently always allows withdrawals, but since the hook is upgradeable and this callback is enabled, a future upgrade could change that.
Fee behaviour
Total fee ranges from the base fee to the max fee per pool (defaults 0.05%-2% for normal pools, 0.30%-3% for stock pools; owner-adjustable up to a 10% hard cap in the current code). A hub-defined protocol share of that fee is taken by the hook and swept to the buyback contract, with the rest going to LPs.
Owner & admin controls
The owner can change fee parameters per pool or defaults (max fee capped at 10% by current code), set oracle breaker and surcharge settings, set the position manager, and upgrade the implementation at any time. The external hub controls pool enable/disable, protocol fee share and the buyback address.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: requires dynamic fee pools and launchpad-only creation for launch tokens; afterInitialize: sets pool mode, fee params and oracle checks, registers pool; beforeAddLiquidity: optionally restricts adders to the position manager; beforeRemoveLiquidity: currently a no-op that always allows withdrawals; beforeSwap: computes and overrides the LP fee, enforces oracle breaker and pool enable; afterSwap: updates volatility state, rechecks the breaker; beforeSwapReturnDelta/afterSwapReturnDelta: afterSwap returns a delta to take the protocol fee share.

Security & trust assessment

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

Who controls it: The owner controls fee parameters (up to 10%), the position manager gate, and full implementation upgrades; the hub operator can disable pools and set the protocol fee share.

Risk to user funds: Currently swappers pay at most 10% total fee, with a protocol share minted to the hook and swept to buyback, and LP withdrawals are not blocked by the hook. An upgrade could alter swap deductions or block withdrawals since those callbacks are enabled.

Security findings

  • [high] Upgradeable hook with swap deltas and remove-liquidity callback: The owner can upgrade the implementation; because swap return-delta and beforeRemoveLiquidity are enabled in the address, a new implementation could take larger amounts from swaps or block LP withdrawals.
  • [medium] Swaps can be halted: The hub can disable a pool, and stale oracles or the deviation breaker revert swaps on stock pools.
  • [medium] Protocol fee share set externally: The protocol share of the fee comes from the hub with no cap checked in this hook; total fee itself is capped at 10% in current code.
  • [low] Liquidity adds can be gated: The owner can require all liquidity additions to go through one position manager contract, which enforces its own locks.

Contract details

Verified source
Yes (AethraHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
141 bytes
Upgradeable proxy
Yes
Detected patterns
dynamic-fee, fee-sharing, launchpad, moves-currency, oracle, ownable, return-delta, self-unlock, upgradeable

Pools using AethraHook