ElfomoFiAggregator
BSCElfomoFiAggregator is a Uniswap v4 hook on BSC. Live for 1 day. Active: 83 trades in the last week, and 2 new pools this week.
- Contract name
- ElfomoFiAggregator
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 code that does this (conductSwap):function _conductSwap( Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId poolId ) internal override returns (uint256 amountSettle, uint256 amountTake, bool hasSettled) { if (params.amountSpecified >= 0) revert ExactOutputNotSupported(); if (activePair[poolId].token0 == address(0)) revert PoolNotInitialized(); amountTake = uint256(-params.amountSpecified); if (amountTake == 0) revert ZeroAmount(); uint256 grossOut; { address tokenIn = Currency.unwrap(takeCurrency); address tokenOut = Currency.unwrap(settleCurrency); poolManager.take(takeCurrency, address(this), amountTake); IERC20(tokenIn).forceApprove(elfomoSwap, amountTake); uint256 balBefore = IERC20(tokenOut).balanceOf(address(this)); IElfomoSwap(elfomoSwap).swap(tokenIn, tokenOut, int256(amountTake), 0, address(this), 0); grossOut = IERC20(tokenOut).balanceOf(address(this)) - balBefore; IERC20(tokenIn).forceApprove(elfomoSwap, 0); } if (grossOut == 0) revert ZeroOutput(); uint256 fee = feeOnOutput(grossOut); amountSettle = grossOut - fee; if (amountSettle == 0) revert ZeroOutput(); poolManager.sync(settleCurrency); // …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.fee != LPFeeLibrary.DYNAMIC_FEE_FLAG || key.tickSpacing != CANONICAL_TICK_SPACING) { revert InvalidPoolParams(); } address t0 = Currency.unwrap(key.currency0); address t1 = Currency.unwrap(key.currency1); if (!isAllowedPair[t0][t1]) revert PairNotAllowed(); PoolId pid = key.toId(); if (activePair[pid].token0 != address(0)) revert PoolAlreadyInitialized(); activePair[pid] = PairSpec({token0: t0, token1: t1}); _initializedKeys.push(key); 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.fee != LPFeeLibrary.DYNAMIC_FEE_FLAG || key.tickSpacing != CANONICAL_TICK_SPACING) { revert InvalidPoolParams(); } address t0 = Currency.unwrap(key.currency0); address t1 = Currency.unwrap(key.currency1); if (!isAllowedPair[t0][t1]) revert PairNotAllowed(); PoolId pid = key.toId(); if (activePair[pid].token0 != address(0)) revert PoolAlreadyInitialized(); activePair[pid] = PairSpec({token0: t0, token1: t1}); _initializedKeys.push(key); return IHooks.beforeInitialize.selector; }Simple trades only
Trades must state the amount going in, not the amount coming out.
The code that does this (rawQuote):function _rawQuote(bool zeroToOne, int256 amountSpecified, PoolId poolId) internal view override returns (uint256 amountUnspecified) { if (amountSpecified >= 0) revert ExactOutputNotSupported(); PairSpec memory p = activePair[poolId]; if (p.token0 == address(0)) revert PoolNotInitialized(); uint256 amountIn = uint256(-amountSpecified); if (amountIn == 0) revert ZeroAmount(); address tokenIn = zeroToOne ? p.token0 : p.token1; address tokenOut = zeroToOne ? p.token1 : p.token0; uint256 grossOut = IElfomoSwap(elfomoSwap).getAmountOut(tokenIn, tokenOut, amountIn); if (grossOut == 0) revert ZeroOutput(); uint256 netOut = grossOut - feeOnOutput(grossOut); if (netOut == 0) revert ZeroOutput(); return netOut; }
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: $11.6k.
- Handled a trade 83 times, worth $11.6k
Latest transactions
- 0x488ae859…d2300b block 135,760,706
- 0xb1668e6d…afcd87 block 135,760,552
- 0xa6dc0f2d…09f873 block 135,760,004
- 0x4004e7dd…1717a8 block 135,759,312
- 0xf2c39e9b…7822fa block 135,758,233
- 0x551c8e9a…694258 block 135,757,761
- 0x33d4ab62…e7bfad block 135,757,677
- 0xf8db448f…eac33e block 135,757,576
- 0xf68e0a23…ace65a block 135,757,561
- 0x2116f4da…c89e46 block 135,757,413
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.