PangeaFeeHook on Ethereum

Uniswap v4 Hook Contract 0x405d7d55d763c30cc6a714326c4cf5084241e8cc on Ethereum · Fee sharing · Verified contract

Volume (24h)
<$0.01
Value locked (TVL)
$0
All-time volume
<$0.01
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
1

What it does

Charges a fixed fee on every trade in Pangea launch pools, always taken in the quote asset so creators receive money rather than their own token, and forwards the accrued fees to a per-pool splitter.

This read was written for the hook 0x15e5…a8cc on Base 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 pools from a trusted factory with a fixed splitter, fee rate between 0.3% and 5%, quote-side flag, and range edge tick
  • Charges the fee in the quote currency on both buys and sells, using beforeSwap or afterSwap depending on which currency is specified
  • Mints the fee as ERC-6909 claims to the hook, tracked in owed, which anyone can redeem into the pool's splitter
  • Restricts liquidity additions to the locker and named adders while leaving removals unrestricted
  • Reverts swaps that would leave the pool price on the empty side of the launch range, and refuses zero-delta swaps
  • Exempts only the immutable devBuyer address from fees
Swap behaviour
On every swap, if the quote asset is the specified currency the fee is taken in beforeSwap, otherwise it is taken in afterSwap. The fee is a percentage of the gross quote amount, grossed up for exact-out swaps. The devBuyer address pays no fee. Swaps that would move the price beyond the launch range edge revert, and partial fills of fee-charged swaps revert.
Liquidity behaviour
Only the immutable locker address, or addresses the factoryAdmin has explicitly allowed, may add liquidity; beforeAddLiquidity reverts for everyone else. Removals are not intercepted by the hook (beforeRemoveLiquidity is not enabled), so positions can be withdrawn normally.
Fee behaviour
Charges a fixed fee of feeBps (30 to 500 bps, set per pool at registration and immutable) on the quote-asset side of every swap, using beforeSwap for exact-in buys and exact-out sells and afterSwap for exact-in sells and exact-out buys, grossing up exact-out amounts. Fees are minted as ERC-6909 claims owed to the hook and later redeemed to the pool's splitter by anyone. The pool's own fee must be zero. The devBuyer address is exempt from fees.
Owner & admin controls
The factoryAdmin (initially the deployer, handed off via setFactoryAdmin) can add new factories via addFactory (append-only, never removed) and name extra liquidity adders via setLiquidityAdder; it cannot change registered pool configs, fees, splitters, or edge ticks. No pause, no upgrade proxy, no owner over the swap path.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: refuses pools not registered by a factory and enforces that the pool opens on the correct side of the registered edge tick. beforeAddLiquidity: restricts liquidity additions to the locker and allowed adders. beforeSwap: takes the quote-side fee as a minted claim when the quote is the specified currency. afterSwap: enforces the range edge (price may not leave the launch range) and takes the quote-side fee when the quote is unspecified. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take fees as deltas from the swap.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The factoryAdmin cannot alter existing pools, fees, splitters, or user funds. It can add factories that open new pools and name additional liquidity adders, which could let the named adder's liquidity fill swaps without the hook fee on its part of the fill. The deployer-held key is the same as the admin key until handed off.

Risk to user funds: The hook holds no user funds directly; fees accumulate as ERC-6909 claims in the PoolManager and are redeemed to splitters. The hook can take up to the configured fee on each swap and can revert swaps that exit the range or partially fill, but cannot withdraw LP principal or redirect fees.

Security findings

  • [medium] Shared hook is a single point of failure: Every swap in every pool served by this hook passes through its code. A bug or a revert in beforeSwap or afterSwap would block trading across all Pangea launches, since the hook cannot be replaced per pool.
  • [low] Swaps can revert on range edge or partial fill: afterSwap reverts if the pool tick moves beyond the registered edge, and beforeSwap charges fees on the requested amount. A swap that cannot fill fully is refused with PartialFill, so partial-fill behaviour depends on exact arithmetic matching between beforeSwap and afterSwap.
  • [low] Admin can extend the set of factories and liquidity adders: The factoryAdmin can add arbitrary factories and allowed liquidity adders. Those adders' resting liquidity fills swaps without the hook fee on their share, and factories can register new pools with their own splitter and fee within bounds.
  • [info] No upgradeability: Immutable locker, devBuyer, deployer, and poolManager addresses are fixed in bytecode; no proxy or upgrade mechanism is present.

Contract details

Verified source
Yes (PangeaFeeHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
9,449 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using PangeaFeeHook