Likely custom pricing hook on Base
Uniswap v4 Hook Contract 0xaaa98820463eddd636ce261b36f958c6f60c8088 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 on every swap and can take currency from the pool to adjust swap amounts, but the specific fee or pricing rule and which trades pay more or less could not be determined from the bytecode.
How it works step by step
- Implements beforeSwap, which runs before each swap on pools using this hook and can return a delta that overrides the swap amounts.
- Calls take(currency0, currency1, amount) on the PoolManager, so the hook moves pool currency itself during a swap.
- Writes to storage slots 1 and 2 in beforeSwap, so it keeps per-pool or per-swap state across swaps.
- Exposes a view function (0x8bae8817) and a state-changing function (0x8af6bc69) that writes slot 0; their purpose cannot be confirmed without source.
- Uses Panic(uint256) reverts, which indicates checked arithmetic or array bounds handling inside the hook.
- Swap behaviour
- beforeSwap is called on every swap; it updates storage in slots 1 and 2 and can take currency from the pool through the PoolManager and return a delta, so swappers may receive a different amount than the standard curve gives. The exact pricing rule cannot be determined from bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee unless the hook's returned delta changes effective amounts; no explicit fee-setting logic was identified in the decoded bytecode.
- Owner & admin controls
- No admin controls found.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to inspect each swap and return a delta that can alter swap amounts, and beforeSwapReturnDelta lets that delta modify the pool's accounting, including taking currency from the pool.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: No privileged key was identified in the decoded bytecode, so centralization risk cannot be fully assessed; any admin role would have to be read from the unverified source.
Risk to user funds: The hook can move pool currency through take during swaps and can change swap amounts via its return delta, so it can affect pool and trader funds.
Security findings
- [high] Hook takes pool currency via return delta: The hook has beforeSwapReturnDelta and calls take on the PoolManager during beforeSwap, so it can move tokens out of the pool and alter swap amounts for every trader.
- [medium] Undecoded state-changing selector: Selector 0x8af6bc69 is nonpayable and writes storage slot 0, but its purpose is not identifiable from bytecode, so its effect on balances or access cannot be verified.
- [medium] No access control evident: No owner, role or caller checks were identified in the decoded functions, so any caller path that reaches the state-changing selectors may be unrestricted.
- [info] Source unverified: The contract source is not published, so the analysis relies on decoded selectors and storage access patterns rather than readable logic.
Contract details
- Verified source
- No
- Bytecode size
- 1,110 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Likely custom pricing hook
- ETH / TRUST (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today