Docs Dec 2, 2026

How ElyStocks Works

Flash arbitrage for tokenized stocks on Elysium, plainly. What a cycle does, how routes and fees work, how to quote and run one, what can go wrong, and how bots call the engine.

01

Overview

ElyStocks is flash arbitrage for tokenized stocks on Elysium. Elysium is an Arbitrum Orbit L2 built by Kinetiq that settles to HyperEVM, Hyperliquid's EVM. Gas is paid in HYPE. The stocks arrive bridged from the Hyperliquid side: EQX Labs tokens (EQTSLA, EQSPCX, EQNVDA, EQANT and more) and wrapped xStocks (wSPYx, wQQQx, wNVDAx and more).

The same stock trades in several pools at once: Uniswap v4 pools and Ramses v3 pools, against USDC and against HYPE. Each pool moves only when someone trades in it, so nobody keeps them in line and they drift apart.

ElyStocks closes the gap in one transaction. The engine runs a cycle of 2 to 4 pools inside one Uniswap v4 unlock: it swaps first and settles at the end. You bring no capital, only gas in HYPE. If the cycle does not end with more than it started, the whole transaction reverts, so the worst case is the gas of a failed transaction. The protocol keeps 10% of the profit, never of the size. You keep 90%.

The current list holds -- stocks that trade in two or more pools, across -- pools. Stocks that trade in only one pool have nothing to close and are left out. The window at the top of this page reads the same pools live from chain.

Where To Start

  • The app: connect a wallet to open it, then scan every stock, pick a route, get an exact quote and run the cycle.
  • The oracle: one consensus price per stock across its pools, with a 30 minute TWAP and the spread between pools.
  • For bots: the engine ABI, quoting from a script and running your own keeper.
  • Security: invariants, the owner's powers and the known risks.
02

How A Cycle Works

A cycle is a loop through 2 to 4 pools that starts and ends in the same token, USDC or HYPE. Uniswap v4 keeps every pool inside one contract, the PoolManager. Inside unlock, a swap only books what each side owes: that is flash accounting. The books must balance when unlock returns. The engine uses that window to run the whole loop before it settles a single token.

  1. 1 Unlock
    PoolManagerThe engine opens one unlock. Every swap from here is a debt or a credit on the books.
  2. 2 Buy
    Pool AThe cheap pool hands over the stock. The USDC it is owed waits on the books.
  3. 3 Sell
    Pool BThe stock is sold where it is rich, in a v4 pool or a Ramses v3 pool.
  4. 4 Check
    Out > InIt must end with more USDC than it started with. If not, everything reverts.
  5. 5 Settle
    90 / 10The books balance. 90% of the profit to you, 10% to the treasury. Same transaction.

Step By Step

  1. Validate. 2 to 4 hops, and the path must come back to the start token, USDC or HYPE. A Uniswap v4 hop is a pool key: currency0, currency1, fee, tickSpacing, hooks. A Ramses v3 hop is a pool address, accepted only if the Ramses factory returns that same pool for its two tokens and fee.
  2. Unlock. The engine calls unlock on the PoolManager, which calls straight back into the engine. Everything below happens inside that callback.
  3. Run every hop. A v4 hop swaps on the PoolManager and leaves a balance on the books, nothing more. A Ramses v3 hop takes its input out of the PoolManager, pays the Ramses pool inside its swap callback, and settles what comes out back into the PoolManager, so every hop lands on the same books.
  4. Check. The engine ends with amountOut of the start token against the amountIn it owes. It requires amountOut > amountIn. If not, the call reverts and nothing moves.
  5. Settle and split. profit = amountOut − amountIn. The fee is profit × feeBps / 10000 and goes to the treasury; the rest goes to to, and must be at least minProfit. Every balance on the books must be zero when unlock returns, or the PoolManager reverts the whole transaction.

Every token movement settles in the PoolManager or the call reverts. Nothing stays in the engine: it holds no funds between transactions and never asks you for an allowance.

Example.Routecross venue
LegVenueWhat happens
UnlockPoolManagerThe cycle opens. The caller holds zero USDC and zero stock
BuyRamses v3wSPYx bought in its USDC pool, where it is cheap. The USDC is taken from the PoolManager as a debt, not paid
SellUniswap v4wSPYx sold for HYPE in its HYPE pool, where it is rich
HomeUniswap v4HYPE back to USDC through the HYPE/USDC pool
SettlePoolManagerThe USDC owed is paid from the proceeds; the profit is split 90 / 10

An illustration of the shape, not a trade. The app quotes every live route exactly before you sign.

03

Routes And Fee Bands

A route is the ordered list of pools a cycle passes through. It buys the stock where it is cheap, sells it where it is rich, and always comes home to the token it started with. Any hop can sit on Uniswap v4 or on Ramses v3.

Route.Types
TypeHopsPathWhat it does
Same quote2USDC → stock → USDCBuy in one USDC pool, sell in another
Same quote2HYPE → stock → HYPEBuy in one HYPE pool, sell in another
Cross quote3USDC → stock → HYPE → USDCBuy against USDC, sell against HYPE, home through the HYPE/USDC pool
Four hops4USDC → stock → HYPE → stock → USDCTwo gaps of the same stock in one cycle

The Fee Band

Every hop pays its pool's fee to that pool's liquidity providers. A gap only pays when the price difference between two pools is wider than the fees on the path between them. That sum is the fee band. Buying in a 0.05% pool and selling in a 0.30% pool costs 35 bps, so the two prices must sit more than 35 bps apart before a single dollar of profit exists.

Fee.Bandsbps, two hops
Buy in / sell in0.01%0.05%0.30%1.00%
0.01%2631101
0.05%61035105
0.30%313560130
1.00%101105130200

Plain sums of the common static fees. A cross quote route also pays the fee of its HYPE/USDC hop. A stock whose pools sit inside their band reads In band; above it, Open.

Static Fees, Dynamic Fees, Ramses Fees

  • Uniswap v4, static. A v4 pool sets its fee when it is created, as part of its pool key. Most stock pools use the familiar tiers above.
  • Uniswap v4, dynamic. Some v4 pools have a hook that sets the fee for each swap. The app shows that fee as dynamic: there is no fixed number to print, only what the hook charges at that moment.
  • Ramses v3. Concentrated liquidity in the Uniswap v3 style, with a fee on each pool. The scanner reads every pool's current fee rather than assuming a tier.

Whatever the fee type, the exact quote runs the real swaps, hooks included, so the number you sign against already has every fee in it.

Mid Edge And Size

The mid edge of a route is what a tiny cycle would earn at the pools' current prices after their fees: the product over every hop of price × (1 minus fee), minus one. It is roughly the gross spread minus the fee band. It is the edge at zero size, not a profit. For a route through a dynamic fee pool it is a guide only: the quote is what counts.

Real size moves prices. The first pool gets more expensive as you buy, the second cheaper as you sell. Profit rises with size, peaks, then falls, and the peak usually comes well before the gap is gone. The app's Best size finds it: one quoteMany call over a size grid, then a few rounds of refinement around the best point.

A cycle closes a gap down to the fee band and no further, because past that point the next dollar loses money.

Widest Gaps Right Now

Read live from chain: every stock's best route by mid edge. A positive mid edge means the gap is wider than its fee band.

Gaps.Livereading
StockPoolsSpreadBest routeMid edge
reading chain

Spread is the widest price difference between a stock's live pools. The app has every stock and every route.

04

Quotes

Quotes are not estimates. quote(route, start, amountIn) runs the whole cycle against live pool state: the real swaps, the real ticks, the real fees, every hook call. It reports amountInUsed and amountOut and settles nothing. Nothing changes on chain.

  • Unprofitable cycles quote too. A quote tells you how much a cycle would lose as well as how much it would make.
  • Not a view. quote runs swaps inside an unlock, so call it with eth_call (in ethers: staticCall), never in a transaction.
  • Many at once. quoteMany(routes, starts, amounts) quotes a list of routes and sizes in one call. An entry that fails returns ok = false instead of failing the batch.
  • Before the deploy. The engine is not deployed yet. Until it is, the app places the compiled engine at an unused address with an eth_call state override and quotes there. The numbers are just as exact; only running a cycle waits for the deploy.
Note

A quote is exact for the block it reads. Any trade can move a pool, and a hook can change its fee, between your quote and your transaction. By the time it lands the gap can be smaller, or gone. That is what the minProfit guard is for.

05

Running A Cycle

Connect a wallet to open the app. You need a wallet on Elysium with a little HYPE for gas. You never approve a token. From there a cycle is four clicks and one signature.

  1. Scan. The Scan tab lists every stock with its pools, spread, best route and net edge after pool fees. Pick one marked Open.
  2. Route. Pick a route, press Best size, and read the exact quote: cycle size, gross profit, the 10% protocol fee, the gas estimate and what you receive.
  3. Guard. Choose the least you accept: 25, 50 or 75% of your quoted share. It becomes minProfit. If the gap shrinks below it before your transaction lands, the cycle reverts instead of paying you less.
  4. Run. Press Run Cycle and sign. The button reads No Gap Right Now when the quote is not positive. Until the engine is deployed, quotes work and the button says the engine deploys soon.

After it lands, the app shows the real profit from the receipt and links the transaction on the Elysium explorer. If it reverts, the app says why in plain words.

Before.You.Sign
NeedWhat
NetworkElysium, chain id 99901
GasHYPE, a few cents a cycle
CapitalNone
ApprovalsNone
Explorerelysium.kinetiq.xyz
Reverts.Plain
ReasonMeans
No profitThe gap closed. Nothing moved but gas.
Below guardIt still paid, but less than your minProfit.
ExpiredPast the deadline. Quote again.
PausedThe owner paused cycles. Quotes still work.
Short fillA pool could not fill the size.
06

Fees

  • 10% of the profit, never of the size. The protocol fee is 1000 basis points of a cycle's profit. You keep 90%.
  • Zero on a loss. A cycle without profit reverts, so there is nothing to take a share of. You pay the gas of the failed transaction.
  • Same transaction, same token. The fee is paid in the start token (USDC or HYPE) to the treasury inside the cycle. It rounds down.
  • Capped at 20% in the code. The ceiling is a constant. The owner can set the fee anywhere from 0 to 20% and never above.
  • Pool fees are not ours. Each hop pays its pool's fee to that pool's liquidity providers, and a dynamic fee pool charges what its hook sets. Every quote already includes them.
  • Gas is yours. Paid in HYPE on Elysium, a few cents for a cycle.

The engine is the authority on the live fee: the app reads it from the engine once it is deployed. Your minProfit is what you want to receive, after the fee.

07

Risks

Flash cycles cannot lose your principal, because there is none. They can still cost you, and nothing here is guaranteed.

  • Profit is not guaranteed. A quote is exact for one block. The pools can move before your transaction lands.
  • Another bot can take the gap first. Then your cycle no longer pays, reverts, and costs you gas.
  • A cycle that no longer pays reverts and costs gas. Every failed attempt costs that transaction's gas and nothing else.
  • Hooks can change fees. A dynamic fee pool's hook decides its fee for each swap, and can charge more when your cycle lands than when you quoted. Your guard reverts the cycle instead of paying you less. Hooks are third party code: the engine trusts the PoolManager's books, not the hook.
  • Bridged tokens. EQX Labs tokens and wrapped xStocks are issued off Elysium and bridged in from the Hyperliquid side. They track a share; they are not the share. Their issuers and bridges can pause, restrict or fail, and while a token is paused every route through it reverts.
  • Lookalike tokens. The app only builds routes from the stock list in the config, matched by address, never by ticker. A hand built route through any other token is the caller's choice. The engine holds nothing, so it has nothing to lose to one.
  • Contract risk. The engine is new, not deployed yet, and has not had a third party audit. See Security.
  • Owner powers. One owner key can pause cycles (quotes keep working), set the fee anywhere up to 20%, change the treasury and rescue tokens sent to the engine by mistake. It cannot touch a cycle's funds or yours.
  • Chain and data. Elysium is a young Arbitrum Orbit chain, on mainnet since Nov 9, 2026, with one sequencer: if it stops, nothing settles. It settles to HyperEVM and depends on it. If our read proxy fails, pages show the last snapshot with its date.
  • Not advice. ElyStocks is software, not a broker, and gives no investment advice. It is not affiliated with Kinetiq, Hyperliquid, Uniswap, Ramses, EQX Labs or any stock token issuer.
08

For Bots

The engine is public: anyone can call arb, from a wallet or a script, and the protocol fee is the same for everyone. The ABI and the pool list ship with the site as plain ES modules: /js/abi.js (ENGINE_ABI) and /js/config.js (ENGINE and UNIVERSE, every stock with its pools). This page never prints an address: read ENGINE.address from the config. It stays blank until the engine is deployed.

ENGINE (core)
// a route is a list of 2 to 4 hops; each hop is one of:
//   a Uniswap v4 pool key (currency0, currency1, fee, tickSpacing, hooks)
//   a Uniswap v3 style pool address (Ramses v3), checked against that DEX's factory
// start is USDC or HYPE; the exact encoding of every argument is in /js/abi.js

function arb(route, start, amountIn, minProfit, to, deadline)
function quote(route, start, amountIn)             // eth_call: amountInUsed, amountOut
function quoteMany(routes, starts, amounts)       // eth_call: one result per entry, ok = false on failure
function path(route, start)                        // view: the tokens the route passes through
ENGINE_ABI (full, from /js/abi.js)open
Open to load the ABI from /js/abi.js.

Quote From A Script

The site's own modules run in Node 22 as they are: js/chain.js reads every pool and builds the routes, and js/engine.js quotes them. Run from the repo root.

quote.mjs
// exact quote for the best live route of one stock
import { readUniverse } from './js/chain.js';
import { bestSize, quote, split } from './js/engine.js';

const u = await readUniverse();                       // every stock, every pool, every route
const stock = u.stocks.find((s) => s.symbol === 'EQTSLA');
const route = stock?.best;                            // highest mid edge, or null
if (!route) throw new Error('no route right now');

const size = await bestSize(route, u.hypeUsd);        // size grid, then refine
const q = await quote(route, size.amountIn);           // { ok, amountInUsed, amountOut, profit }
console.log(route.label, q.profit, split(q.profit));  // profit is negative when it would lose

Sizes In One Call, And Quoting Before The Deploy

grid.mjs
// continues quote.mjs: three sizes of the same route in one quoteMany eth_call
import { quoteGrid, isLive } from './js/engine.js';

const grid = await quoteGrid(route, [250, 1000, 5000], u.hypeUsd);
for (const g of grid) console.log(g.sizeUsd, g.ok ? g.profitUsd : 'failed');

// before the deploy, engine.js puts the compiled engine (ENGINE_RUNTIME in /js/engine-code.js)
// at an unused address with an eth_call state override; after it, it calls ENGINE.address
console.log(isLive() ? 'deployed engine' : 'state override');

Run Your Own Keeper

A keeper is a loop: read every pool, quote the best route with quote through an eth_call, and send arb when the quote clears the gas. The modules this site runs on are plain ES modules served from the site itself (/js/chain.js, /js/engine.js, /js/rpc.js), so a script can reuse them or follow the same steps:

keeper loop
// 1. read: every pool of every stock in one Multicall3 eth_call
const u = await readUniverse();
// 2. pick: the stock routes with the widest edge after pool fees
const route = u.best;
// 3. quote: the engine simulates the whole cycle at a grid of sizes, one eth_call
const best = await bestSize(route, u.hypeUsd);
// 4. send: only when your 90% of the profit beats the gas, with minProfit as a guard
if (best.profitable && best.toYouUsd > gasUsd) {
  // arb(route.route, route.startAddress, best.amountIn, minProfit, you, deadline)
}

Until the engine is deployed, quotes come from the state override and there is nothing to send. Public nodes answer an occasional rate limit: read in batches and retry quietly.

09

Security

What the engine must never do, and how that is enforced:

  • It holds nothing between transactions. Profit leaves in the same transaction it is made.
  • Every token movement settles in the PoolManager. If any balance is left open when unlock returns, the whole call reverts.
  • Only real pools. A v4 hop is a pool key the PoolManager itself resolves. A Ramses v3 hop must be the exact pool the Ramses factory returns for its tokens and fee.
  • Profit or revert. A cycle that does not end with more than it started reverts, and so does one that pays you less than minProfit.
  • The fee is capped at 20% in the code.
  • Narrow owner powers. Pause stops arb while quotes keep working; fee, treasury and rescue of stray tokens. Ownership moves in two steps, and renouncing it is disabled.

The owner's exact powers, the review scope and the known risks are on the Security page.

10

FAQ

Do I need any tokens to run a cycle?

No. Only HYPE on Elysium for gas. The engine swaps first and settles at the end of one Uniswap v4 unlock, before the transaction ends.

What if the gap closes before my transaction lands?

It reverts. Nothing moves, and you pay the gas of a failed transaction.

How much does ElyStocks take?

10% of the profit of a cycle, in the same transaction. Nothing of the size, and nothing on a loss.

Can the fee go up?

The owner can set it between 0 and 20%. The 20% ceiling is a constant in the contract; nobody can go above it.

Do I approve anything?

No. The engine never asks for an allowance and never holds your tokens.

Is the engine live?

Not yet. Quotes already work, exactly, through a state override. Running a cycle opens when the engine is deployed.

Which stocks can I arb?

Every tokenized stock on Elysium that trades in two or more pools on Uniswap v4 or Ramses v3: -- in the current list, EQX Labs tokens and wrapped xStocks alike.

Why does a pool say dynamic?

It is a Uniswap v4 pool whose hook sets the fee for each swap, so there is no fixed tier to show. The quote runs the hook and includes whatever it charges.

Why do quotes change every few seconds?

Every trade moves a pool. The app quotes again every 6 seconds while the tab is open.

Is this investment advice?

No. ElyStocks is software. Profit is never guaranteed and a failed cycle costs gas.

11

Glossary

bps
Basis points. 1 bp is 0.01%, 100 bps is 1%.
Elysium
An Arbitrum Orbit L2 built by Kinetiq that settles to HyperEVM. Gas is paid in HYPE.
Cycle
One arb call: unlock, run every hop, check the profit, settle, split.
PoolManager
The one Uniswap v4 contract that holds every v4 pool and keeps their books.
Flash accounting
Inside unlock, swaps only record what is owed; balances settle at the end, and must reach zero.
Pool key
What names a v4 pool: currency0, currency1, fee, tickSpacing, hooks.
Hook
A contract attached to a v4 pool that runs around its swaps. Some set the fee.
Dynamic fee
A v4 pool fee set by its hook for each swap, shown as dynamic.
Ramses v3
A concentrated liquidity DEX in the Uniswap v3 style, the second venue ElyStocks routes through.
Route
The ordered pools of a cycle, 2 to 4 of them, starting and ending in the same token.
Hop
One swap in one pool: a v4 pool key or a Ramses v3 pool address.
Start token
USDC or HYPE: what the cycle starts with, ends in and pays profit in.
HYPE
The gas token of Elysium and the second quote token of stock pools. A HYPE/USDC pool links the two sides.
Fee tier
A pool's swap fee, such as 0.05 or 0.30%, paid to its liquidity providers.
Spread
The widest price difference between a stock's live pools, in bps.
Fee band
The sum of pool fees on a route. A gap inside it does not pay.
Mid edge
What a tiny cycle would earn at current prices after pool fees: roughly spread minus fee band.
Profit
What a cycle ends with minus what it started with.
Protocol fee
10% of the profit, to the treasury, capped at 20% in the code.
minProfit
The least the caller accepts to receive after the fee. Below it the cycle reverts.
State override
An eth_call option that runs code at an address as if it were deployed there. The app quotes this way until the engine is deployed.
Keeper
A script that scans for gaps and runs cycles on its own.