AlgebraFeeAggregator
ArbitrumHookAlgebraFeeAggregator is a Uniswap v4 hook on Arbitrum. Brand new: its first pool went live today. Still in use: 2 trades in the last week, and 12 new pools this week.
- Contract name
- AlgebraFeeAggregator
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 (algebraSwapCallback):function algebraSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external { (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 || key.tickSpacing != CANONICAL_TICK_SPACING) { 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(); 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 || key.tickSpacing != CANONICAL_TICK_SPACING) { 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(); 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: $542.68.
- Handled a trade 2 times, worth $542.68
Latest transactions
- 0x8709bbd7…fdc0e5 block 530,468,189
- 0x768d995a…db3aca block 530,464,943
- Registered an aggregator pool 12 times
Latest transactions
- 0x93272864…22119a block 530,388,281
- 0x646c92f0…5f6c35 block 530,388,255
- 0xc854e0a7…899fa7 block 530,388,206
- 0x68b47451…d88d8c block 530,388,147
- 0x21717fc3…cb47d5 block 530,388,121
- 0xc0bd69d7…691b95 block 530,388,090
- 0x2e1d676d…0638dc block 530,388,064
- 0x71b8c39a…de4f0b block 530,388,042
- 0xeb99f637…c63eb8 block 530,387,917
- 0x45b3c47e…891ad3 block 530,387,895
- Took its fee from a trade 2 times
Latest transactions
- 0x8709bbd7…fdc0e5 block 530,468,189 · 9.16e-8 wstETH
- 0x768d995a…db3aca block 530,464,943 · 0.00000154 wstETH
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.