FavusHook
EthereumFavusHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Active: 309 trades in the last week, and 1 new pool this week.
- Contract name
- FavusHook
How this hook works
Trading taxA trading tax hook. It takes 3% of every trade, manages its own liquidity and burns tokens.
Takes 3% of every trade
On top of the normal pool fee, it takes 3% of each trade. The rate is written into the code. The tax builds up in the hook until it is collected.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata, SwapParams calldata params, bytes calldata) external override onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { bool isBuy = !params.zeroForOne; if (isBuy || uint40(block.timestamp) != _obsTs) { (, int24 tick,,) = poolManager.getSlot0(poolKey().toId()); tick = _clamp(tick); _observe(tick); if (isBuy) { // nothing that is waiting may be laid above the price this buy starts at if (tick < _giftCeiling) _giftCeiling = tick; _stack(tick, 0); } } if (params.amountSpecified >= 0) { return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); } uint256 fee = (uint256(-params.amountSpecified) * FEE_BPS) / BPS; if (fee == 0) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); _collect(params.zeroForOne, fee); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(fee.toInt128(), 0), 0); }Manages its own liquidity
It adds and removes liquidity itself, so it can own part or all of the pool.
The code that does this (pull):function _pull(PoolKey memory key, Course memory c, uint256 i) internal returns (uint256 weth, uint256 favus) { (BalanceDelta d,) = poolManager.modifyLiquidity( key, ModifyLiquidityParams({ tickLower: c.tickLower, tickUpper: c.tickUpper, liquidityDelta: -int256(uint256(c.liquidity)), salt: bytes32(0) }), "" ); favus = d.amount0().toUint128(); weth = d.amount1().toUint128(); uint256 last = _courses.length - 1; if (i != last) _courses[i] = _courses[last]; _courses.pop(); }Burns tokens
It destroys some tokens (or sends them to an address nobody controls), so there are fewer of them.
The code that does this (unlockCallback):function unlockCallback(bytes calldata) external override onlyPoolManager returns (bytes memory) { if (!_poking) revert NotPoking(); PoolKey memory key = poolKey(); (, int24 spot,,) = poolManager.getSlot0(key.toId()); int24 spotFloor = _floor(spot); uint256 before = pendingWeth; uint8 laid; uint8 regrouped; // WETH sent to the hook directly waits as a gift (see below) uint256 gift = giftWeth; { uint256 stray = WETH.balanceOf(address(this)); if (stray != 0) { poolManager.sync(key.currency1); SafeTransferLib.safeTransfer(address(WETH), address(poolManager), stray); gift += poolManager.settle(); } } // sell tax since the last poke: into the honey pot { uint256 unfed = unfedHoney; if (unfed != 0 && FAVUS.balanceOf(address(poolManager)) >= unfed) { unfedHoney = 0; poolManager.burn(address(this), FAVUS_ID, unfed); poolManager.take(key.currency0, address(this), unfed); _feed(unfed); } // …
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.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
It runs when someone donates tokens to the pool’s LPs.
Hook history
- Took its tax from a trade 338 times
Latest transactions
- 0xf0d6ce77…a1c268 block 26,430,086
- 0x1f847b1e…bd77bf block 26,430,085
- 0x6c925d55…c67b03 block 26,430,083
- 0x7a5a825b…7b5318 block 26,430,080
- 0x28f86ccf…400417 block 26,430,076
- 0xa799b88a…a9ec1f block 26,430,076
- 0xc6024b3e…9ed737 block 26,430,075
- 0xef526176…ed29e1 block 26,430,075
- 0x6bd8f0f1…465c19 block 26,430,075
- 0xb29624ea…0f4ae0 block 26,430,074
- Handled trade money (this hook holds the pool’s funds) 3 times
Latest transactions
- 0x88763545…f062bf block 26,430,040 · 118.1k FAVUS
- 0x4fad8317…22aae1 block 26,429,988 · 1.26M FAVUS
- 0x8725f545…e4761b block 26,429,936 · 17.60M FAVUS
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.