Likely custom pricing hook on Base
Uniswap v4 Hook Contract 0x231525fefb80d3496810025a6100cbc2bcbf4088 on Base · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook runs before each swap on its pool and can adjust swap amounts and withdraw tokens, but the exact effect on which trades pay more or less cannot be determined from the bytecode alone.
How it works step by step
- Exposes a beforeSwap callback that can return a custom delta, letting the hook take over part of a swap's accounting
- Calls take(address,address,uint256) on the PoolManager, so the hook can withdraw pool tokens during a swap
- Tracks two bool flags in storage slots 0 and 1, written by selector 0x1984e66e (takes two uint256 arguments)
- Keeps two uint256 values in storage slots 2 and 3, updated inside beforeSwap
- Contains a gong() selector and a view function 0x6f5ab1b5 that reads the same storage, but the purpose of these is not determinable from bytecode alone
- Swap behaviour
- beforeSwap runs before each swap, may update the stored flags and counters, and can return a before-swap delta that changes the amounts settled for the swap; it also calls take on the PoolManager to move currency. Exact pricing effect cannot be determined without source.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee, as no fee-override return is indicated; however the hook can alter swap amounts via return delta, so its effective cost to traders cannot be confirmed from bytecode.
- Owner & admin controls
- No admin controls found.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is enabled to inspect and gate or adjust each swap, and beforeSwapReturnDelta is enabled so the hook can return a delta that modifies the swap's settled amounts and moves currency via take.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: Without source it is unknown whether any privileged key controls the flags written by 0x1984e66e; if such a key exists it could alter swap settlement behaviour.
Risk to user funds: Because the hook can return a before-swap delta and call take on the PoolManager, it can move pool currency during swaps, so pool and user funds in affected pools are exposed to the hook's logic.
Security findings
- [high] Return delta with currency movement: beforeSwapReturnDelta is enabled and the bytecode calls take on the PoolManager, so the hook can take pool tokens and change swap settlement amounts on individual swaps.
- [medium] Unverified source: No verified source is available, so the intended behaviour, any gating logic and any owner or privileged paths cannot be confirmed by review.
- [medium] Selector 0x1984e66e writes state: A nonpayable function with two uint256 arguments writes to the bool flags in slots 0 and 1, and its access control cannot be determined from bytecode.
- [low] Unidentified gong selector: The gong() selector appears in the bytecode but its role and whether it is externally callable cannot be determined from the decoded data.
Contract details
- Verified source
- No
- Bytecode size
- 1,443 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Likely custom pricing hook
- ETH / SUBS (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today