HookrLendBoostRoot
RobinhoodHookrLendBoostRoot is a Uniswap v4 hook on Robinhood Chain. Live for 1 day. Still in use: 30 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); guard.recordClose(key); 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))); uint256 gap = reserve.settleJit(key); if (gap != 0) guard.seedRecovery(key, gap); HookrRootStorage.tput(JIT_WINDOW, 0); HookrRootStorage.tput(JIT_ENTERED, 0); } // …
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
- Succeeded the correction 46 times
Latest transactions
- 0xff34547a…90dc88 block 122,555,835 · 2 times in this transaction
- 0x7abc33bb…17f7da block 122,520,268 · 2 times in this transaction
- 0xd9d77df3…d1e0bf block 122,483,571 · 2 times in this transaction
- 0xeeed81c6…26fc51 block 122,447,186 · 2 times in this transaction
- 0xacf1d89d…942df1 block 122,410,557
- Took its fee from a trade 23 times
Latest transactions
- 0xff34547a…90dc88 block 122,555,835
- 0x7abc33bb…17f7da block 122,520,268
- 0xd9d77df3…d1e0bf block 122,483,571
- 0xeeed81c6…26fc51 block 122,447,186
- 0xacf1d89d…942df1 block 122,410,557
- 0x697fd583…0a9bf1 block 122,373,240
- 0xfc260327…d69fca block 122,336,262
- 0x2cf84e66…c0b48c block 122,298,651
- 0x088b19da…a1331a block 122,262,202
- 0x16670ea6…ac3e7d block 122,225,731
- 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.