Robinhood Chain hook

HookeFeeHook

ListedRobinhood ChainVerified source
0xb51d89bbc50b5ae469be8cfbf305cab6ff3a50ccBlockscout

A protocol-fee hook for a single hXMAX/USDG pool that charges a 2%–4% USDG-only fee per swap based on the pool price's deviation from an oracle price. Fees on the specified stablecoin leg are pre-taken in beforeSwap via BeforeSwapDelta; fees on the unspecified leg are taken in afterSwap via AfterSwapReturnsDelta. Also records tick-cumulative observations to serve a TWAP via consultMeanTick.

1Pools
1,383Swaps, 7 days
$146.1KVolume, 7 days
21 days agoFirst pool

What it can do to your swap

  • Can take a fee from your outputAfter the pool fills your swap, the hook can keep part of what you were about to receive.
  • Can change the price you getBefore your swap runs, the hook can take or add tokens, so the amount you get is set by its code as well as the pool.
  • Runs code before your swap and can block itThe hook is called before every swap. It can revert, which makes your swap fail.
  • Runs code after your swap and can block itThe hook is called after every swap. It can revert, which undoes your swap.
  • Runs code after a pool is createdCalled once, right after a pool with this hook is created.

Read from the hook address: flag bits afterInitialize, beforeSwap, afterSwap, beforeSwapReturnsDelta, afterSwapReturnsDelta. Flags glossary.

Last test swap

A quote for a tiny exact-in swap each way through USDG / hXMAX with Uniswap's V4 Quoter, compared with the pool's mid-price minus its 0.00% LP fee. It is an eth_call: nothing is signed or spent. Probed 2 h ago, every hour.

USDG to hXMAX4.00% takenIn 52.9606 USDGOut 5.23887 hXMAX, expected 5.45721Gas 223,233
hXMAX to USDG2.00% takenIn 5.45721 hXMAXOut 51.9009 USDG, expected 52.9606Gas 182,849

Swaps per day

10-2012210-215610-226410-2324510-2433710-2541710-26142

Volume over the same days: $26.9K, $17.6K, $8,755, $20.3K, $31.2K, $30.8K, $10.5K. Days end at the snapshot, in UTC.

Pools

PairFeeSwaps 7dVolume 7dCreated
USDG / hXMAX
0x4be9bd…ecb1ae
0.00%1,383$146.1K20 days agoSwap