Likely custom pricing hook on Polygon
Uniswap v4 Hook Contract 0xa3181152f232f3ef123465d6ed540cd65a0c4088 on Polygon · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 312
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A pausable, owner-managed hook that intercepts swaps and takes over their accounting through return deltas, apparently routing them against V2-style liquidity, with an owner-set per-pool fee and an arbitrary-call function.
How it works step by step
- Intercepts swaps in beforeSwap and returns a delta, so the hook rather than the pool's own liquidity determines the swap amounts.
- Keeps a registry of pools (allPools, getPoolCount, pools(bytes32)) that appears to be filled in when a pool is created, since the bytecode exposes an afterInitialize function with a pool-registry style signature, although afterInitialize is not an enabled permission.
- Exposes constants such as BPS, V2_FEE_DEN, DEFAULT_TICK_SPACING, SQRT_PRICE_1_1 and a weth address, which suggests V2-style fee math and WETH handling.
- Lets the owner set a fee per pool through setPoolFee(bytes32,uint24) and also holds a default fee in a uint24 storage slot.
- Contains unlockCallback, so it takes part in the pool manager's unlock flow, and an owner-only execute(address,uint256,bytes) call function.
- Swap behaviour
- beforeSwap is nonpayable and reads the owner/pause slot, the paused flag and the pool mapping. While paused it most likely reverts, though the exact branch cannot be confirmed from the bytecode. Otherwise it returns a delta that replaces the normal pool swap. The hook's exact pricing source cannot be determined without source.
- Liquidity behaviour
- No liquidity callbacks are enabled. The add and remove liquidity functions present in the bytecode are view-only stubs of the standard hook interface and are not called by the pool manager because their permissions are off.
- Fee behaviour
- Fees are set by the hook rather than the pool's static fee: a per-pool fee that the owner can change with setPoolFee, plus a default fee that appears to be written by a separate nonpayable function (selector 0xbefa61d5). Because the hook takes over swap accounting via return deltas, any fee is applied inside the hook. Where the fee goes cannot be determined from the bytecode.
- Owner & admin controls
- A single owner (setOwner, owner) can transfer ownership, pause or unpause the hook (setPaused), change per-pool fees (setPoolFee) and probably the default fee, and call execute(address,uint256,bytes) to make arbitrary external calls. A function with selector 0xbfd3da96 (address,uint256,bytes) writes to storage slot 5, and 0x8ec6cd0d (address) is also nonpayable and unnamed, but their purposes cannot be determined. No upgrade proxy pattern was identified.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to intercept each swap and apply the hook's own pricing and fee logic. beforeSwapReturnDelta lets the hook return a delta that takes over the swap's token amounts.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: The owner can pause swaps, change pool fees, transfer ownership and perform arbitrary calls from the hook's address, so users depend fully on the owner acting honestly.
Risk to user funds: Because the hook settles swaps via return deltas, uses unlockCallback and has an arbitrary-call function, it can likely hold and move tokens during swaps. Pausing can block swaps. Whether funds remain in the hook between swaps cannot be determined from the bytecode.
Security findings
- [high] Arbitrary call function: execute(address,uint256,bytes) is nonpayable and reads the owner slot, so the owner can make the hook call any contract with any data. Any tokens or approvals held by the hook could be moved this way.
- [medium] Hook controls swap amounts via return deltas: beforeSwapReturnDelta is enabled, so the hook can take or give tokens during a swap and bypass the pool's normal pricing. Correctness depends entirely on unverified code.
- [medium] Owner can change fees per pool: setPoolFee(bytes32,uint24) is owner-gated and no upper bound could be confirmed from the decoded bytecode, so fees could potentially be raised to a very high level.
- [medium] Pause can block swaps: setPaused writes a flag that beforeSwap reads, so the owner can halt swaps through pools using this hook.
- [info] Unverified source: No verified source is available, so the unnamed functions (0x0aa87769, 0x8ec6cd0d, 0xbfd3da96, 0xbefa61d5, 0xa7d6d0a0) and the fee destination could not be interpreted.
Contract details
- Verified source
- No
- Bytecode size
- 18,093 bytes
- Upgradeable proxy
- No
- Detected patterns
- pausable, return-delta
Pools using Likely custom pricing hook
- MMF / MEERKAT-LP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / MEERKAT-LP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / RLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RLP / RADIO (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / DMM-LP USDC-WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RLP / miMATIC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / GLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- SDEX / SDEX-LP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- DINO / DINO-V2 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- GLP / DAI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / DMM-LP USDC-WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- POL / RLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RAI / DMM-LP RAI-USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RADIO / RLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- MEERKAT-LP / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RADIO / RLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / GLP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / MEERKAT-LP (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- MEERKAT-LP / WBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- GLP / GFI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today