HappiUniswapV4Hook on Robinhood Chain
Uniswap v4 Hook Contract 0x82ed7ec0f5373c449723e0659a91c5fb99ffe044 on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A Uniswap v4 hook for graduated happi memecoin pools that takes a small swap fee and optional creator tax, then converts memecoin fees into the quote asset and distributes them to the protocol, creator, and an optional market-making vault.
This read was written for the hook 0x76ff…a044 on Robinhood Chain 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
- Charges a per-swap hook fee (default 1%, capped at 10%) plus a per-pool creator tax on the unspecified leg via afterSwap and afterSwapReturnDelta
- Records fees in pending ledgers, keeping creator tax separate from the protocol/creator split
- Converts pending memecoin fees to the quote currency through an internal swap against the pool's own liquidity, bounded by a price-impact cap
- Distributes quote-currency fees to the protocol, creator, and an optional MM vault, crediting the shared fee escrow
- Restricts pool registration and creator recipient changes to the factory and limits price-sensitive sweeps to a trusted operator
- Swap behaviour
- On every swap the hook takes hookFeeBps plus creatorTaxBps of the unspecified currency via afterSwap, returning that amount as a hook delta. Accrued memecoin-denominated fees are later converted to quote currency in batched sweeps.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Charges a per-swap hook fee of hookFeeBps (default 1%, capped at 10%) plus a per-pool creatorTaxBps on the unspecified currency leg of each swap, both snapshotted at pool registration except hookFeeBps which is frozen per launch too. Fees are split between protocol and creator via protocolFeeShareBps, with an optional MM vault share; creator tax goes entirely to the creator.
- Owner & admin controls
- Owner (Ownable2Step, renounce disabled) can set factory once, change protocolFeeShareBps (max 50%), hookFeeBps (max 10%), maxInternalPriceImpactBps, protocolFeeRecipient, and the feeSweepOperator; owner can also call rescuePoolFees to pay out pending fees directly. Factory-only functions set creator fee recipients and register pools. Owner can transfer ownership but cannot renounce.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize restricts pool initialization to the factory. afterSwap takes the fee and tax from the unspecified leg and returns it as a hook delta via afterSwapReturnDelta. No other callbacks are enabled.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can raise hookFeeBps up to 10% and protocolFeeShareBps up to 50% for future and possibly existing pools' live policy (currentFeePolicy), can redirect the protocol fee recipient, and can replace the fee sweep operator, which controls price-sensitive conversions. Owner can also rescue pending fee balances directly to the protocol and creator. Pool creators can change their own creator fee recipient via the factory.
Risk to user funds: The hook takes a percentage of the unspecified leg of every swap via return delta, so swappers pay the hook fee and creator tax on top of the pool fee, and the hook temporarily holds these tokens until distribution. The hook can also perform internal swaps against pool liquidity. The owner can raise fees within capped bounds and rescue pending balances, but cannot directly seize LP principal or block swaps.
Security findings
- [info] Owner-adjustable fee parameters: Pool fee terms are snapshotted at registration, but the owner can change protocolFeeShareBps and hookFeeBps globally; the live currentFeePolicy and sweep routing read these values, so the effective split may differ from what a launcher expected.
- [medium] Sandwich exposure on fee conversion: Internal memecoin-to-quote conversion swaps run against the pool's own liquidity with a price-impact cap measured from live spot, so a manipulated spot price can worsen execution; this is mitigated by requiring the trusted sweep operator and a caller-supplied minimum output.
- [low] Revert on oversized exact-output fee take: A large exact-output swap could make the fee take exceed the PoolManager's balance of the currency, reverting the offending swap; this is documented as a deliberate edge case rather than a loss vector.
- [medium] Owner rescue path over accrued fees: rescuePoolFees is owner-only and bypasses the fee escrow, paying out pending balances directly; a misconfigured or compromised owner key could redirect accrued fees to recipients under its control.
Contract details
- Verified source
- Yes (HappiUniswapV4Hook)
- Compiler
- solc 0.8.35+commit.47b9dedd
- Bytecode size
- 13,310 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, fee-sharing, launchpad, moves-currency, ownable, return-delta, self-unlock, tax
Pools using HappiUniswapV4Hook
- ETH / RH3 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / RH1 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today