ArrowdHook
RobinhoodArrowdHook is a Uniswap v4 hook on Robinhood Chain. Brand new: its first pool went live today.
- Contract name
- ArrowdHook
How this hook works
Leveraged tokensThe hook behind Lanista’s leveraged tokens: tokens that track a market (like a stock) going up or down, with leverage. Buying one in its Uniswap pool makes a new token from USDG, selling it turns it back into USDG, both at the token’s current value minus a fee.
Trades make and redeem tokens
The pool has no normal liquidity. When someone buys, the hook creates new tokens worth what they paid in USDG (a stablecoin). When someone sells, it destroys the tokens and pays out their current value.
The code that does this (_beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal override returns (bytes4, BeforeSwapDelta, uint24) { if (params.amountSpecified >= 0) revert ExactOutputUnsupported(); uint256 amountIn = uint256(-params.amountSpecified); Currency input = params.zeroForOne ? key.currency0 : key.currency1; bool mint = Currency.unwrap(input) == address(usdg); PerpToken token = PerpToken(Currency.unwrap(mint ? (params.zeroForOne ? key.currency1 : key.currency0) : input)); Spec memory s = specOf[token]; if (!s.listed) revert UnknownToken(); input.take(poolManager, address(this), amountIn, false); uint256 amountOut = mint ? _mint(token, s, sender, amountIn) : _redeem(token, s, sender, amountIn); (mint ? Currency.wrap(address(token)) : Currency.wrap(address(usdg))).settle(poolManager, address(this), amountOut, false); return (this.beforeSwap.selector, toBeforeSwapDelta(amountIn.toInt256().toInt128(), -amountOut.toInt256().toInt128()), 0); }Priced from the real market
Each token tracks one market, either long or short, with a set amount of leverage. Its value comes from that market’s live price, not from supply and demand in the pool.
A fee on every trade
Each buy and sell pays a fee in USDG that goes to Lanista’s fee router.
The code that does this (_mint):function _mint(PerpToken token, Spec memory s, address sender, uint256 usdgIn) internal returns (uint256 out) { uint256 fee = usdgIn * hookFeeBps / BPS; uint256 collateral = usdgIn - fee; _countNotional(collateral * s.leverage); (int256 before, uint256 supply) = valueOf(token); if (supply > 0 && before <= 0) revert TokenInsolvent(); if (fee > 0) usdg.safeTransfer(feeRouter, fee); usdg.safeTransfer(pool, collateral); uint256 px = engine.increaseSync(address(token), s.marketId, s.isLong, collateral * s.leverage, collateral); (int256 afterValue,) = valueOf(token); uint256 added = afterValue > before ? uint256(afterValue - before) : 0; out = supply == 0 ? added * SCALE : Math.mulDiv(supply, added, uint256(before)); token.mint(address(this), out); emit HookFill(token, sender, true, usdgIn, out, fee, px); }Speed limit and rebalancing
There’s a cap on how much can be traded per second. Behind the scenes the hook keeps each token’s position sized right as prices move.
The code that does this (rebalance):function rebalance(PerpToken token) external returns (uint256 sizeAfter) { Spec memory s = specOf[token]; if (!s.listed) revert UnknownToken(); (uint256 size,) = engine.positionSize(address(token), s.marketId, s.isLong); int256 value = engine.positionValue(address(token), s.marketId, s.isLong); if (size == 0 || value <= 0) revert NothingToRebalance(); uint256 target = uint256(value) * s.leverage; uint256 band = target * rebalanceBandBps / BPS; if (size > target + band) { engine.decreaseSync(address(token), s.marketId, s.isLong, size - target, 0, address(this)); if (usdg.balanceOf(address(this)) > 0) usdg.safeTransfer(pool, usdg.balanceOf(address(this))); } else if (size + band < target) { _countNotional(target - size); engine.increaseSync(address(token), s.marketId, s.isLong, target - size, 0); } else { revert NothingToRebalance(); } (sizeAfter,) = engine.positionSize(address(token), s.marketId, s.isLong); emit Rebalanced(token, size, sizeAfter); }
Who controls it: The hook developer (Lanista) creates every token and can change the fee, the rebalancing band and the speed limit. Nobody else can add liquidity. The code itself can’t 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 auditsetParamssetParamsWhat 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 checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Created a new leveraged token 72 times
Latest transactions
- 0xacd54f37…dfd8fc block 124,400,823
- 0xac97c71b…30f2de block 124,400,816
- 0xd3868bdc…d1b991 block 124,400,808
- 0xed88ceca…b001c8 block 124,400,799
- 0x3a54bde1…831963 block 124,400,791
- 0xa9fd4292…22dbe3 block 124,400,783
- 0xc0a211f1…12ca30 block 124,400,771
- 0x6920deb6…87807d block 124,400,758
- 0x55043c75…db3788 block 124,400,750
- 0x1bbe55c3…a35b1b block 124,400,742
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.