TaxMintHook
BaseTaxMintHook is a Uniswap v4 hook on Base. Brand new: its first pool went live today. Still in use: 44 trades in the last week, and 1 new pool this week.
- Contract name
- TaxMintHook
How this hook works
Trading taxA trading tax hook. It takes a tax on trades and only lets approved callers create pools.
Takes a tax on trades
On top of the normal pool fee, it keeps part of each trade as a tax. It can never be above 10%. The tax is paid out in the same trade.
The code that does this (beforeSwap):function _beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal override returns (bytes4, BeforeSwapDelta, uint24) { if (PoolId.unwrap(key.toId()) != PoolId.unwrap(POOL_ID)) revert WrongPool(); bool exactInput = params.amountSpecified < 0; if (params.zeroForOne != exactInput) { return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); } uint256 ethLeg = exactInput ? uint256(-params.amountSpecified) : uint256(params.amountSpecified); uint256 take = _takeEth(ethLeg, params.zeroForOne); uint256 expected = exactInput ? ethLeg - take : ethLeg + take; assembly ("memory-safe") { tstore(EXPECTED_SLOT, expected) } return (this.beforeSwap.selector, toBeforeSwapDelta(take.toInt128(), 0), 0); }Only approved callers create pools
New pools with this hook can only be created by approved callers, for example its own factory or launcher.
The code that does this (beforeInitialize):function _beforeInitialize(address sender, PoolKey calldata, uint160) internal view override returns (bytes4) { if (sender != LOCKER) revert NotLockerInit(); return this.beforeInitialize.selector; }
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.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Took 44 times
Latest transactions
- 0x78a161ac…c46bfe block 58,734,181
- 0x72d881a7…10e802 block 58,734,157
- 0x8361c4e0…cd47e4 block 58,734,135
- 0x085a6aaa…69d54b block 58,734,098
- 0x4eea9784…07e8bd block 58,733,077
- 0x7effc8cf…9d8561 block 58,733,013
- 0xae117268…82dee7 block 58,732,998
- 0x3d61f251…82cbbb block 58,732,985
- 0x134cf705…e90f0d block 58,732,201
- 0x0bc107d2…b3b9f3 block 58,732,086
- Launched a new token 1 time
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.