DonationFeeHook
EthereumHookDonationFeeHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Active: 227 trades in the last week, and 1 new pool this week.
- Contract name
- DonationFeeHook
How this hook works
Trading taxA trading tax hook. It takes 2% of every trade.
Takes 2% of every trade
On top of the normal pool fee, it takes 2% of each trade. The rate is written into the code. The fee is paid out in the same trade.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { if (Currency.unwrap(key.currency0) != address(0)) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); uint256 fee; if (params.zeroForOne && params.amountSpecified < 0) { // Buy with an exact ETH amount: 2% of what the buyer pays. fee = uint256(-params.amountSpecified) * FEE_BPS / BPS; } else if (!params.zeroForOne && params.amountSpecified > 0) { // Sell for an exact ETH amount: the pool pays out enough that the fee is 2% of the gross. fee = uint256(params.amountSpecified) * FEE_BPS / (BPS - FEE_BPS); } if (fee == 0) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); _send(key.currency0, fee, params.zeroForOne); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0); }
Who controls it: Nobody. The hook has no admin functions, and 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.
Hook history
- Passed on the fees it had collected 273 times
Latest transactions
- 0xdf53212b…40ce73 block 26,550,575
- 0x9db8a05f…03752d block 26,550,574
- 0x3274bad7…cf27df block 26,550,572
- 0x42709e3a…82c67e block 26,550,572
- 0x2b194eac…70f10c block 26,550,570
- 0x542b9616…ab69e8 block 26,550,570
- 0xa5640144…9f3cab block 26,550,568
- 0x6d1e75c8…cb64fa block 26,550,567
- 0x95d0493c…dee151 block 26,550,567
- 0x08f54224…1017d6 block 26,550,564
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.