BawsaqHook
EthereumBawsaqHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Still in use: 10 trades in the last week, and 27 new pools this week.
- Contract name
- BawsaqHook
How this hook works
Trading taxA trading tax hook. It takes a tax on trades, charges more right after launch and controls who adds liquidity.
Takes a tax on trades
On top of the normal pool fee, it keeps part of each trade as a tax. The normal rate in the code is 1%. The tax is paid out in the same trade.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { if (!launched[key.toId()]) revert NotLaunched(); // ETH (currency0) is the specified currency: exact-in buy or exact-out sell if ((params.amountSpecified < 0) == params.zeroForOne) { uint256 fee = _abs(params.amountSpecified) * feeBps(Currency.unwrap(key.currency1)) / 10_000; if (fee > 0) { _pay(key, fee); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(fee.toInt128(), 0), 0); } } return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); }Higher at launch
The tax starts higher right after launch and comes down over time, which makes it costly for bots to buy first.
The code that does this (feeBps):function feeBps(address token) public view returns (uint256) { if (token != BAWSAQ || bawsaqLaunchedAt == 0) return FEE_BPS; uint256 elapsed = block.timestamp - uint256(bawsaqLaunchedAt); if (elapsed >= LAUNCH_TAX_DURATION) return FEE_BPS; return LAUNCH_TAX_BPS - (LAUNCH_TAX_BPS - FEE_BPS) * elapsed / LAUNCH_TAX_DURATION; }Rules for adding liquidity
It decides who can add liquidity, or when.
The code that does this (beforeAddLiquidity):function beforeAddLiquidity(address, PoolKey calldata key, ModifyLiquidityParams calldata, bytes calldata) external onlyPoolManager returns (bytes4) { PoolId id = key.toId(); if (!launched[id]) { if (tx.origin != owner || owner == address(0)) revert NotLaunched(); launched[id] = true; if (Currency.unwrap(key.currency1) == BAWSAQ) bawsaqLaunchedAt = uint64(block.timestamp); emit PoolLaunched(Currency.unwrap(key.currency1)); } return IHooks.beforeAddLiquidity.selector; }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) external view onlyPoolManager returns (bytes4) { if (sender != owner || owner == address(0)) revert NotOwner(); address token = Currency.unwrap(key.currency1); if ( !key.currency0.isAddressZero() || key.fee != 0 || key.tickSpacing != TICK_SPACING || address(key.hooks) != address(this) ) revert BadPool(); if (token != BAWSAQ) { // must be a BAWSAQ stock that points at this hook try IBawsaqStockView(token).FEE_HOOK() returns (address h) { if (h != address(this)) revert BadPool(); } catch { revert BadPool(); } } return IHooks.beforeInitialize.selector; }No trading before the start
Trades are refused until trading has been opened.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { if (!launched[key.toId()]) revert NotLaunched(); // ETH (currency0) is the specified currency: exact-in buy or exact-out sell if ((params.amountSpecified < 0) == params.zeroForOne) { uint256 fee = _abs(params.amountSpecified) * feeBps(Currency.unwrap(key.currency1)) / 10_000; if (fee > 0) { _pay(key, fee); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(fee.toInt128(), 0), 0); } } return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); }
Who controls it: It has an admin address, but no admin-only settings in its own code. 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 auditBAWSAQ on every trade.What 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
- Opened its pool 27 times
Latest transactions
- 0x4e790a37…309483 block 26,431,676
- 0x24f04f0b…74a574 block 26,431,666
- 0xd264fb7e…1184a3 block 26,431,660
- 0xfc38c159…cd3e45 block 26,431,655
- 0xe3b19a9c…facea4 block 26,431,650
- 0xe38da31f…e0a202 block 26,431,645
- 0x3301e327…df1564 block 26,431,640
- 0xab2be2e7…367c2d block 26,431,635
- 0x6f94a6fc…6664e7 block 26,431,629
- 0x88d09da8…9ca596 block 26,431,624
- Took its fee from a trade 11 times
Latest transactions
- 0xaedff9ed…8c4c96 block 26,431,942 · 0.000173 BAWSAQ
- 0x464d422c…ab0a4c block 26,431,933 · 0.000396 BAWSAQ
- 0x5a6db058…d5fc24 block 26,431,780 · 0.0000294 BAWSAQ
- 0x43a94082…35e9ca block 26,431,777 · 0.0000297 BAWSAQ
- 0x1f629a66…9872bb block 26,431,748 · 0.000239 BAWSAQ
- 0xd48caa79…c2e93a block 26,431,703 · 0.000273 BAWSAQ
- 0x45072915…bf8f24 block 26,431,694 · 0.000182 BAWSAQ
- 0x867febeb…7645db block 26,431,680 · 0.00427 BAWSAQ
- 0xf5b34e57…2acc8d block 26,431,677 · 0.000857 BAWSAQ
- 0xf974f1b3…5b114a block 26,431,677 · 0.00689 BAWSAQ
- The hook developer gave up control 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.