Security, Plainly
The engine is not deployed yet and has not had a third-party audit. This is its review in the open: what it must never do, how the code enforces it, the risks that remain, and what the owner can and cannot change. Test results land here once they are real.
Summary
Status, Dec 2, 2026: the engine is being built around Uniswap v4 flash accounting. Its tests and an internal review are in progress, and it is not deployed. Until it is, the app quotes through an eth_call state override and the Execute button reads Engine Deploys Soon.
Scope
| Contract | engine | One contract that checks a route, runs the cycle, settles it and splits the profit. |
| Chain | Elysium | Chain id 99901, an Arbitrum Orbit L2 built by Kinetiq that settles to HyperEVM. Gas is paid in HYPE. |
| Talks to | Uniswap v4 | The Uniswap v4 PoolManager and its pools, Ramses v3 and other Uniswap v3 style pools checked against their factory, USDC, HYPE and the stock tokens on the route. Nothing else. |
| Holds | nothing | No balance between transactions, no user deposits, no approvals from callers. |
| Status | engine | Not deployed yet. The app quotes in preview. |
| Reviewed by | in progress | Tests and an internal review are being written with the engine. No third-party audit yet. |
Invariants
What the engine must never do and how the code enforces it. The tests that check each one are being written with the engine; until they run, every row reads TESTING.
| ID | Invariant | Enforced by | Status |
|---|---|---|---|
| I-01 | The engine holds nothing between transactions. | Profit and fee leave inside arb. Every cycle starts and ends with the engine's balance where it was. | TESTING |
| I-02 | Every token movement settles, or nothing happens. | The cycle runs inside one Uniswap v4 unlock. Flash accounting books every delta, and the PoolManager reverts the whole call if anything is left unsettled when the unlock closes. | TESTING |
| I-03 | Only real pools. | A v4 hop is a pool key (currency0, currency1, fee, tickSpacing, hooks) that the PoolManager resolves itself. A v3 style hop must be the pool its DEX's factory returns for those tokens and that fee. | TESTING |
| I-04 | Routes start and end in USDC or HYPE. | 2 to 4 distinct pools, each trading the token the cycle holds, and the path must return to its start. | TESTING |
| I-05 | Profit or revert. | The cycle must end with more than it started, and the caller's share must reach minProfit. Otherwise the transaction reverts. | TESTING |
| I-06 | The fee never exceeds 20%. | The cap is a constant in the code; setFee reverts above it. | TESTING |
| I-07 | Payouts match the reported split. | fee = profit × feeBps / 10000 to the treasury, the rest to to, both reported in the cycle's event. | TESTING |
| I-08 | A quote is what arb realises. | quote runs the same swaps in an eth_call and reverts at the end, so it changes nothing. | TESTING |
| I-09 | Callbacks come only from where they should. | The unlock callback is accepted only from the PoolManager during a cycle the engine opened; a v3 style swap callback only from the pool the engine is calling. | TESTING |
Test Status
The engine is being built on Uniswap v4 flash accounting, and its test suite is being written with it. This page shows no counts until the suite runs; when it does, the real numbers go here.
| Group | What it checks | Status |
|---|---|---|
| Unit | Every revert path, the fee math, hostile tokens and hostile callers, against mock pools. | IN PROGRESS |
| Fuzz | Random fees, sizes and prices thrown at the split and the quote. | IN PROGRESS |
| Fork | Real Elysium pools on a local fork: push one pool out of line, quote, run arb from an account that holds nothing, check profit, fee and a zero engine balance. | IN PROGRESS |
| Review | An internal read of the code against the invariants above. | IN PROGRESS |
| Audit | A third-party audit. | NOT YET |
Dec 2, 2026. No results are claimed until a run produces them.
Known Risks
What tests cannot remove. Each one is also in the docs.
Cycles are public and race each other. The one that lands second finds a smaller gap: it reverts and its caller pays gas. Mitigation: the minProfit guard and a short deadline.
Any trade between the quote and the moment a cycle lands can shrink the gap. The cycle then pays less or reverts. It never pays out of your pocket, because nothing of yours is in it.
Some Uniswap v4 pools use a hook that sets the fee per swap. The quote runs the real hook, so its fee is inside the number, but the hook may charge differently by the time the cycle lands. Mitigation: minProfit makes the cycle revert instead of paying less than you accepted.
The stock tokens are issued by third parties (EQX Labs, xStocks) and bridged in from the Hyperliquid side. An issuer or a bridge may pause or restrict transfers. Swaps through a paused token revert, so every route through it reverts too. The engine holds nothing that could be stuck.
One key can pause cycles, set the fee up to 20%, change the treasury and rescue stray tokens (the full list is below). It cannot touch a cycle's funds or yours. Ownership moves in two steps, and renouncing it is disabled: an engine without an owner could never be paused.
Anyone can deploy a token with a stock's ticker and give it a pool. That cannot hurt the engine, which holds nothing, but a route through a lookalike is the caller's own choice. The app only builds routes from the stock list in the site's config, matched by address, never by ticker.
Elysium is an Arbitrum Orbit chain with one sequencer. If it stops, no cycle settles. Pages read the chain through a read-only proxy; when it fails they show the last snapshot and say so.
The Owner's Powers
| Power | Function | Limit |
|---|---|---|
| Pause cycles | setPaused(bool) | Stops arb only. quote and quoteMany keep working. |
| Set the fee | setFee(uint16) | 0 to 2000 bps (20%) of profit. Reverts above. Planned at launch: 10%. |
| Set the treasury | setTreasury(address) | Where the protocol's share of each profit goes. Not the zero address. |
| Rescue stray tokens | rescue(token, to, amount) | Tokens sent to the engine by mistake. Never a cycle's funds, which settle inside the cycle. |
| Hand over ownership | transferOwnership, acceptOwnership | Two steps: nothing changes until the new owner accepts. |
| Renounce | renounceOwnership() | Disabled. Always reverts. |
What The Owner Cannot Do
- Set the fee above 20%, or take a fee from a cycle that lost.
- Take a cycle's funds or yours. Every token movement settles in the PoolManager inside the cycle, and the split is paid at the end.
- Stop quotes. Pausing blocks
arbonly. - Move anyone's tokens. Callers approve nothing.
- Charge on size. The fee is a share of profit, never of the amount a cycle moves.
- Leave the engine without an owner. Renouncing is disabled, so someone can always pause it.
How It Ships
Tests and review first. The engine deploys only after its suite runs green against mock pools and a fork of real Elysium pools, and the results are on this page.
The owner deploys. Nothing broadcasts without the owner, from the owner's own machine.
Report An Issue
Found something? Send a DM to @Elystocks on X with what you found and how to reproduce it. Please give us time to fix an exploitable issue before you post it in public.
DM On X