UniV3FeeAggregator
ArbitrumHookUniV3FeeAggregator is a Uniswap v4 hook on Arbitrum. Live for 4 days. Still in use: 33 trades in the last week, and 12 new pools this week.
- Contract name
- UniV3FeeAggregator
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, limits some actions to approved addresses and stops liquidity being added directly.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. It can never be above 0.05%. The fee is paid out in the same trade.
The code that does this (uniswapV3SwapCallback):function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external override { (PoolId poolId, bool isQuote) = abi.decode(data, (PoolId, bool)); if (isQuote) revert QuoteRevert(amount0Delta, amount1Delta); address expectedPool = _transientExpectedPool(); if (expectedPool == address(0)) revert CallbackOutsideActiveSwap(); if (msg.sender != expectedPool) revert UnauthorizedCallback(); if (poolIdToExternalPool[poolId] != msg.sender) revert UnauthorizedCallback(); PoolKey storage canonical = _canonicalPoolKeyByAddress[msg.sender]; address tokenOwed; uint256 owedAmt; if (amount0Delta > 0) { tokenOwed = Currency.unwrap(canonical.currency0); owedAmt = uint256(amount0Delta); } else if (amount1Delta > 0) { tokenOwed = Currency.unwrap(canonical.currency1); owedAmt = uint256(amount1Delta); } else { revert UnexpectedSwapOutputDelta(); } _setTransientSwapInputPaid(owedAmt); poolManager.take(Currency.wrap(tokenOwed), msg.sender, owedAmt); }Approved addresses only
Some actions are limited to addresses on an approved list.
The code that does this (beforeInitialize):function _beforeInitialize(address, PoolKey calldata key, uint160) internal override returns (bytes4) { if (key.currency0.isAddressZero() || key.currency1.isAddressZero()) revert NativeCurrencyNotSupported(); if (key.fee != LPFeeLibrary.DYNAMIC_FEE_FLAG) revert ExternalPoolMismatch(); address token0 = Currency.unwrap(key.currency0); address token1 = Currency.unwrap(key.currency1); address poolAddr = pairPool[token0][token1]; if (poolAddr == address(0)) revert ExternalPoolNotFound(); if (!isAllowedExternalPool[poolAddr]) revert ExternalPoolNotAllowed(); if (IUniswapV3Pool(poolAddr).token0() != token0 || IUniswapV3Pool(poolAddr).token1() != token1) { revert ExternalPoolMismatch(); } if (IUniswapV3Pool(poolAddr).tickSpacing() != key.tickSpacing) revert ExternalPoolMismatch(); PoolKey storage existing = _canonicalPoolKeyByAddress[poolAddr]; if (address(existing.hooks) != address(0)) revert PairAlreadyHasCanonicalPool(existing.toId()); _canonicalPoolKeyByAddress[poolAddr] = key; poolIdToExternalPool[key.toId()] = poolAddr; _initializedPools.push(key); emit AggregatorPoolRegistered(key.toId()); return IHooks.beforeInitialize.selector; }Liquidity can’t be added directly
Nobody can add liquidity to its pools through Uniswap directly. Liquidity only comes in through the hook’s own code.
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, PoolKey calldata key, uint160) internal override returns (bytes4) { if (key.currency0.isAddressZero() || key.currency1.isAddressZero()) revert NativeCurrencyNotSupported(); if (key.fee != LPFeeLibrary.DYNAMIC_FEE_FLAG) revert ExternalPoolMismatch(); address token0 = Currency.unwrap(key.currency0); address token1 = Currency.unwrap(key.currency1); address poolAddr = pairPool[token0][token1]; if (poolAddr == address(0)) revert ExternalPoolNotFound(); if (!isAllowedExternalPool[poolAddr]) revert ExternalPoolNotAllowed(); if (IUniswapV3Pool(poolAddr).token0() != token0 || IUniswapV3Pool(poolAddr).token1() != token1) { revert ExternalPoolMismatch(); } if (IUniswapV3Pool(poolAddr).tickSpacing() != key.tickSpacing) revert ExternalPoolMismatch(); PoolKey storage existing = _canonicalPoolKeyByAddress[poolAddr]; if (address(existing.hooks) != address(0)) revert PairAlreadyHasCanonicalPool(existing.toId()); _canonicalPoolKeyByAddress[poolAddr] = key; poolIdToExternalPool[key.toId()] = poolAddr; _initializedPools.push(key); emit AggregatorPoolRegistered(key.toId()); return IHooks.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.
Pools using it let the hook choose the swap fee instead of a fixed tier.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
Across all its pools, the hook handled a trade: $21.7k, and took its fee from a trade: $0.943.
- Handled a trade 33 times, worth $21.7k
Latest transactions
- 0x18daa5cf…a8f40b block 530,519,036
- 0xde79f89e…785b8e block 530,515,851
- 0xf5e693cc…c577d3 block 530,457,102
- 0x04aec34a…039a52 block 530,452,673
- 0xeb143993…9e5595 block 530,452,609
- 0xb3708d03…744218 block 530,452,605
- 0x8bb09c21…5c9906 block 530,452,025
- 0x6a8d00f0…6ac2bf block 530,452,014
- 0x92b12acc…d42660 block 530,451,697
- 0x66e9ef59…8607eb block 530,451,696
- Took its fee from a trade 33 times, worth $0.943
Latest transactions
- 0x18daa5cf…a8f40b block 530,519,036 · 9.23e-7 WETH
- 0xde79f89e…785b8e block 530,515,851 · 5.00e-8 WBTC
- 0xf5e693cc…c577d3 block 530,457,102 · 0.00000200 WETH
- 0x04aec34a…039a52 block 530,452,673 · 0.0669 USD₮0
- 0xeb143993…9e5595 block 530,452,609 · 0.00000702 WETH
- 0xb3708d03…744218 block 530,452,605 · 0.00000704 WETH
- 0x8bb09c21…5c9906 block 530,452,025 · 0.00000234 WETH
- 0x6a8d00f0…6ac2bf block 530,452,014 · 0.00000234 WETH
- 0x92b12acc…d42660 block 530,451,697 · 0.00000315 WETH
- 0x66e9ef59…8607eb block 530,451,696 · 0.00000236 WETH
- Registered an aggregator pool 12 times
Latest transactions
- 0xcfb37950…7f9367 block 528,999,649
- 0x0d4e8d0e…9ee6c5 block 528,999,636
- 0x61905ef1…ea52ce block 528,999,622
- 0xe0ce770f…9c6681 block 528,999,610
- 0xbddb9952…931dd8 block 528,999,608
- 0x41274cc8…9559e4 block 528,999,601
- 0x5968b7d6…1b868e block 528,999,589
- 0xc57b0521…6555cf block 528,999,578
- 0xf3bc3fca…d644b2 block 528,999,572
- 0x194c1c63…c251d5 block 528,999,566
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
12 totalOnly pools with trades in the last 7 days are listed here: 6 of 12. See all, newest first.