Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,115,547
0xD571…Bcc0
The eight checks
10 pools use this hook, the first one 11 d ago.
- 01pass
Permissions that touch your moneyNone of the permissions that let a hook take from swaps or from LPs are switched on.
- 02n/a
What it takes from a swapNo pool with liquidity to swap through yet.
- 03pass
LPs can get outLiquidity added and removed in the same block came back whole.
- 04caution
The fee is the feeIts pools use a dynamic fee that the hook sets before every swap. It stands at 0% now and can change.
- 05caution
No one holds the switchNo owner() but it has updateFeeConfig, UPGRADE_INTERFACE_VERSION, upgradeToAndCall, grantRole.
- 06fail
The code cannot changeIt is a proxy. The code that runs lives at 0xCAd5709a91Eb8Ff6aa6D9de9f34FA341D8B0C000.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record10 pools over 11 days.
Measured at block 93,115,547. 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 & 0x3fff0x3cc0 · 11110011000000
- 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.
AVGO / QQQ
fee dynamic, now 0%- Swap AVGO → QQQtoo little liquidity to measure
- Swap QQQ → AVGOtoo little liquidity to measure
- Add, then remove liquiditycame back whole
pool 0x5c59ebe7c60fa8881b35a2c80d25187f2f23e61d842ff930d20daf709f42a8cc
TSLA / QQQ
fee dynamic, now 0%- Swap TSLA → QQQtoo little liquidity to measure
- Swap QQQ → TSLAtoo little liquidity to measure
- Add, then remove liquiditycame back whole
pool 0x4859c042c5867b538f892e31bbecd6f68edeb0cdcbbe6e907ccd68a5beb8cfb4
Read from the bytecode
- Code size
- 18,263 bytes
- Owner
- none found
- Proxy
- yes, code at 0xCAd5709a91Eb8Ff6aa6D9de9f34FA341D8B0C000
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 1
- 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.
- 0xdc4c90d3 poolManager
- 0xdc98354e beforeInitialize
- 0xe1b4af69 afterDonate
- 0xd4a78fd7 initializePool
- 0xd547741f revokeRole
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 initialize. Runs once, right after a pool is created.
- Before add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- After add liquidity. Runs after each deposit.
- Before swap. Runs before every swap. On a dynamic-fee pool it can set the fee each time.
- After swap. Runs after every swap.
0xb6a8b0fa
beforeDonate
0xb9629a41 feeConfig0xc0c53b8b initialize0xc4e833ce getHookPermissions0xa217fddf DEFAULT_ADMIN_ROLE0xa8ef0297 updateFeeConfig0xad3cb1cc UPGRADE_INTERFACE_VERSION0xb47b2fb1 afterSwap0x9153ba46 MAX_OPTIMAL_FEE_E60x91d14854 hasRole0x9f063efc afterAddLiquidity0xa0c7f799 CONFIG_MANAGER_ROLE0x69516b74 getFee0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x8544d33a batchUpdateFeeConfig0x4f1ef286 upgradeToAndCall0x5017d9a0 POOL_INITIALIZER_ROLE0x52d1902d proxiableUUID0x575e24b4 beforeSwap0x248a9ca3 getRoleAdmin0x259982e5 beforeAddLiquidity0x2f2ff15d grantRole0x36568abe renounceRole0x01ffc9a7 supportsInterface0x0d1fd58e feeState0x15142436 MAX_TARGET_MULTIPLIER0x21d0ee70 beforeRemoveLiquidity