SwapFeeHook
BaseSwapFeeHook is a Uniswap v4 hook on Base. Live for 6 days. Still in use: 36 trades in the last week, and 1 new pool this week.
- Contract name
- SwapFeeHook
Pools
1
Last new pool
6d
Code size
7,006 B
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. The fee is paid out in the same trade.
The code that does this (afterSwap):function _afterSwap( address, PoolKey calldata key, SwapParams calldata params, BalanceDelta delta, bytes calldata ) internal override returns (bytes4, int128) { bool exactInput = params.amountSpecified < 0; bool feeInCurrency0 = params.zeroForOne != exactInput; Currency feeCurrency = feeInCurrency0 ? key.currency0 : key.currency1; int256 feeSideDelta = feeInCurrency0 ? delta.amount0() : delta.amount1(); uint256 amountTraded = uint256(exactInput ? feeSideDelta : -feeSideDelta); uint256 fee = amountTraded * feePpm / FEE_DENOMINATOR; if (fee != 0) { poolManager.take(feeCurrency, feeRecipient, fee); } return (BaseHook.afterSwap.selector, int128(int256(fee))); }
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 audit1 to review5 passed8 info1 unknown
Can you sell?
iSales pay ETH to a walletEvery sale pays ETH to
feeRecipient 0xc157…d634, and the sale only goes through if that payment does. It takes the payment today: we tried it the way Uniswap makes it. Whoever holds that wallet can attach code to it later that refuses the payment, which would stop all selling. Our selling test would then fail.iRuns after every swapNo beforeSwap, so it can’t turn a trade away up front. Its code still runs after each trade, and a trade can’t go through if that code fails.
iSelling straight after buying is refusedIn pool 0x9f1a…b9a0 a sale in the same moment as the buy was refused (no reason given), but selling later went through. That is usually an anti-bot rule.
✓Honeypot check: passedA test buy and sale went through in pool 0x9f1a…b9a0. Checked 9h ago.
Fees
iCan change swap amountsIt has return-delta permissions, so it can take or add tokens in every trade (taxes, fees, burns, custom curves). Check where that value goes and who controls it.
iTrading costs about 0.0% to buy and 0.0% to sellWhere it goes: 0.0% liquidity fee to the liquidity providers · nothing to the hook itself. From the honeypot check’s test trade.
What its code allows
iThe tax can be raised, up to 0.1%The hook developer can change what the hook takes from trades, but the code never lets it go above 0.1%.
setFeePpm✓Nothing in its code can stop you selling or take your fundsWhat can change is listed above, and it is limited.
Contract
iNo owner wallet foundIt has no single owner address. Any other roles its code hands out are covered under What its code allows.
✓Code is fixedNo proxy, so the code that runs today is the code that runs tomorrow.
✓Source code publishedThe code on the block explorer matches what's deployed (contract: SwapFeeHook).
Pools
✓Pools trade in Uniswap’s appUniswap Labs approved it for routing, so its pools trade in Uniswap’s app.
Track record1 to review
!Brand newIts first pool was created 6 days ago, so it has no track record. Prefer proven hooks for a real launch.
?No audit linkedNothing in the registry. Ask the hook developer for one or review the source yourself.
What it can do
Runs code on every swap
Its code executes inside each trade in pools that use it.
Can take tokens from swaps
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
Hook history
Nothing recorded yet.
Counted from token transfers in and out of the hook. Its published code records no actions of its own.
Pools
1 totalPairCreatedTrades · 7dPool ID