Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,268,711
0xaa49…afC4
The eight checks
4 pools use this hook, the first one 61 d ago.
- 01caution
Permissions that touch your moneyThe address enables before remove liquidity, 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.00% on top of the pool fee.
- 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 0xB8A70b4d1547bf6193bd67A73F4F98ea9FD0A973. Owner-style functions: setPoolMaxAbsTickDelta, transferOwnership, withdraw, setNotifier, setFee, setDefaultObservationCardinality.
- 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 record4 pools over 60 days.
Measured at block 93,268,711. 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 & 0x3fff0x2fc4 · 10111111000100
- 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.
flETH / PYO
fee dynamic, now 0%- Swap flETH → PYOhook takes 1.00%
- Swap PYO → flETHhook takes 1.00%
- Add, then remove liquiditycame back whole
pool 0xcf08c985e82f49de2440073626d8a69c75bf29f4086d7c678a6fbbda60161efb
flETH / GOBX
fee dynamic, now 0%- Swap flETH → GOBXhook takes 1.00%
- Swap GOBX → flETHhook takes 1.00%
- Add, then remove liquiditycame back whole
pool 0x00b3c41184fbd685b23efff9f72c4b2f9a61cf088ee165da8f2f8ee7ff3dd756
Read from the bytecode
- Code size
- 24,047 bytes
- Owner
- 0xB8A70b4d1547bf6193bd67A73F4F98ea9FD0A973
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 21
- 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.
- 0xdddd48a0 setPoolMaxAbsTickDelta
- 0xe1758bd8 nativeToken
- 0xe1b4af69 afterDonate
- 0xf04e283e completeOwnershipHandover
- 0xf2fde38b transferOwnership
- 0xf9c90b06 ammBeneficiary
bit 4After donatebit 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.
- Before add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- After add liquidity. Runs after each deposit.
- Before remove liquidity. Can refuse a withdrawal. LPs may not get out.
- 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.
0xfee81cf4
ownershipHandoverExpiresAt
0xc23f001f balances0xc4e833ce getHookPermissions0xd7b96d4e locker0xd9caed12 withdraw0xdc4c90d3 poolManager0xdc86496c stateById0xdc98354e beforeInitialize0xabbb4695 setNotifier0xae463a0b setFee0xb35ea521 defaultMaxAbsTickDelta0xb3a4f97b getCollectionFee0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xbfd746d6 defaultObservationCardinality0x9ab2f6b9 pendingDonations0x9f063efc afterAddLiquidity0xa0fd3f7e poolParams0xa5a927a6 setDefaultObservationCardinality0xa5cf8840 observationsById0xa73802eb setDefaultMaxAbsTickDelta0xaa9d881c feeOverrides0x6f799441 deregisterCollection0x6fe7e6eb afterInitialize0x715018a6 renounceOwnership0x72a16a98 depositFees0x7381527f POOL_TICK_SPACING0x791b98bc positionManager0x8da5cb5b owner0x575e24b4 beforeSwap0x59f225d2 registerCollection0x5a6c72d0 defaultFee0x5b633d27 initializeCollection0x665a17c5 ammFee0x68400963 getFee0x6c2bbe7e afterRemoveLiquidity0x259982e5 beforeAddLiquidity0x31f7d964 NATIVE_TOKEN0x360507b6 removeFeeExemption0x3a0d5443 setDefaultFee0x4f413237 increaseObservationCardinalityNext0x54d1f13d cancelOwnershipHandover0x575c1246 setAmmFee0x0520d445 observe0x09276ea4 notifier0x176a5781 setFeeExemption0x19b1a6cd getCollectionPoolKey0x21d0ee70 beforeRemoveLiquidity0x253d25e6 setAmmBeneficiary0x25692962 requestOwnershipHandover