Likely custom pricing hook on Celo
Uniswap v4 Hook Contract 0x6d3822141d979cf753e915f2ad511dd389870088 on Celo · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 6
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A Uniswap v4 hook that runs a custom check before each swap and can pause the pool, with an owner-controlled per-pool fee setter and a generic execute function; the exact pricing logic cannot be determined without source.
This read was written for the hook 0x361e…c088 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Runs a custom routine in beforeSwap, the only swap-related callback enabled, which may modify the swap delta via return-delta permissions
- Maintains a pause flag (setPaused) that can gate hook activity; a paused() view exposes its state
- Provides setPoolFee(bytes32,uint24) so an owner-level role can set a fee for a registered pool id
- Includes a generic execute(address,uint256,bytes) entry point that performs arbitrary external calls, likely for owner-directed operations
- Stores pool registration state (isPoolRegistered, pools, allPools, getPoolCount) and an owner address, suggesting it manages a set of pools
- Exposes an unlockCallback and a poolManager reference, indicating it interacts with the PoolManager flash accounting
- Swap behaviour
- beforeSwap is a nonpayable function that executes custom logic on every swap in the pool; with beforeSwapReturnDelta enabled it can alter the amounts exchanged. The exact logic cannot be determined from decoded bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Owner-settable per-pool fee via setPoolFee(bytes32,uint24); the fee is applied through the hook's custom logic, and the exact mechanism cannot be confirmed without source.
- Owner & admin controls
- An owner address (setOwner, owner) can set pool fees, pause or unpause the hook (setPaused), change a stored address (bfb1482a, likely a registry or config reference), and call execute to make arbitrary external calls. Upgradeability was not confirmed.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap runs the custom swap logic; beforeSwapReturnDelta lets the hook return a delta that changes the swap's amounts, so it can take or give tokens during a swap.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key controls pool fees, pausing, an address setting, and arbitrary calls via execute, so a compromised or malicious owner could extract value or block trading.
Risk to user funds: The hook can take a share of swap amounts through return deltas and may hold or move funds via execute; the extent depends on the unverified logic and on what the hook holds.
Security findings
- [high] Owner can set arbitrary pool fees: setPoolFee accepts any uint24 value for a pool id; without bounds in the logic, an owner could set a very high fee and extract value from swappers. Bounds could not be verified.
- [high] Generic execute function: execute(address,uint256,bytes) lets the owner-controlled role make arbitrary calls with value. If the hook holds tokens or ETH, or has approvals, this can drain them. Access control on execute could not be confirmed.
- [medium] Pausable swap path: A setPaused flag is read by the swap-related view functions; if beforeSwap checks it, the owner can block swaps in the pool.
- [medium] Return-delta swap modification: beforeSwapReturnDelta allows the hook to take part of the swap amounts. Combined with owner control, this can shift value from users to the hook owner.
- [info] No verified source: Without source, the exact bounds, access checks and upgrade mechanism cannot be verified, so the assessment rests on decoded selectors and storage layout.
Contract details
- Verified source
- No
- Bytecode size
- 21,960 bytes
- Upgradeable proxy
- No
- Detected patterns
- pausable, return-delta
Pools using Likely custom pricing hook
- cUSD3pool-f / USDT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- cUSD3pool-f / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today