AlgebraIntegralAggregator
BaseAlgebraIntegralAggregator is a Uniswap v4 hook on Base. Brand new: its first pool went live today. Still in use: 3 trades in the last week, and 31 new pools this week.
- Contract name
- AlgebraIntegralAggregator
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, stops liquidity being added directly and only lets approved callers create pools.
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 (algebraSwapCallback):function algebraSwapCallback(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 = _getTransientExpectedPool(); if (expectedPool == address(0)) revert CallbackOutsideActiveSwap(); if (msg.sender != expectedPool) revert UnauthorizedCallback(); if (poolIdToExternalPool[poolId] != msg.sender) revert UnauthorizedCallback(); PoolKey storage key = _poolKeyByExternalPool[msg.sender]; Currency tokenOwed; uint256 amountOwed; if (amount0Delta > 0) { tokenOwed = key.currency0; // forge-lint: disable-next-line(unsafe-typecast) amountOwed = uint256(amount0Delta); // positive in this branch } else if (amount1Delta > 0) { tokenOwed = key.currency1; // forge-lint: disable-next-line(unsafe-typecast) amountOwed = uint256(amount1Delta); // positive in this branch } else { revert UnexpectedSwapOutputDelta(); } if (_getTransientSwapInputPaid() != 0) revert UnauthorizedCallback(); _setTransientSwapInputPaid(amountOwed); poolManager.take(tokenOwed, msg.sender, amountOwed); }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 sender, PoolKey calldata key, uint160) internal virtual override returns (bytes4) { _registerPool(sender, key); emit AggregatorPoolRegistered(key.toId()); pollTokenJar(); return IHooks.beforeInitialize.selector; }
Who controls it: The hook developer can call: add source. Control can be passed on or given up. 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 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: $33.75.
- Handled a trade 4 times, worth $33.75
Latest transactions
- 0xf402153d…af44fc block 59,929,723
- 0x0bf854cd…2b6baa block 59,928,350
- 0x8796627b…401b73 block 59,920,607
- 0xc3e31dda…c5a1db block 59,917,395
- Registered an aggregator pool 31 times
Latest transactions
- 0xbc233b43…129be8 block 59,892,741
- 0x4af82af1…adf001 block 59,892,726
- 0xd9cc4505…a293f5 block 59,892,721
- 0x45a26662…2e65b3 block 59,892,708
- 0xfc35bc31…7655fd block 59,892,703
- 0xc4ebb789…a9c73d block 59,892,689
- 0x26d34837…18a7f0 block 59,892,683
- 0x0046e296…5211aa block 59,892,678
- 0x2001ba87…cca207 block 59,892,674
- 0x32cf05a4…2af8bb block 59,892,662
Settings changes: changed the token jar (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. Dollar values count the amounts paid in ETH, stablecoins, BNB and BTC, at today’s prices.