EtherealFactory on Ethereum
Uniswap v4 Hook Contract 0x5faa8766d432a862c7d9d29c4c6d673899a360cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $8.48K
- Value locked (TVL)
- $0
- All-time volume
- $8.48K
- Pools using this hook
- 2
- Swaps (24h)
- 60 (36 traders)
- Total swaps
- 60
What it does
This hook charges a flat anti-snipe fee on ETH-denominated swaps during the first minutes after launch and then the coin's base fee, with buys and sells paying the same rate and the platform taking the excess above the base fee during the snipe window.
How it works step by step
- Acts as the launch factory and Uniswap v4 hook for ETH/token pools: it deploys a token via CREATE2, initializes the pool, seeds one-sided liquidity over the full supply and sends the LP NFT to 0xdead
- Charges an ETH-denominated hook fee on every swap via beforeSwap and afterSwap return deltas, using a flat anti-snipe rate during SNIPE_DURATION and the creator's base fee afterwards
- Splits each fee between the coin's fee recipient (base fee minus platform share) and the platform wallet, recording balances in pendingFees and minting fee amounts as ERC-6909 claims on the pool manager
- Lets anyone pay out pending ETH via claim(), which burns the ERC-6909 claims through an unlock callback and takes ETH to the wallet
- Emits a one-time Migrate milestone event when the pool tick crosses a precomputed threshold indicating the launch LP holds migrateEth ETH; the pool itself is unchanged
- Swap behaviour
- Swaps where ETH is the specified side (exact-input ETH sells or exact-output ETH buys) get the fee taken in beforeSwap as the specified-amount delta. Other swaps get the fee taken in afterSwap as an unspecified-currency delta. The fee is the current rate applied to the ETH amount, so during the anti-snipe window every trade pays the flat higher SNIPE_START_BPS rate, and after it ends trades pay the coin's base feeBps. Buys and sells use the same rate, and the platform keeps whatever portion of the fee exceeds the base rate during the snipe window.
- Liquidity behaviour
- No liquidity callbacks. Liquidity is only added once at launch by the factory itself (whole supply, range from the minimum usable tick up to startTick) with the LP NFT transferred to 0xdead, so it cannot be removed by anyone.
- Fee behaviour
- Fees are set per coin: during SNIPE_DURATION seconds after launch a flat SNIPE_START_BPS rate applies, then feeBps (capped at 10%) applies. The base portion is split between the fee recipient and the platform by platformShareBps, and the excess above the base goes to the platform. The dev buy pays only the base fee. Fees are held as ERC-6909 claims and paid out via claim().
- Owner & admin controls
- No owner, pausing or upgrade mechanism is present. Immutable parameters (platform wallet, platform share, launch fee, migrate threshold, snipe rate and duration, vanity mask) are fixed at deploy. The only privileged-like action is that each coin's current fee recipient can reassign future fees to a new wallet via setFeeRecipient. Anyone can call claim() for any wallet.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool initialization to this hook with a native ETH currency0 and zero static fee. beforeSwap returns the anti-snipe or base fee as a specified-amount delta for ETH-specified swaps. afterSwap mints fee claims, records fee distribution and checks the migrate milestone, and returns an unspecified delta for non-ETH-specified swaps. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can take fees via these deltas. All other callbacks revert with HookNotImplemented.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged owner key exists. The platform wallet receives platform fee shares set at deploy and cannot change them. Each coin's fee recipient alone can redirect that coin's future fee flow.
Risk to user funds: The hook holds ETH fee claims as ERC-6909 balances on the pool manager and tracks pendingFees for payout. Swap settlement is affected through return deltas, and a PartialFill revert can block certain ETH-specified swaps. Users' tokens are not custodied by the hook; LP liquidity is burned to 0xdead at launch.
Security findings
- [info] Fee taken via return deltas: afterSwap and beforeSwap return deltas take ETH-denominated fees from every swap, so the hook directly alters swap settlement amounts for traders on every pool it governs.
- [medium] Swap-time accounting constraints: ETH-specified swaps revert with PartialFill if the realized ETH amount does not match the requested amount net of fee, which can cause failed trades in edge cases rather than fallback behaviour.
- [low] Fee recipient can redirect future fees: setFeeRecipient lets the current fee recipient of a coin reroute all future fees for that coin to any non-zero address, with no delay or cap, though pending fees remain claimable by the old wallet.
- [info] Immutable, non-upgradeable design: The contract has no owner, proxy or upgrade path, and critical parameters are immutable, which limits post-deploy changes to fee logic.
- [info] Migrate event is informational only: The Migrate event is emitted once from afterSwap when a threshold tick is crossed and does not alter pool state or user funds.
Contract details
- Verified source
- Yes (EtherealFactory)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 21,533 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, erc6909-claims, fee-sharing, launchpad, moves-currency, return-delta, self-unlock
Pools using EtherealFactory
- ETH / MOTE (0.00% fee) — 24h volume $8.48K, TVL $0, 21 swaps today