How Kynex works on Elysium
A pair perpetual is one position on the ratio of two Hyperliquid markets, margined and paid out in HYPE. This page covers where the price comes from, who pays whom, and what happens when something goes wrong.
The trade
A market is an ordered pair. NVDA/SP500 is how many units of the S&P 500 one NVDA buys. Long is a bet that NVDA does better than the index while you hold it. It says nothing about whether either goes up.
Nothing is bought. You send HYPE as margin, the contract records a size and an entry mark, and when you close it pays you the result in HYPE.
Profit is linear in the ratio. A long of size N entered at R₀ makes N · (R − R₀) / R₀ HYPE, and a short makes the negative of that.
Send 1.005 HYPE to open 5 HYPE of long NVDA/SP500 at 5×: 1 HYPE of margin plus the 0.10% open fee. NVDA beats the index by 4%, so the position is up 0.2 HYPE. Closing costs another 0.10% of size, 0.005 HYPE, so 1.195 HYPE comes back, less a little funding if the book leaned long.
The mark
Each leg is priced from Hyperliquid's oracle price for that market, read from Hyperliquid's public API and signed as Print(id, price, ts) by one feed key. The oracle contract is fixed to that key at deployment and has no function to change it.
Anyone can carry signed prints into the oracle, and every open, close and liquidate takes them as an argument and posts them first. That way your trade is priced in the same transaction it happens in. Before a print is stored, the oracle checks that:
- it is signed by the feed key, for a listed market;
- it is no more than MAX_FUTURE ahead of the chain clock;
- it is newer than the stored print (an older one is skipped, not reverted);
- it is within MAX_MOVE_BPS of the stored price, unless that price is a day old.
A stored price can be traded on for MAX_AGE seconds. A pair also needs its two legs signed within PAIR_SKEW seconds of each other, so a fresh price for one leg is never divided by an old price for the other.
Funding
Both legs are financed in the same HYPE, so carrying a pair costs nothing. Funding only reflects the imbalance: it is zero when longs and shorts are equal, and the heavy side pays the light side at a rate proportional to skew / (longs + shorts), up to 1.20% / day when the book is entirely one-sided.
The two sides differ in size by exactly the skew, so the vault, which carries that skew, collects the funding rate on precisely the risk it holds. Nothing is credited until positions settle.
Leverage
No market can go above 5×. Each pair has its own cap at or under that: 5× on NVDA/SP500, BTC/ETH and SOL/ETH, and 3× on TSLA/SP500, HYPE/BTC and GOLD/SILVER, whose gaps move faster. Each side of each market also has its own open interest cap.
Liquidation
When equity (margin plus profit, minus funding) falls below 500 bps of size, anyone can liquidate the position with a fresh pair of prints. The liquidator keeps up to half of that 5%, taken from what is left in the position, never from the vault. The rest goes to the vault. Liquidation is never allowed on a stale price.
The Kynex keeper checks every open position every 30 seconds and liquidates the ones under the line, carrying its own signed prints.
The exit
Closing needs a fresh pair of prints, which anyone can fetch from the public feed, so in practice you can close at any moment. Closing still works while a market is paused. If the feed goes silent on a leg for ESCAPE_AFTER (one day), positions close at the last stored prices instead, so a dead feed never traps anyone.
If your address refuses the HYPE (a contract with no way to receive it, for instance), the payout is recorded as owed to you and claim() collects it later. A refused payout can never block a close or a liquidation.
The vault
The vault is the counterparty. Longs and shorts cancel against each other first, so the vault only carries what is left over, and the total left over across every market can never be more than 100% of the vault. An open that would cross that line reverts, and so does a withdrawal that would leave the vault below it.
Depositors earn what traders lose, the funding, and the vault's share of every fee. They also pay what traders win. The first deposit into an empty vault must be at least 0.1 HYPE.
Deposit with the button on the desk. HYPE sent straight to the engine address is reverted, because the contract has no plain receive function.
Fees
10 bps of size to open and 10 bps to close. 20% of each fee goes to the treasury and the rest to the vault.
Parameters
Read from the deployed contracts when you loaded this page.
| Parameter | Value | What it does |
|---|
Reading…
Contracts
Elysium, chain ID 99901. All unaudited.
The owner can list and pause markets, set the open interest caps, and set fees and funding within hard limits written into the contract. It cannot move anyone's margin or vault share, change a price, or replace the feed key.
What can go wrong
- The contracts are unaudited. They have a test suite with fuzzing, and the full lifecycle has been run against a fork of Elysium with live Hyperliquid prices. That is not an audit.
- The feed key is trusted. If it leaked, it could sign wrong prices within the 30% step limit.
- Gaps happen. If two legs split apart fast, a position can pass its liquidation price before anyone liquidates it. The vault takes that loss.
- Leverage does what leverage does. The liquidation mark is on the ticket before you open.
- The vault can lose. Depositing means taking the other side of the book.
Nothing here is investment advice.