AlgebraIntegralAggregator
BSCAlgebraIntegralAggregator is a Uniswap v4 hook on BSC. Brand new: its first pool went live today.
- 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
- Registered an aggregator pool 11 times
Latest transactions
- 0x3ea6bd82…0ad1dc block 134,676,252
- 0x1def5f8c…26b4e8 block 134,676,250
- 0xd431325e…a611e8 block 134,676,246
- 0xfd57988f…0adec7 block 134,676,243
- 0x381d48c8…149008 block 134,676,238
- 0x652cb479…ecfbb5 block 134,676,234
- 0x7eb85f0e…2ea8b5 block 134,676,229
- 0x59206652…ff5e0a block 134,676,224
- 0xf802f2bc…76a7aa block 134,676,218
- 0x18704861…bd25f0 block 134,676,216
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.