Likely custom pricing hook on BNB Chain
Uniswap v4 Hook Contract 0xba2c2ff8c5024d4444c29703dc8f6a5e64bc0088 on BNB Chain · 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 adjust the swap's amounts through a return delta, but its exact pricing and fee behaviour cannot be determined from the decoded bytecode, so which trades pay more or less is unclear.
How it works step by step
- Exposes a beforeSwap hook that can return a delta, so it can take over part of a swap's amounts instead of the pool doing the full swap
- Stores an owner-style address in slot 0 that is read by selector 0x03490c48, which also writes a bool flag in slot 1 and a uint256 in slot 2
- beforeSwap (0x575e24b4) reads and updates uint256 counters in slots 3 and 4 and reads/writes slot 5 on each swap
- View function 0xd7df98bf reads the flag and counters, suggesting a status or quote getter
- Mechanism beyond these storage writes cannot be determined without source
- Swap behaviour
- beforeSwap runs on every swap and can return a non-zero delta (beforeSwapReturnDelta is enabled), which can change the amounts the pool settles; the exact pricing or fee formula cannot be determined from decoded bytecode.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fee logic cannot be determined from decoded bytecode; the hook may adjust amounts through its return delta rather than a plain fee, so treat the pool's effective fee as unknown.
- Owner & admin controls
- Slot 0 holds an address read by selector 0x03490c48, which writes state, so a privileged role likely exists, but its scope and any upgrade path cannot be confirmed without source.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to inspect each swap and possibly alter its settled amounts; beforeSwapReturnDelta lets the hook's returned delta modify the swap's token amounts.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A key holding the slot 0 role could likely change the flag and counters that affect swap behaviour, potentially redirecting or altering swap amounts.
Risk to user funds: Because the hook can return deltas in beforeSwap, it can in principle affect the tokens exchanged in each swap; the exact extent of user or pool funds it can move is unknown.
Security findings
- [high] Return delta on swaps: beforeSwapReturnDelta is enabled, so the hook can take or give tokens on every swap; the magnitude and conditions cannot be verified without source.
- [medium] Privileged setter: Selector 0x03490c48 writes a bool and a uint256 while reading an address from slot 0, indicating an access-gated state change that could alter swap behaviour.
- [medium] Unverified source: No verified source is available, so the logic governing the return delta cannot be audited.
Contract details
- Verified source
- No
- Bytecode size
- 2,254 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta