AutomaticProtectedNative30HookV2
EthereumAutomaticProtectedNative30HookV2 is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Active: 124 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 124 times
Latest transactions
- 0x6b2e7119…038952 block 26,487,183
- 0x81d52794…3d1fad block 26,487,036
- 0x8766c5ce…6680ca block 26,486,980
- 0xcd7bcaee…bca034 block 26,486,952
- 0x2cb1241f…127755 block 26,486,814
- 0x708dbab0…a6eb97 block 26,486,808
- 0x0bde163c…6acf07 block 26,486,806
- 0x3975671b…4c723a block 26,486,806
- 0x5b91b72c…9cf0e6 block 26,486,806
- 0x60fbc739…2cfc7e block 26,486,806
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.