HookrLendBoostRoot
RobinhoodHookrLendBoostRoot is a Uniswap v4 hook on Robinhood Chain. Live for 1 day. Still in use: 40 trades in the last week, and 1 new pool this week.
- Contract name
- HookrLendBoostRoot
How this hook works
Trading taxA trading tax hook. It sets its own trading fee, takes a tax on trades and locks tokens or liquidity.
Sets its own trading fee
Instead of a fixed fee chosen by the pool creator, it decides the fee itself on each trade.
The code that does this (beforeSwap):function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata data) external onlyManager returns (bytes4, BeforeSwapDelta, uint24) { uint256 active = HookrRootStorage.tget(ACTIVE); uint256 leg; if (active != 0 || HookrRootStorage.tget(BINDING) != 0) { // Only an open arb recapture's executor swaps inside another swap (HookrLane._enter): a leg returns its // base LP fee, with bit 24 set when the pool has an advisory. An unadvised leg pays that fee alone; an // advised one goes on here, asked and charged by the advisory as an unauthenticated swap, and runs no rule. leg = _lane(HookrRootStorage.OP_ENTER | (active << 8)); if (leg != 0 && leg >> 24 == 0) return (IHooks.beforeSwap.selector, toBeforeSwapDelta(0, 0), uint24(leg)); } uint256 requested = _magnitude(params.amountSpecified); if (requested == 0 || requested > uint256(uint128(type(int128).max))) revert AmountOutOfRange(); PoolId id = key.toId(); HookrRootStorage.Record storage r = _record(id); HookrRootStorage.tput(ACTIVE, active + 1); HookrRootStorage.tput(RECEIPT_OWNER, 0); Frame memory f; f.context = _context(key, params, sender, id, r); f.receiptRequested = _identity(f.context, data); // An advised leg runs no lane op, no ledger mark, no dynamic fee simulation and no Rules quote. uint256 mode = leg == 0 ? r.mode : 0; // LEND BOOST: on a pool without a lane the reserve's optional entry comes first, before the fee-only branch // and the quote, so the quote and a dynamic fee simulation see the depth the swap trades through. On a lane // pool it follows the before-phase arb recapture below. Never on a nested swap or a leg. if (active == 0 && mode & HookrRootStorage.MODE_LANE == 0) _enterBoost(r, key, id, params); uint256 feeOnly = r.feeOnlyFrom; // …Takes a tax on trades
On top of the normal pool fee, it keeps part of each trade as a tax. The tax is paid out in the same trade.
The code that does this (beforeSwap):function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata data) external onlyManager returns (bytes4, BeforeSwapDelta, uint24) { uint256 active = HookrRootStorage.tget(ACTIVE); uint256 leg; if (active != 0 || HookrRootStorage.tget(BINDING) != 0) { // Only an open arb recapture's executor swaps inside another swap (HookrLane._enter): a leg returns its // base LP fee, with bit 24 set when the pool has an advisory. An unadvised leg pays that fee alone; an // advised one goes on here, asked and charged by the advisory as an unauthenticated swap, and runs no rule. leg = _lane(HookrRootStorage.OP_ENTER | (active << 8)); if (leg != 0 && leg >> 24 == 0) return (IHooks.beforeSwap.selector, toBeforeSwapDelta(0, 0), uint24(leg)); } uint256 requested = _magnitude(params.amountSpecified); if (requested == 0 || requested > uint256(uint128(type(int128).max))) revert AmountOutOfRange(); PoolId id = key.toId(); HookrRootStorage.Record storage r = _record(id); HookrRootStorage.tput(ACTIVE, active + 1); HookrRootStorage.tput(RECEIPT_OWNER, 0); Frame memory f; f.context = _context(key, params, sender, id, r); f.receiptRequested = _identity(f.context, data); // An advised leg runs no lane op, no ledger mark, no dynamic fee simulation and no Rules quote. uint256 mode = leg == 0 ? r.mode : 0; // LEND BOOST: on a pool without a lane the reserve's optional entry comes first, before the fee-only branch // and the quote, so the quote and a dynamic fee simulation see the depth the swap trades through. On a lane // pool it follows the before-phase arb recapture below. Never on a nested swap or a leg. if (active == 0 && mode & HookrRootStorage.MODE_LANE == 0) _enterBoost(r, key, id, params); uint256 feeOnly = r.feeOnlyFrom; // …Locks tokens or liquidity
Some tokens or liquidity are locked for a set time and can’t be taken out before then.
The code that does this (beforeRemoveLiquidity):function beforeRemoveLiquidity( address sender, PoolKey calldata key, ModifyLiquidityParams calldata params, bytes calldata ) external onlyManager returns (bytes4) { PoolId id = key.toId(); // LEND BOOST: the reserve removing its own temporary position inside this root's window. if (_reserveMove(sender, id)) return IHooks.beforeRemoveLiquidity.selector; if (HookrRootStorage.tget(ACTIVE) != 0 || HookrRootStorage.tget(BINDING) != 0) revert ReentrantCallback(); if (params.liquidityDelta == 0) return IHooks.beforeRemoveLiquidity.selector; HookrRootStorage.Record storage r = _record(id); uint256 until = r.lockedUntil; if (block.number < until) revert LiquidityLocked(id, until); if (r.laneLiquidity) _lane(0); return IHooks.beforeRemoveLiquidity.selector; }Rules for adding or removing liquidity
It decides who can add or remove liquidity, or when.
The code that does this (beforeAddLiquidity):function beforeAddLiquidity(address sender, PoolKey calldata key, ModifyLiquidityParams calldata, bytes calldata) external onlyManager returns (bytes4) { PoolId id = key.toId(); // LEND BOOST: the reserve's temporary position, only inside the window this root opened for this pool. The // position is the root's own, never an LP's: no flush, no ledger mark, no module call. if (_reserveMove(sender, id)) return IHooks.beforeAddLiquidity.selector; if (HookrRootStorage.tget(ACTIVE) != 0 || HookrRootStorage.tget(BINDING) != 0) revert ReentrantCallback(); HookrRootStorage.Record storage r = _record(id); if (r.mode & HookrRootStorage.MODE_LANE != 0) _lane(0); _required(r.rules, abi.encodeCall(IHookrRules.beforeAddLiquidity, (id, sender)), r.rulesGasLimit, 0, true); if (r.advisory != address(0) && !r.advisoryFailOpen) { bool allowed = abi.decode( _required( r.advisory, abi.encodeCall(IHookrAdvisory.beforeAddLiquidity, (id, sender)), r.advisoryGasLimit, 32, true ), (bool) ); if (!allowed) revert SwapRejected(); } return IHooks.beforeAddLiquidity.selector; }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) external view onlyManager returns (bytes4) { if (sender != address(this) || HookrRootStorage.tget(BINDING) != uint256(PoolId.unwrap(key.toId()))) { revert Unauthorized(); } return IHooks.beforeInitialize.selector; }Simple trades only
Trades must state the amount going in, not the amount coming out.
The code that does this (afterSwap):function afterSwap( address sender, PoolKey calldata key, SwapParams calldata params, BalanceDelta delta, bytes calldata ) external onlyManager returns (bytes4, int128) { uint256 active = HookrRootStorage.tget(ACTIVE); if (active == 0) revert ReentrantCallback(); if (active >= HookrRootStorage.LEG) { // An executor leg on a pool without an advisory: no rule, no charge beyond the base LP fee. On a dynamic fee // pool it carries the pool's dynamic fee state (`_carryLeg`). // ACTIVE was 1 when the leg entered (HookrLane._enter): back to 1, the leg's LEG and LEG_DYNAMIC cleared. HookrRootStorage.tput(ACTIVE, active & (HookrRootStorage.LEG - 1)); if (active >= HookrRootStorage.LEG_DYNAMIC) _carryLeg(0); return (IHooks.afterSwap.selector, 0); } PoolId id = key.toId(); (Frame memory f, uint256 flags) = _readFrame(id, sender, params); HookrRootStorage.Record storage r = _record(id); // LEND BOOST: mandatory, uncaught removal of the temporary position before any settlement, on both paths and // before the after-phase arb recapture. if (HookrRootStorage.tget(JIT_ENTERED) != 0) { HookrRootStorage.tput(JIT_WINDOW, uint256(PoolId.unwrap(id))); reserve.settleJit(key); HookrRootStorage.tput(JIT_WINDOW, 0); HookrRootStorage.tput(JIT_ENTERED, 0); } bool quoteIs0 = r.quoteIsCurrency0; Currency quote = quoteIs0 ? key.currency0 : key.currency1; // …
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 audittarget, executor on every trade.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.
Pools using it let the hook choose the swap fee instead of a fixed tier.
It runs before liquidity is removed, so it can delay or refuse LP exits.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
It runs when someone donates tokens to the pool’s LPs.
Hook history
- A correction failed 80 times
Latest transactions
- 0x2e4f9934…d69528 block 122,151,270 · 2 times in this transaction
- 0xeca9ca39…d39992 block 122,109,199 · 2 times in this transaction
- 0x3afa3a11…3431bf block 121,941,641 · 2 times in this transaction
- 0x742c7cc5…7e5850 block 121,902,883 · 2 times in this transaction
- 0x7f8aa618…6d777b block 121,843,196
- Took its fee from a trade 40 times
Latest transactions
- 0x2e4f9934…d69528 block 122,151,270
- 0xeca9ca39…d39992 block 122,109,199
- 0x3afa3a11…3431bf block 121,941,641
- 0x742c7cc5…7e5850 block 121,902,883
- 0x7f8aa618…6d777b block 121,843,196
- 0xa82b3f33…7df31a block 121,757,905
- 0xf4b88f6d…588a79 block 121,728,149
- 0x31ff881a…4e0f00 block 121,727,192
- 0x05f49712…9c9bfa block 121,724,183
- 0x36c76fcb…7b873d block 121,718,796
- Opened a pool 1 time
- Pool lane 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.