Likely custom pricing hook on Base
Uniswap v4 Hook Contract 0x7e4ef8dffcfd2d3629c1e958e8f902f3fb118088 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 custom logic on every swap and can adjust the amounts settled through a return delta, but without source its effect on which trades pay more or less cannot be confirmed.
How it works step by step
- Implements beforeSwap with a return delta, so the hook can take over part of a swap's accounting instead of letting the pool settle it normally
- Writes to several storage slots during swaps, including a uint256-to-uint256 mapping at slot 4, which suggests per-key state such as balances, positions or counters
- Exposes a view function (selector 0xd3b6cedc) that reads storage slots 0, 1, 3 and 2, likely returning state the swap logic depends on
- Takes no liquidity callbacks and charges no fee of its own; the swap-level delta is the only mechanism it appears to use
- Swap behaviour
- beforeSwap runs before each swap, reads and writes internal state, and returns a delta that can alter the amounts settled for the swap. The exact pricing or fill logic cannot be determined from the bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee. No fee-setting function was decoded, though the return delta could in principle affect effective amounts.
- Owner & admin controls
- No admin controls found. No owner, pause or upgrade selectors were decoded, but this is not conclusive without source.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is enabled so the hook can run custom logic before each swap, and beforeSwapReturnDelta is enabled so that logic can return a delta that changes the swap's settlement.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: Without admin functions decoded, no privileged key is evident, but the hook's state and delta logic cannot be confirmed as non-privileged from bytecode alone.
Risk to user funds: The hook can change settlement amounts through its return delta, so it can in principle move or retain pool and trader funds on each swap. The exact magnitude and conditions are not determinable from this bytecode.
Security findings
- [medium] Return delta can alter swap settlement: beforeSwapReturnDelta lets the hook change the amounts a swap settles, so the hook can take or give tokens on each swap. Its exact effect depends on logic that cannot be read without source.
- [medium] Unverified source: No verified source is available, so the logic behind the swap delta and the storage writes can only be partly inferred from decoded selectors and slots.
- [low] Stateful beforeSwap writes: beforeSwap writes to storage slots 0, 1, 3 and 4, so swap behaviour may depend on state that changes over time and can differ between swaps.
Contract details
- Verified source
- No
- Bytecode size
- 2,064 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta