GweiFunFeeHook
EthereumGweiFunFeeHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Still in use: 6 trades in the last week, and 3 new pools this week.
- Contract name
- GweiFunFeeHook
How this hook works
Trading taxA trading tax hook. It takes a tax on trades, limits trading to stop bots and keeps rewards to claim.
Takes a tax on trades
On top of the normal pool fee, it keeps part of each trade as a tax. Buys and sells can be charged differently. The tax can be changed. The tax builds up in the hook until it is collected.
The code that does this (beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal override returns (bytes4 selector, BeforeSwapDelta delta, uint24 feeOverride) { selector = IHooks.beforeSwap.selector; delta = BeforeSwapDeltaLibrary.ZERO_DELTA; feeOverride = 0; PoolId poolId = key.toId(); FeeTerms storage terms = _terms[poolId]; if (!terms.active || isFeeExempt[sender]) return (selector, delta, feeOverride); // Token is currency0: 0->1 sells it. Token is currency1: 0->1 buys it. bool isBuy = terms.tokenIsZero != params.zeroForOne; (uint256 allBips, uint256 protocolBips) = HookFeeMath.feeRates(terms, isBuy, block.timestamp); if (allBips == 0) return (selector, delta, feeOverride); (Currency charged, uint256 size) = _specifiedCurrencyAndAmount(key, params); uint256 charge = HookFeeMath.feeAmount(size, allBips); if (charge == 0) return (selector, delta, feeOverride); (uint256 toPayee, uint256 toBuyback) = HookFeeMath.splitFee(charge, allBips, protocolBips, terms.creatorCutBips); _accrue(terms.payee, charged, toPayee, toBuyback); emit LevyTaken(poolId, charged, toPayee, toBuyback, isBuy); delta = toBeforeSwapDelta(charge.toInt128(), 0); }Limits on trading
It limits trading, for example a max buy or wallet size or a wait between trades, to stop bots grabbing the supply before real traders.
The code that does this (feeRates):function feeRates(FeeTerms storage terms, bool isBuy, uint256 nowTs) internal view returns (uint256 allBips, uint256 protocolBips) { protocolBips = terms.protocolFeeBips; uint256 directional = isBuy ? terms.buyLevyBips : terms.sellLevyBips; allBips = protocolBips + directional + decayedAntiSnipeTax(terms, nowTs); // Second line of defence behind the check made when terms are stored. if (allBips > HARD_CAP_BIPS) { allBips = HARD_CAP_BIPS; if (protocolBips > HARD_CAP_BIPS) protocolBips = HARD_CAP_BIPS; } }Rewards to claim
It keeps track of what people have earned, and they claim it themselves.
The code that does this (claimCreatorFees):function claimCreatorFees(Currency[] calldata currencies, address to) external nonReentrant returns (uint256[] memory paid) { if (to == address(0)) revert NullAddress(); uint256 n = currencies.length; paid = new uint256[](n); bool any; mapping(Currency => uint256) storage mine = creatorFeesOwed[msg.sender]; for (uint256 i = 0; i < n; ++i) { Currency c = currencies[i]; uint256 due = mine[c]; if (due != 0) { mine[c] = 0; paid[i] = due; any = true; emit CreatorPayout(to, c, due); } } _redeemClaims(any, currencies, paid, to); }Anyone can trigger payouts
Anyone can send the collected fees on to where they go, so nobody has to wait on the hook developer.
The code that does this (sweepBuybackFees):function sweepBuybackFees(Currency[] calldata currencies) external nonReentrant returns (uint256[] memory sent) { address engine = launchpad.buyback(); if (engine == address(0)) revert NullAddress(); uint256 n = currencies.length; sent = new uint256[](n); bool any; for (uint256 i = 0; i < n; ++i) { Currency c = currencies[i]; uint256 due = buybackFeesOwed[c]; if (due != 0) { buybackFeesOwed[c] = 0; sent[i] = due; any = true; emit BuybackForwarded(c, due); } } _redeemClaims(any, currencies, sent, engine); }
Who controls it: The hook developer can change who pays no fee. The hook developer can also change: terms writer. The pool creator can change the wallets that receive its fees and the tax. Control can be passed on or given up. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditWhat 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 a levy: $1.77.
- Took a levy 6 times, worth $1.77
Latest transactions
- 0x1fa47bf4…6d1ddd block 26,445,316 · 52.8k GWEI
- 0x67d1c65a…3b6b95 block 26,445,313 · 53.9k GWEI
- 0x2efdce9d…7b8edd block 26,445,310 · 4 times in this transaction
- Stored the terms 3 times
Latest transactions
- 0xcff74468…08ede3 block 26,445,324
- 0xb1fbdf03…6caec5 block 26,445,319
- 0xf1bfbc4b…3ab193 block 26,445,309
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.
Pools
3 totalOnly pools with liquidity we could value are listed here: 1 of 3. See all, newest first.