AutomaticProtectedNative30HookV2
EthereumAutomaticProtectedNative30HookV2 is a Uniswap v4 hook on Ethereum. Live for 3 days. Active: 166 trades in the last week, and 1 new pool this week.
- Contract name
- AutomaticProtectedNative30HookV2
How this hook works
Trading taxA trading tax hook. It takes a tax on trades and only lets approved callers create pools.
Takes a tax on trades
On top of the normal pool fee, it keeps part of each trade as a tax. Buys and sells can be charged differently.
The code that does this (beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata data) internal override returns (bytes4, BeforeSwapDelta, uint24 overrideFee) { _requirePool(key); if (!initialized) revert UninitializedPool(); if (swapActive) revert ReentrantSwap(); if (params.amountSpecified == 0) revert NoTrade(); swapActive = true; activeSwap = keccak256(abi.encode(sender, key, params, data)); overrideFee = _beforeModule(sender, key, params, data); if (params.zeroForOne && block.timestamp < ProtectedLaunchTokenV1(token).startedAt() + 300) { activeBuyer = AutomaticLaunchProtectionModuleV2(module).protectedBuyer(sender); } activeOpeningTaxPpm = params.zeroForOne ? AutomaticLaunchProtectionModuleV2(module).openingTaxPpmForSender(sender) : 0; bool nativeIsSpecified = params.zeroForOne == (params.amountSpecified < 0); if (!nativeIsSpecified) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, overrideFee); uint256 nativeAmount = _absolute(params.amountSpecified); (uint256 gross, uint256 platformFee, uint256 creatorFee, uint256 openingTax) = _quoteTradeFees(nativeAmount, params.amountSpecified > 0, params.zeroForOne, activeOpeningTaxPpm); uint256 total = platformFee + creatorFee + openingTax; if (params.amountSpecified < 0 && total >= nativeAmount) revert NoTrade(); expectedNativePoolAmount = params.amountSpecified > 0 ? gross : nativeAmount - total; if (expectedNativePoolAmount == 0) revert NoTrade(); _accrue(sender, key, params.zeroForOne, gross, platformFee, creatorFee, openingTax); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(total.toInt256().toInt128(), 0), overrideFee); }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 price) internal override returns (bytes4) { _requirePool(key); if (initialized || sender != initializer || price != initialSqrtPriceX96) revert UnauthorizedInitializer(); initialized = true; return IHooks.beforeInitialize.selector; }
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 auditProtectedLaunchTokenV1: nothing there can change how trades go.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 runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Took its fee from a trade 166 times
Latest transactions
- 0x9cda57a6…e1a6bb block 26,460,953
- 0xc072fb2f…c9191b block 26,460,205
- 0x982ee70f…94a00d block 26,460,203
- 0x2a01ca9f…ccc5fa block 26,458,636
- 0x76eb877e…79f248 block 26,458,615
- 0xed31a590…5b2f0c block 26,458,595
- 0x97458867…5a9118 block 26,458,527
- 0xd0a3cf39…d93a73 block 26,458,507
- 0x3d888fc2…0c65ff block 26,458,484
- 0x7be6e5fc…3f94d7 block 26,458,484
- Took its tax from a trade 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.