Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,921,633
0x3F69…25C4
The eight checks
46 pools use this hook, the first one 80 d ago.
- 01caution
Permissions that touch your moneyThe address enables after swap returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02pass
What it takes from a swapIt takes 1% on top of the pool fee.
- 03pass
LPs can get outLiquidity added and removed in the same block came back whole.
- 04pass
The fee is the feeA fixed fee of 1%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has pausePool, setSwapValidator, grantRole, setFeeRate, unpausePool, setFeeCollector.
- 06pass
The code cannot changeNot a proxy, no DELEGATECALL, no SELFDESTRUCT.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record46 pools over 79 days.
Measured at block 92,921,633. A hook with an owner or a dynamic fee can behave differently later; scan again before a large trade.
What the address allows
A v4 hook's permissions are the last fourteen bits of its address. The PoolManager calls only what they switch on.
address & 0x3fff0x25c4 · 10010111000100
- bit 13Before initialize
- bit 12After initialize
- bit 11Before add liquidity
- bit 10After add liquidity
- bit 9Before remove liquidity
- bit 8After remove liquidity
- bit 7Before swap
- bit 6After swap
- bit 5Before donate
What it did to a real swap
A small swap each way and a liquidity round trip, run through the PoolManager and this hook inside a call that is never sent. The pool fee is expected; anything else missing is the hook.
NO / USDG
fee 1%- Swap NO → USDGtoo little liquidity to measure
- Swap USDG → NOhook takes 1%
- Add, then remove liquiditycame back whole
pool 0xf3531aad55c9ca5bf10108240ea585329a79a16032a34993316a799c3602b601
YES / USDG
fee 1%- Swap YES → USDGtoo little liquidity to measure
- Swap USDG → YEShook takes 1%
- Add, then remove liquiditycame back whole
pool 0x32149636e6d473c060de1fde377820ec743be18e65276cbcf5b00acf48534122
Read from the bytecode
- Code size
- 7,747 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 4
- Callbacks open to anyone
- none
Its functions, uncensored
Selectors found in the dispatcher, named from the public signature database. Red ones are what an owner usually keeps for itself.
- 0x01ffc9a7 supportsInterface
- 0x09d0fa12 pausePool
- 0x1a5a8e8c setSwapValidator
- 0x21d0ee70 beforeRemoveLiquidity
- 0x248a9ca3 getRoleAdmin
- 0x259982e5 beforeAddLiquidity
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- Before initialize. Runs once, when a pool is created.
- After add liquidity. Runs after each deposit.
- After remove liquidity. Runs after each withdrawal.
- Before swap. Runs before every swap. On a dynamic-fee pool it can set the fee each time.
- After swap. Runs after every swap.
- After swap returns delta. Can take part of what you get out of every swap.
0x2f2ff15d grantRole0x36568abe renounceRole0x38d7bfce authorizedPoolInitializers0x4327623d poolPaused0x45596e2e setFeeRate0x575e24b4 beforeSwap0x58700bed swapValidator0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x90f5abe4 unpausePool0x91d14854 hasRole0x9f063efc afterAddLiquidity0xa217fddf DEFAULT_ADMIN_ROLE0xa42dce80 setFeeCollector0xb2f5ec3e setAuthorizedPoolInitializer0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xc0da840d setOrderManager0xc415b95c feeCollector0xc4e833ce getHookPermissions0xd547741f revokeRole0xd73792a9 FEE_DENOMINATOR0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xe86dea4a feeNumerator0xf9b6117f orderManager