UpOnlyHook
RobinhoodUpOnlyHook is a Uniswap v4 hook on Robinhood Chain. Brand new: its first pool went live today. Still in use: 2 trades in the last week, and 1 new pool this week.
- Contract name
- UpOnlyHook
How this hook works
Trading taxA trading tax hook. It takes a tax on trades, buys back the token 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. The tax can be changed.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyManager returns (bytes4, BeforeSwapDelta, uint24) { (uint160 price,,,) = POOL_MANAGER.getSlot0(key.toId()); bytes32 slot = _preSlot(key.toId()); assembly ("memory-safe") { tstore(slot, price) } IClassicHook.LaunchInfo memory info = _launches[key.toId()]; if (!info.registered || params.amountSpecified >= 0 || params.zeroForOne == info.memecoinIsCurrency0) { return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); } // Gross requested input, NO gross-up. Avoid negating int256.min. uint256 gross = SafeCast.toUint256(-(params.amountSpecified + 1)) + 1; uint256 fee = FullMath.mulDiv(gross, info.policy.hookFeeBps, 10_000); uint256 tax = FullMath.mulDiv(gross, info.creatorTaxBps, 10_000); // The manager enforces int128 delta domain. Out-of-domain requests cannot be executed by the pool. int128 returnedFee = SafeCast.toInt128(SafeCast.toInt256(fee + tax)); _fund(key, info, fee, tax); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(returnedFee, 0), 0); }Buys back the token
It uses what it collects to buy the token back.
The code that does this (burnLeg):function _burnLeg( PoolKey calldata key, bool cloneIsToken0, uint256 surchargeAmount, uint160 pre, uint160 post, int256 floorNow ) internal returns (uint256 spent, uint256 bought) { PoolId id = key.toId(); _writeSellState(id, post, cloneIsToken0, floorNow); if ( surchargeAmount == 0 || pre <= TickMath.MIN_SQRT_PRICE || pre >= TickMath.MAX_SQRT_PRICE || (cloneIsToken0 ? pre <= post : pre >= post) || POOL_MANAGER.getLiquidity(id) == 0 ) return (0, 0); BalanceDelta refill = POOL_MANAGER.swap( key, SwapParams({ zeroForOne: !cloneIsToken0, amountSpecified: -SafeCast.toInt256(surchargeAmount), sqrtPriceLimitX96: pre }), "" ); spent = _abs(cloneIsToken0 ? refill.amount1() : refill.amount0()); bought = _abs(cloneIsToken0 ? refill.amount0() : refill.amount1()); if (bought > 0) _mintBurned(id, cloneIsToken0 ? key.currency0 : key.currency1, bought); }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) external onlyManager returns (bytes4) { if (sender != factory) revert NotFactory(); PoolId id = key.toId(); IClassicHook.LaunchInfo memory info = _launches[id]; if (!info.registered) revert UnknownPool(); (int24 seed,) = FloorMath._norm(price, info.memecoinIsCurrency0); Floor storage f = _floors[id]; uint40 nowSecond = SafeCast.toUint40(block.timestamp); f.floor = SafeCast.toInt64((int256(seed) - int256(uint256(f.config.band))) * FloorMath.Q); f.lastCloseTick = seed; f.lastUpdate = nowSecond; f.ring.seed(seed, nowSecond); return IHooks.beforeInitialize.selector; }
Who controls it: The hook developer can change how the fees are shared, the fee, the wallets that receive its fees and which routers are trusted. Control can be passed on but not given up. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
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
Across all its pools, the hook attributed: $0.0930, and took its fee from a trade: $0.0930.
- Attributed 1 time, worth $0.0930
Latest transactions
- 0x29f96faa…57eb44 block 113,186,178 · 0.0000480 ETH
- Took its fee from a trade 1 time, worth $0.0930
Latest transactions
- 0x29f96faa…57eb44 block 113,186,178 · 0.0000480 ETH
- Registered a new pool 1 time
- Breach fee 1 time
- Raised the floor 1 time
- Burned a breach 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. Dollar values count the amounts paid in ETH, stablecoins, BNB and BTC, at today’s prices.