WOOFiAggregator
BSCWOOFiAggregator is a Uniswap v4 hook on BSC. Brand new: its first pool went live today.
- Contract name
- WOOFiAggregator
How this hook works
Route to outside poolThis hook lets Uniswap v4 trades be filled by WOOFi, another exchange. The v4 pool holds no money itself: every trade is passed to WOOFi's gateway and the result handed back, with Uniswap's protocol fee taken if it is on.
Trades go to WOOFi
When someone trades in this pool, the hook makes the same trade through WOOFi and passes back what it gets.
The code that does this (_beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal virtual override returns (bytes4, BeforeSwapDelta, uint24) { (uint256 amountIn, uint256 amountOut) = _internalSettle(key, params); return _innerBeforeSwap(sender, key, params, amountIn, amountOut); }No liquidity of its own
Liquidity providers cannot add liquidity here. All of it comes from WOOFi.
The code that does this (_beforeAddLiquidity):function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata) internal pure override returns (bytes4) { revert LiquidityNotAllowed(); }Quotes from WOOFi
Prices and available amounts are read from WOOFi, so apps can show what a trade will get.
The code that does this (quote):function quote(bool zeroToOne, int256 amountSpecified, PoolId poolId) external returns (uint256 amountUnspecified) { return _innerQuote(zeroToOne, amountSpecified, poolId, _rawQuote(zeroToOne, amountSpecified, poolId)); }Protocol fee
If Uniswap's protocol fee is switched on for the pool, a share goes to Uniswap's fee jar.
The code that does this (_applyProtocolFee):function _applyProtocolFee( IPoolManager poolManager, PoolKey calldata key, SwapParams calldata params, int128 unspecifiedDelta ) internal returns (int128) { uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId()); return _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee); }
Who controls it: There are no admin settings. The WOOFi gateway is fixed when the hook is created, and the code cannot be upgraded.
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
Settings changes: set up a pool that routes to WOOFi (10 times), updated where protocol fees go (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.