HelmFeeHook
RobinhoodHelmFeeHook is a Uniswap v4 hook on Robinhood Chain. Brand new: its first pool went live today. Active: 502 trades in the last week, and 3 new pools this week.
- Contract name
- HelmFeeHook
How this hook works
Trading taxA trading tax hook. It changes its fee over time, takes a cut of every trade and only lets approved callers create pools.
Fee changes over time
Instead of a fixed fee, it sets the fee itself and changes it over time, for example starting high at launch and coming down.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external returns (bytes4, BeforeSwapDelta, uint24) { if (msg.sender != address(poolManager)) revert OnlyPoolManager(); PoolId id = key.toId(); Pool storage p = _pools[id]; Quote memory q = _quote(id, p, params.zeroForOne, params.amountSpecified, params.sqrtPriceLimitX96); if (q.anchorTime != p.anchorTime) { // The first swap of a new second moves the anchor. p.anchorSqrtPriceX96 = q.anchorSqrtPriceX96; p.anchorTime = q.anchorTime; } if (q.parked) { // The swap ends in an empty range beyond its trading point: the anchor will move towards that // point, not towards the price the swap leaves behind. if (q.traded) p.heldSqrtPriceX96 = q.sqrtEndX96; else if (!p.held) p.heldSqrtPriceX96 = q.sqrtBeforeX96; p.held = true; } else if (q.traded && p.held) { p.held = false; // a swap that trades liquidity clears the stored point } _txStore(id, params.zeroForOne, q.txInput, q.txFee); if (q.take == 0) { return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, q.lpFee | LPFeeLibrary.OVERRIDE_FEE_FLAG); } // The take, as claims to the input token: an exact input's specified delta, an exact output's unspecified one. poolManager.mint(address(this), (params.zeroForOne ? key.currency0 : key.currency1).toId(), q.take); int128 take = int128(int256(q.take)); BeforeSwapDelta delta = params.amountSpecified < 0 ? toBeforeSwapDelta(take, 0) : toBeforeSwapDelta(0, take); // …Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. The fee can be changed. The fee builds up in the hook until it is collected.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external returns (bytes4, BeforeSwapDelta, uint24) { if (msg.sender != address(poolManager)) revert OnlyPoolManager(); PoolId id = key.toId(); Pool storage p = _pools[id]; Quote memory q = _quote(id, p, params.zeroForOne, params.amountSpecified, params.sqrtPriceLimitX96); if (q.anchorTime != p.anchorTime) { // The first swap of a new second moves the anchor. p.anchorSqrtPriceX96 = q.anchorSqrtPriceX96; p.anchorTime = q.anchorTime; } if (q.parked) { // The swap ends in an empty range beyond its trading point: the anchor will move towards that // point, not towards the price the swap leaves behind. if (q.traded) p.heldSqrtPriceX96 = q.sqrtEndX96; else if (!p.held) p.heldSqrtPriceX96 = q.sqrtBeforeX96; p.held = true; } else if (q.traded && p.held) { p.held = false; // a swap that trades liquidity clears the stored point } _txStore(id, params.zeroForOne, q.txInput, q.txFee); if (q.take == 0) { return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, q.lpFee | LPFeeLibrary.OVERRIDE_FEE_FLAG); } // The take, as claims to the input token: an exact input's specified delta, an exact output's unspecified one. poolManager.mint(address(this), (params.zeroForOne ? key.currency0 : key.currency1).toId(), q.take); int128 take = int128(int256(q.take)); BeforeSwapDelta delta = params.amountSpecified < 0 ? toBeforeSwapDelta(take, 0) : toBeforeSwapDelta(0, take); // …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 returns (bytes4) { if (msg.sender != address(poolManager)) revert OnlyPoolManager(); PoolId id = key.toId(); Pool storage p = _pools[id]; if (p.openingHash == bytes32(0)) revert PoolNotRegistered(); if (sender != p.opener) revert OnlyOpener(); if (keccak256(abi.encode(sqrtPriceX96)) != p.openingHash) revert WrongOpeningPrice(); p.open = true; p.anchorSqrtPriceX96 = sqrtPriceX96; p.anchorTime = uint40(block.timestamp); emit PoolOpened(id, sqrtPriceX96); return IHooks.beforeInitialize.selector; }
Who controls it: The hook developer can change the settings of its pools, the fee and how the fees are shared. The hook developer can also call: propose governor, install calendar, post window, cancel window, reduce window. 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 auditpostFeeTable cutShare installCalendar postWindowpostFeeTable cutShare installCalendar postWindowWhat 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.
Pools using it let the hook choose the swap fee instead of a fixed tier.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Opened a pool 3 times
Latest transactions
- 0x2ad783b6…02b26e block 118,399,026
- 0x76b1bbda…c6e47f block 118,203,781
- 0xd59d9e3b…ee8255 block 118,200,356
- Registered a new pool 2 times
Latest transactions
- 0xe3a636df…a42669 block 118,398,964
- 0x6bbf15b1…a41272 block 118,203,718
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.