HappiUniswapV4Hook
RobinhoodHappiUniswapV4Hook is a Uniswap v4 hook on Robinhood Chain. Runs code on every swap. Can take tokens from swaps. Runs at pool creation.
- Contract name
- HappiUniswapV4Hook
How this hook works
Token launcherThe hook for Happi meme coin launches. It takes a fee (and the token’s tax, if set) from every trade, turns any part paid in the meme coin into the main currency, and splits it between the platform, the token creator and a market-making vault.
Fee and tax on every trade
Each trade pays the hook’s fee plus, if the token has one, its tax. It’s taken from whichever side comes out of the trade.
The code that does this (_computeAndTakeFee):function _computeAndTakeFee(bytes32 poolId, address feeCurrency, uint256 unspecified) internal returns (uint256 totalAmount) { LaunchInfo memory info = launches[poolId]; if (!info.registered) return 0; if (info.hookFeeBps == 0 && info.creatorTaxBps == 0) return 0; if (unspecified == 0) return 0; uint256 feeAmount = (unspecified * info.hookFeeBps) / BASIS_POINTS; uint256 taxAmount = (unspecified * info.creatorTaxBps) / BASIS_POINTS; totalAmount = feeAmount + taxAmount; if (totalAmount == 0) return 0; _takeFromManager(feeCurrency, totalAmount); if (feeAmount != 0) pendingFees[poolId][feeCurrency] += feeAmount; if (taxAmount != 0) pendingCreatorTax[poolId][feeCurrency] += taxAmount; emit HookFeeCollected(poolId, feeCurrency, feeAmount, taxAmount); }Converted to the main currency
Fees collected in the meme coin are sold inside the pool for the main currency (like ETH), with a limit on how much that can move the price.
The code that does this (_convertPendingMemecoin):function _convertPendingMemecoin(bytes32 poolId, LaunchInfo memory info, uint256 minConversionQuoteOut) private returns (uint256 feeQuoteOut, uint256 taxQuoteOut, bool converted) { uint256 feePending = pendingFees[poolId][info.memecoin]; uint256 taxPending = pendingCreatorTax[poolId][info.memecoin]; uint256 totalPending = feePending + taxPending; if (totalPending == 0) return (0, 0, false); if (minConversionQuoteOut == 0) revert MinimumOutputRequired(); pendingFees[poolId][info.memecoin] = 0; pendingCreatorTax[poolId][info.memecoin] = 0; (uint256 consumed, uint256 quoteOut) = _executeInternalSwap(poolId, totalPending); if (consumed == 0) { pendingFees[poolId][info.memecoin] += feePending; pendingCreatorTax[poolId][info.memecoin] += taxPending; emit PoolConversionSkipped(poolId, totalPending); return (0, 0, false); } converted = true; uint256 feeConsumed = FullMath.mulDiv(consumed, feePending, totalPending); uint256 taxConsumed = consumed - feeConsumed; feeQuoteOut = FullMath.mulDiv(quoteOut, feeConsumed, consumed); taxQuoteOut = quoteOut - feeQuoteOut; pendingFees[poolId][info.memecoin] += feePending - feeConsumed; pendingCreatorTax[poolId][info.memecoin] += taxPending - taxConsumed; }Split three ways
The money is shared between the platform, the token creator and, where set up, a market-making vault that supports trading in the token.
The code that does this (_distribute):function _distribute(bytes32 poolId, LaunchInfo memory info, uint256 totalQuote, uint256 taxQuote) private { uint256 protocolAmount = (totalQuote * info.protocolFeeShareBps) / BASIS_POINTS; uint256 mmAmount = info.mmVault == address(0) ? 0 : (totalQuote * info.mmFeeShareBps) / BASIS_POINTS; // The MM cut and protocol cut are bounded below BASIS_POINTS together // at registration, so this never underflows. The creator tax still // bypasses the split and is paid in full. uint256 creatorAmount = totalQuote - protocolAmount - mmAmount + taxQuote; _payOut(info.creator, info.quoteToken, creatorAmount); _payOut(info.protocolFeeRecipient, info.quoteToken, protocolAmount); // The vault needs liquid funds to trade, so route its share directly to // it rather than crediting the claim-based escrow. if (mmAmount != 0) _payToVault(info.mmVault, info.quoteToken, mmAmount); emit PoolFeesSwept(poolId, protocolAmount, creatorAmount); if (mmAmount != 0) emit PoolMMFeeRouted(poolId, info.mmVault, mmAmount); }
Who controls it: The hook developer (Happi) can change the hook fee, the platform’s share and wallet, and the price-impact limit, and can’t give up ownership. The launch factory can change a token creator’s payout wallet. The code itself can’t be changed.
What do these labels mean? Based on the hook’s published code.
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 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: $2.48.
- Took its fee from a trade 18 times, worth $2.48
Latest transactions
- 0x4d226225…9b3da8 block 112,105,087 · 0.0000863 ETH
- 0x43fadf85…654aae block 112,103,310 · 0.0000953 ETH
- 0xc2b6ff72…bb1212 block 112,103,008 · 0.0000340 ETH
- 0x949fa727…f165b2 block 112,102,700 · 0.0000350 ETH
- 0x4a69bbc7…45308a block 112,102,408 · 0.000112 ETH
- 0xf0217fea…e1ee39 block 112,102,105 · 0.0000398 ETH
- 0xbe2cfc56…4d88f0 block 112,097,185 · 0.0000863 ETH
- 0x47738513…4d1622 block 112,095,420 · 0.0000953 ETH
- 0x34f8cf72…7b3a2a block 112,095,131 · 0.0000340 ETH
- 0x8ee7e8bf…1c4f63 block 112,094,821 · 0.0000350 ETH
- A new token launched 3 times
Latest transactions
- 0x37d822fd…f58114 block 112,102,083
- 0xa13965ea…74808b block 112,094,195
- 0xeb28ec0a…df9579 block 112,071,503
- Paid out collected fees 3 times
Latest transactions
- 0xaa3c3abf…7457bc block 112,108,212
- 0xe2a20a3c…57f04f block 112,099,250
- 0xf478d194…887eb6 block 112,081,026
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.