PangeaFeeHookV4
RobinhoodPangeaFeeHookV4 is a Uniswap v4 hook on Robinhood Chain. Runs code on every swap. Can take tokens from swaps. Gates who can add liquidity. Runs at pool creation.
- Contract name
- PangeaFeeHookV4
How this hook works
Token launcherPangea lets anyone launch a token. Every trade in a Pangea pool pays an extra fixed fee in ETH or BNB, which goes to the token creator.
Extra fee on every trade
On top of the normal pool fee, each trade pays a fixed fee in ETH or BNB. The token creator’s own first buy is free.
The code that does this (beforeSwap):function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { PoolId id = key.toId(); Config memory c = configs[id]; if (!c.registered) revert NotRegistered(); // Exact-in specifies the input; exact-out specifies the output. bool exactIn = params.amountSpecified < 0; Currency specified = exactIn ? (params.zeroForOne ? key.currency0 : key.currency1) : (params.zeroForOne ? key.currency1 : key.currency0); Currency quote = c.quoteIsCurrency0 ? key.currency0 : key.currency1; // The quote is on the other side this time; afterSwap will catch it. if (Currency.unwrap(specified) != Currency.unwrap(quote)) { return (IHooks.beforeSwap.selector, toBeforeSwapDelta(0, 0), 0); } // The dev buy pays nothing. Read only here, where a fee would otherwise be charged. if (_free(sender)) return (IHooks.beforeSwap.selector, toBeforeSwapDelta(0, 0), 0); // Exact-in names the gross amount; exact-out names the net one and the pool pays the fee // on top of it. uint256 amount = uint256(exactIn ? -params.amountSpecified : params.amountSpecified); uint256 fee = _fee(amount, c.feeBps, !exactIn); if (fee == 0) return (IHooks.beforeSwap.selector, toBeforeSwapDelta(0, 0), 0); // …The token creator gets paid
Fees build up for each pool, and anyone can trigger the payout to the token creator’s wallet.
Locked-down liquidity
Only approved addresses can add liquidity, so nobody can mess with the launch.
The code that does this (beforeAddLiquidity):function beforeAddLiquidity(address sender, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata) external view returns (bytes4) { if (sender != locker && !isLiquidityAdder[sender]) revert OnlyLocker(sender); return IHooks.beforeAddLiquidity.selector; }
Who controls it: The hook developer (Pangea) can approve who adds liquidity and add new launchers. It can’t change the fee or the receiver of a pool that already exists. The code itself can’t be changed.
What do these labels mean? This hook’s code works like PangeaFeeHook (same design, possibly different settings or names), so this is that contract’s description.
What it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
Across all its pools, the hook took its fee from a trade: $0.0100.
- Took its fee from a trade 1 time, worth $0.0100
Latest transactions
- 0xf834e86e…305217 block 112,760,123 · 0.00000498 ETH
Settings changes: set up a new launch (5 times).
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it. Dollar values count the amounts paid in ETH, stablecoins, BNB and BTC, at today’s prices.