Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,113,588
0x876e…c5c7
The eight checks
7 pools use this hook, the first one 40 d ago.
- 01caution
Permissions that touch your moneyThe address enables after swap returns delta, after add returns delta, after remove returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 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 switchOwned by 0x7dEFDd46A7Ca6Ec77DBB53110485750F4362a06A. Owner-style functions: setFeeRecipient, transferOwnership, withdraw, claimableFees, paused, claimFees.
- 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 record7 pools over 40 days.
Measured at block 93,113,588. 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 & 0x3fff0x05c7 · 00010111000111
- 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.
GOOGL / USDG
fee dynamic, now 0%- Swap GOOGL → USDGno liquidity at the current price
- Swap USDG → GOOGLno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0x3117cb53186dcc3b119ceb75e2b0f1752b2de26fa6c4cda5cb1ff4a0bff2833e
Read from the bytecode
- Code size
- 13,745 bytes
- Owner
- 0x7dEFDd46A7Ca6Ec77DBB53110485750F4362a06A
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 8
- 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.
- 0xe74b981b setFeeRecipient
- 0xf26ef49d DYNAMIC_FEE_FLAG
- 0xf2fde38b transferOwnership
- 0xfe047c2e unknown
- 0xe1a45218 BPS_DENOMINATOR
- 0xe1b4af69 afterDonate
- 0xe30c3978
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- 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.
- After add returns delta. Can charge LPs on the way in.
- After remove returns delta. Can take part of what LPs withdraw.
pendingOwner
0xc516c0df unknown0xcb0856bb discountThreshold0xd9caed12 withdraw0xd9ccaf24 unknown0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xb6a8b0fa beforeDonate0xb77b83a5 unknown0xba97ac74 unknown0xbc063e1a MAX_FEE0xc3f909d4 getConfig0xc4e833ce getHookPermissions0x91dd7346 unlockCallback0x949f68ec unknown0x9c673d54 unknown0x9f063efc afterAddLiquidity0xb47b2fb1 afterSwap0xb602e392 claimableFees0x79ba5097 acceptOwnership0x82cee4a9 unknown0x8da5cb5b owner0x8dc1632a unknown0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x7673bae2 recipientShareBps0x46941cdd unknown0x54fd4d50 version0x562fc883 unknown0x575e24b4 beforeSwap0x5c975abb paused0x6a00c613 unknown0x259982e5 beforeAddLiquidity0x2db13630 unknown0x2dbfa735 claimFees0x3824a99a unknown0x3bfa2a36 unknown0x46904840 feeRecipient0x09cae2c8 withdrawAll0x0b4dc8ca setDiscountThreshold0x13eff23e unknown0x16c38b3c setPaused0x211c3f15 unknown0x21d0ee70 beforeRemoveLiquidity