CoalaPolygonHook on Polygon
Uniswap v4 Hook Contract 0x98289883e555693cae7a7c5b59dc3085b08920ec on Polygon · Token · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $704
- All-time volume
- $10.23K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 75
What it does
A Uniswap v4 hook for COALA launch pools that takes a fixed 1% tax on swaps that trade against the paired base asset, minting the tax to the pool manager as a claim on the hook's account.
This read was written for the hook 0xb5b8…a0ec on Arbitrum 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
- Registers a pool for a launch token paired with the fixed base asset, only callable by the factory set once by the owner.
- Charges a fixed 1% tax (BUY_TAX_BPS and SELL_TAX_BPS both 100 bps) on swaps where the specified or unspecified currency is the base asset.
- Collects the tax by minting ERC-6909 claims for the base asset to the hook inside the pool manager, reported through a return delta.
- Emits TaxCollected for each taxed swap with pool, token, sender, direction, gross amount and tax amount.
- Rejects donations and pools that were not registered, and reverts on swaps with partial fills in the after-swap check.
- Swap behaviour
- beforeSwap and afterSwap run for registered pools. Swaps touching the base asset as specified currency are taxed in beforeSwap via a specified delta; swaps where the base asset is the unspecified currency are taxed in afterSwap via an unspecified delta. Other swaps pass through with zero delta.
- Liquidity behaviour
- No liquidity callbacks. Add and remove liquidity hooks exist but only return their selectors and zero deltas.
- Fee behaviour
- Uses the pool's static fee for the LP fee, plus a hook-level fixed 1% tax taken as a return delta on base-asset-denominated amounts. The tax is minted to the hook inside the pool manager; the contract does not expose a withdrawal function in the ABI.
- Owner & admin controls
- Owner (Ownable2Step, renounce disabled) can set the factory once via setFactory and transfer ownership. Owner cannot change tax rates, which are constants, and there is no pause, upgrade proxy or fee-recipient setter in the ABI. The factory alone can register pools.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize checks the pool is registered. beforeSwap and afterSwap apply the 1% tax as return deltas. beforeDonate reverts to block donations. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take a cut of swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, high confidence).
Who controls it: The owner can set the factory once and transfer or renounce-block ownership; it cannot change fees, pause swaps, or withdraw funds based on the decoded ABI. Withdrawal of accumulated tax claims is not visible in the ABI and would require a privileged path the owner or factory may hold.
Risk to user funds: The hook does not custody user principal in the pool, but it takes 1% of base-asset swap amounts as return deltas and holds the resulting claims inside the pool manager. Swaps can revert in afterSwap if the partial-fill check fails.
Security findings
- [info] Hook takes a fixed tax via return deltas: Every registered-pool swap touching the base asset is charged 1% via beforeSwap or afterSwap return deltas. Traders pay this on every eligible swap.
- [medium] Tax claims accumulate inside the pool manager with no visible withdrawal path: _collectTax mints ERC-6909 base-asset claims to the hook. The ABI shows no function that burns or withdraws these claims, so retrieval depends on code not visible in the decoded interface. Verify how tax revenue is withdrawn.
- [low] Afterswap partial-fill check can revert swaps: afterSwap reverts with PartialFillNotSupported if the specified delta does not equal amountSpecified plus the computed tax. Unusual swap paths or rounding could cause reverts for affected trades.
- [info] Owner cannot pause or change tax rates: Tax rates are compile-time constants and no pause function appears in the ABI, which limits centralized interference with trading.
- [low] Factory is a single privileged caller: Only the factory address set once by the owner can register pools, so pool onboarding depends on that contract.
Contract details
- Verified source
- Yes (CoalaPolygonHook)
- Compiler
- solc 0.8.24+commit.e11b9ed9
- Bytecode size
- 4,878 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable, return-delta, tax
Pools using CoalaPolygonHook
- WPOL / PCAT (0.00% fee) — 24h volume $0, TVL $704, 0 swaps today