UframeHook
EthereumUframeHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Still in use: 24 trades in the last week, and 1 new pool this week.
- Contract name
- UframeHook
How this hook works
Trading taxA trading tax hook. It takes 2% on buys and 5% on sells, only lets approved callers create pools and holds trading back until it is opened.
Takes 2% on buys and 5% on sells
On top of the normal pool fee, buys pay 2% and sells pay 5%. The rates are written into the code. 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 (!tradingOpen) revert TradingClosed(); // currency0 = ETH. Specified currency is ETH when (exactIn && zeroForOne) || (exactOut && !zeroForOne) bool exactIn = params.amountSpecified < 0; if (exactIn != params.zeroForOne) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); uint256 amount = exactIn ? uint256(-params.amountSpecified) : uint256(params.amountSpecified); uint256 fee = amount * (params.zeroForOne ? BUY_FEE_BPS : SELL_FEE_BPS) / BPS; if (fee == 0) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); _takeFee(key, params.zeroForOne, fee); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0); }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 sqrtPriceX96) external onlyPoolManager returns (bytes4) { if (sender != launcher) revert NotLauncher(); if (poolInitialized) revert AlreadyInitialized(); if ( Currency.unwrap(key.currency0) != address(0) || Currency.unwrap(key.currency1) != token || key.fee != POOL_FEE || key.tickSpacing != TICK_SPACING ) revert WrongPool(); poolInitialized = true; poolId = key.toId(); emit PoolCreated(poolId, sqrtPriceX96); 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 (!tradingOpen) revert TradingClosed(); // currency0 = ETH. Specified currency is ETH when (exactIn && zeroForOne) || (exactOut && !zeroForOne) bool exactIn = params.amountSpecified < 0; if (exactIn != params.zeroForOne) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); uint256 amount = exactIn ? uint256(-params.amountSpecified) : uint256(params.amountSpecified); uint256 fee = amount * (params.zeroForOne ? BUY_FEE_BPS : SELL_FEE_BPS) / BPS; if (fee == 0) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); _takeFee(key, params.zeroForOne, fee); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0); }
Who controls it: The pool creator can change the wallets that receive its fees and when trading opens. 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 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 runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Took its fee from a trade 24 times
Latest transactions
- 0x38fe12fa…4c14ab block 26,492,302
- 0x673d9d1d…fd7b9e block 26,492,161
- 0xd25035de…1fc273 block 26,492,068
- 0xdd5b2058…e210fe block 26,492,028
- 0xcd46773f…7fda17 block 26,492,025
- 0xd908d028…42d033 block 26,491,997
- 0x5713ae0c…261ec4 block 26,491,990
- 0xeaff6d90…6e76f5 block 26,491,937
- 0xd69e9495…4d3248 block 26,491,934
- 0xda597ad1…20b975 block 26,491,885
- Opened trading 1 time
Settings changes: set up a pool (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.