Sell a million,one block at a time.

Stream is a Uniswap v4 hook on Elysium. It pours a large order into the pool one slice per block, every 0.137 seconds, and lets arbitrageurs refill the pool from Hyperliquid in between.

Each ripple on the water is one Elysium block.block —

One order, ten minutes, 4,380 blocks.

$1,000,000 of HYPE to sell. Sold in one go, it would sink an $8M pool by 36%.

Simulation of an $8M pool with a 0.05% fee, about 60 times faster than real time.

Sell of HYPE over into .

The same order three ways, on the same pool, against the same arbitrageurs and the same Hyperliquid price. Each line shows how far under Hyperliquid the pool trades while the order runs.

One market order
Everything in one block
down 3,599 bps in that block, far below this chart
2,003bps
$200k given up
Sliced on 12 s blocks
Ethereum's clock: 50 slices of $20k
63.8bps
$6,374 given up
Stream on Elysium
4,380 slices of $228, one per block
15.1bps
$1,510 given up

With slices this small, the cost stops depending on the size of the order. It settles near the pool's fee plus what an arbitrageur pays on Hyperliquid: about 15 bps, whatever you sell.

Sellers stream a minute, buyers .

When one order sells HYPE while another buys it, Stream runs both against the pool at the same time. Most of them trade with each other at the pool's price, and only the difference moves it.

sellersbuyers

Over the minute the pool moves 231 bps. Had the sellers streamed alone, it would have moved 1,347 bps. The hook gets there in one step, with the closed-form TWAMM formula.

Nine rules, four functions.

Everything the hook does, and how a contract or a wallet talks to it. This is the design: nothing is deployed yet.

  1. §1An order

    An order is an amount, a side and an end block. From the next block on, it sells amount ÷ blocks left in every block until it ends.

    submit(key, order, amountIn)
  2. §2The clock

    Stream counts Elysium blocks through ArbSys. On Elysium block.timestamp moves once a second and block.number is the parent chain's, so neither can count 0.137-second blocks.

    ArbSys(0x64).arbBlockNumber()
  3. §3Settlement

    Nothing executes by itself. The first transaction that touches the pool settles every block owed since the last touch, then runs. Anyone may also call settle.

    beforeSwap · beforeAddLiquidity · beforeRemoveLiquidity
  4. §4Netting

    Opposite orders trade with each other first, at the pool's price, through the TWAMM closed form. Only the difference moves the curve.

    exp · sqrt, 64.64 fixed point
  5. §5The grid

    End blocks snap to a grid of 8 blocks, about 1.1 seconds. A settlement takes one step, plus one per grid line where an order ended. A bitmap skips the empty ones, so an idle hour costs no more than an idle block.

    expiries: bitmap of grid lines
  6. §6Leaving

    Claim what an order has earned at any time. Cancel at any time: what hasn't sold and what has been earned come back in the same transaction.

    update(key, order, delta)
  7. §7Manipulation

    One block risks one slice. Pushing the price against a stream for a block wins at most that slice, and the next arbitrage takes the price back. The smaller the block, the smaller the prize.

    one slice ≈ amount × 0.137 s ÷ duration
  8. §8Fees

    The pool's own fee on every slice, as for any swap, plus 1 basis point of each order's output to Stream.

    protocolFee = 1 bp
  9. §9Where the math runs

    The exponential and the square roots are written in Rust for Stylus, where they cost a fraction of the EVM version. Elysium has Stylus activations paused today, so the first release runs the same math in Solidity and switches when they open.

    ArbWasm.activationGas() = max
// Stream — a Uniswap v4 hook for Elysium (interface draft)
interface IStream {
struct Order {
address owner;
uint64 endBlock; // Elysium block (ArbSys), on the 8-block grid
bool zeroForOne; // true: sell currency0 for currency1
}
/// Start streaming amountIn from the next block until order.endBlock.
function submit(PoolKey calldata key, Order calldata order, uint256 amountIn)
external returns (bytes32 id);
/// delta < 0 sells less (cancel = everything left), delta = 0 only claims.
function update(PoolKey calldata key, Order calldata order, int256 delta)
external returns (uint256 earned, uint256 returned);
/// Settle every owed block up to now. Swaps and liquidity changes call it first.
function settle(PoolKey calldata key) external;
function status(PoolKey calldata key, bytes32 id)
external view returns (uint256 sold, uint256 earned, uint256 left, uint64 endBlock);
}

Leave without a splash.

For a fund leaving a position, a protocol buying back its token every day, a team selling an unlock over a month, a vault that buys HYPE every block.