A vault that publishes a two-sided market around a mid it keeps in its own storage.
It holds HYPE and one quoted ERC-20. No oracle, no pool, no price feed — the quote is a pure function of (hypeReserve, assetReserve, midX96) and the public constants below. Takers call buy() and sell(); the spread stays with the LPs, because the LPs are the ones carrying the inventory it pays for.
src/Gimbal.sol · the protocol's only take is FEE_BPS — bps of the HYPE leg, charged on top of the spread so it can never turn a fill the LPs wanted into one they did not.
Elysium is not HyperEVM, and it carries none of HyperCore.
Chain — is an Arbitrum Orbit L2 that settles on HyperEVM. The sixteen HyperCore read precompiles at 0x…0800–0x…080F and CoreWriter at 0x3333…3333 all return zero bytes of code.
So no contract deployed on Elysium can open, read or verify a Hyperliquid position. Not this one, not a better one, not today. Most projects hide that behind the word mirrored; this one puts it in the middle of the design.
Read off the live chain in test/ForkMontra.t.sol, and re-read in your browser on the panel. Check it yourself: cast code 0x…0807 --rpc-url https://rpc.elysium.kinetiq.xyz → 0x.
MID_DRIFT_FULL_BPS — with MAX_FILL_BPS — = 1 bp of mid movement per fill. Price discovery has to be slower than the spread it moves inside.
RECENTRE_FULL_BPS — is forced by one inequality: 450 > 30 + 270. Below it, a fully long book would still ask more than its own mid for the asset it is desperate to shed.
The engine works internally in parts per million, not basis points: a shade of "4.5 bps" floored to "4 bps" is the difference between the gimbal re-centring and doing nothing. That was a real bug, found by a test.
The hedger bonds. The watchers sign. The contract's job is not to believe them.
A Hedge is (account, size, isLong, markX96, timestamp, nonce), signed EIP-712. The hedger holds the key to the Hyperliquid account, so the hedger is the only party who can actually move the perp leg — which is why the hedger is the one who bonds. But the hedger's signature over the hedger's own position is worth nothing: it would sign whatever keeps the book quoting.
A Hyperliquid position is public per address, so any number of independent watchers can read the same position off the same API and sign what they see. Hence a quorum of 3 of 5, with the hedger's bond behind it.
The constructor enforces quorum × 2 > n, and that single inequality is what makes a contradiction provable on chain with no oracle: two quorums of a set cannot be disjoint, so if two different payloads both carry a quorum for the same nonce, at least one watcher signed both. That is the only fault the chain can see by itself, which is exactly why it is the one that slashes.
test_NoTwoQuorumsOfThisSetAreDisjoint enumerates all ten 3-of-5 subsets and all pairs of them rather than taking the algebra on trust. A proven contradiction is final: a signer set that has double-signed once cannot be trusted to say when it has stopped. The bond splits CHALLENGER_BPS —% to whoever proved it, the rest into the vault's reserves.
It can stop this book. It can never price it.
The mid never moves toward the attested mark. Rule 5 is not the mirror setting a price; it is the book admitting that if the two disagree by more than —%, one of them is quoting a market that no longer exists and it does not know which.
Rule 6 is measured against the neutral inventory, not against the exposure, on purpose: a ratio whose denominator is the exposure goes to infinity every time the book passes through level, and a halt rule that fires at every level book is a halt rule nobody will keep.
The full table, with every verdict, is on the panel, and all six of its states are clickable on the book.
The halt never closes the door.
- An LP is not a counterparty to the hedger. A safety stop that locks LPs in is not a safety stop, it is a hostage.
- A pro-rata in-kind exit takes the same fraction of both reserves, so it cannot move the tilt and therefore cannot move the quote. There is nothing to arbitrage by withdrawing.
deposit(), by contrast, is refused while the book is Shut: a deposit into a vault whose signer set has been caught lying would dilute the very LPs the slash was paid to.- The bond cap is not a taste: STAKE_MULTIPLE —× is exactly
2 × 10 000 / MAX_DRIFT_BPS. Past it the bond stops covering the worst position the halt rule permits, and a bond that does not cover the exposure is theatre. - A seed must be level to within SEED_TOLERANCE_BPS — bps: a market maker that opens tilted is a position with a spread painted on it.
test_AWithdrawalDoesNotMoveTheQuote asserts the quote is bit-identical afterwards.
Ballast ships unarmed.
GIMBAL would be launched on Montra, the Elysium launchpad, like any other launch: the same factory, the same fixed 1e27 supply, the same Uniswap v4 pool. There is no ERC-20 for it in the repository and nothing to pre-mine, because the pad does not have an allocation to give. LP shares in the vault are internal accounting, not a token.
So the fee piles up as HYPE and trim() refuses until arm() is called, and the only thing arm() accepts is a token that answers factory() with the pad's own factory. A launch the pad did not make cannot be armed in, not by anyone, including the steward.
There is no Universal Router on Elysium, so the swap goes through PoolManager.unlock and Ballast's own unlockCallback, settling the native side with settle{value:} and taking the token side straight to 0x…dEaD — the tokens never rest in a contract that could be persuaded to let go of them.
The buyback is held to the same standard as the book: it will not trade on a price it cannot read, so its minimum comes from the token's own Gauge, a pull TWAP over a v4 pool with four density rules.
| Constant | Value | Why |
|---|
Every row is public constant in the Solidity and carries a comment there justifying it. This table is built from js/config.js, which is a name-for-name transcription — so a constant cannot drift between the contract, the simulation and the words describing it without one place to fix.
170 tests, and the halt rule twice.
| Suite | n | What it is |
|---|---|---|
| Quote | 30 | the three gimbal behaviours, each attacked on its own; fills, rounding, the fee, the ladder |
| Mirror | 37 | quorum overlap, signature ordering, nonces, timestamps, bonding, challenge and slash |
| Vault | 22 | seed, deposit, withdraw, withdraw mid-halt, the bond cap, solvency |
| Halt | 22 | the rule table, twice — once off a stub mirror so every branch is reached, once through the real one |
| Ballast | 16 | unarmed, arming, the buyback's refusals |
| ForkMontra | 13 | against Elysium mainnet at the live head |
| Gauge | 11 | the four density rules |
| Gas | 7 | ceilings on the quote path |
| Invariant | 7 | 6 invariants plus a check that the driver drives |
| Flow | 4 | fill → fee → sweep → arm → burn, end to end |
| Dump | 1 | writes the engine vectors this site's JS is diffed against |
A rule that is only ever tested through the contract that prevents it is a rule nobody has tested — hence the stub.
Read this part.
- Nothing is deployed. No mainnet, no testnet. There is no GIMBAL token yet.
- The hedge is attested, not verified. The contract never checks that a Hyperliquid position exists — no contract on Elysium can, for the reason measured in the fork test.
- A colluding quorum is not caught. The challenge path proves self-contradiction. A quorum that lies consistently is never contradicted. What bounds it is MAX_ATTEST_AGE (the lie must be re-told every — s, on the record, by name), the drift rule, and STAKE_MULTIPLE. That is a bound on the damage, not a proof of honesty.
- The watchers have no bond of their own — only the hedger does, so the incentive is indirect.
- The signer set is fixed at construction. No rotation, no governance, no upgrade path.
- The mid is path-dependent and can be walked, slowly — 1 bp per fill, which is intended, but a patient well-capitalised taker can drag it.
- MAX_SKEW_BPS is a stop, not a hedge. When the book halts a side the LPs are left holding the tilt.
- No keeper, no cron, no bot:
Gauge.read(),sweepFees(),trim()andchallenge()are permissionless and unpaid. - The quoted asset is trusted to be a well-behaved ERC-20. One asset per vault. Not audited.
The same list, longer, is the last section of the repository's README.
The market page draws a quote ladder, and since nothing is deployed it has to compute one. So js/engine.js is a BigInt port of the engine, and the port is checked rather than claimed.
forge test --match-contract DumpTest writes 64 books and their prices straight out of the Solidity; node tools/mirror.mjs recomputes 960 numbers and diffs them to the wei. If the port drifts, that script fails.
Three independent pad launches rebuild to their own event's poolId.
Lotus, DEAL and Milly — made days apart — each rebuild from nothing but their token address to exactly the poolId their own Launched event carried in topics[3]. One match could be luck; three is the constant set being right. Changing any field of the key breaks the match.
And the whole book runs on the real chain: a vault seeded with a real pad token at the mid implied by its real pool, a real fill at the cap, then the book going Shut when the attestation goes stale.
| factory | 0x38D3…cD15 |
| hook | 0x6b12…f8EC |
| PoolManager | 0xE2e1…23F1 |
| fee | 0x800000 dynamic |
| tickSpacing | 200 |
| supply | 1e27, fixed |
The pool key is (address(0), token, fee, tickSpacing, hook) — the native side is ETH-style address(0), which on Elysium is HYPE. Every value checked against the real chain in test/ForkMontra.t.sol.