Operator limits and safety
The operator that runs a basis vault holds a hot key, and the contract is written as if that key could leak. Every trade and transfer it makes is checked against bounds in the contract, it loses its powers when it falls behind, and exits never depend on it.
Roles
- Owner
- Sets parameters and roles within the contract's caps, unpauses, starts the wind-down (
startClosing). Ownership cannot be renounced, and changes in two steps. - Guardian
- Pauses in an emergency. With the owner, it can settle at any time and unwind the position, also while paused or through a depeg.
- Operator
- Ported's keeper. Builds, rebalances and unwinds the position and settles epochs, inside the bounds below, only while the vault is not paused and not overdue.
- Fee recipient
- Receives performance fee shares. No powers.
- Anyone
- Can settle and unwind an overdue vault, inside the same bounds as the operator.
During the test phase these roles are held by the team. Who can do what, chain by chain, is on Roles and powers.
The operator's bounds
| Bound | Parameter | What the contract checks | Hard limit |
|---|---|---|---|
| Price band | maxSlippageBps | An order's limit price must be within the band of a reference: the perp mark for perp orders, the perp oracle for spot orders, so pushing the spot book cannot drag the band. | At most 3% |
| Leg balance | maxImbalanceBps, imbalanceFloorUsd | After buySpot, openShort, sellSpot or closeShort, neither leg may exceed the other by more than a floor in dollars plus a share of the larger leg. | Share at most 20%, floor at most $100,000 |
| Margin | minMarginBps | Opening more short, or moving USDC out of perp margin, may not leave the perp account value below this share of the short's notional. | At least 30%, so never above about 3.3x |
| Hourly notional | maxNotionalPerHour | Total order notional, in a window that drains linearly over one hour. | Must be set above zero |
| Cooldown | cooldown | After any order or transfer, the next action and any settlement wait this long, so every check reads the previous action's result. | 5 seconds to 10 minutes |
| Cash buffer | minCashBps | Moving USDC to HyperCore must leave this share of the vault's value on HyperEVM, plus the cash owed to redemptions already queued. | At most 50% |
| Epoch age | minEpochDuration | The operator cannot settle an epoch younger than this. | At least the cooldown |
Orders are immediate-or-cancel, sized in the coin's lot size and priced under HyperCore's tick rules, and only on the vault's own coin and perp: the market is fixed at creation and no function takes another. The operator also cannot move cash to HyperCore while the vault is closing, or after a settlement that left redemptions unpaid.
A leaked operator key can still trade inside the price band and the hourly limit until the guardian pauses the vault. That is the residual risk the bounds are sized against.
The overdue rule
A vault is overdue when either of these holds:
- The current epoch has been open for
maxEpochDurationor longer (at most 7 days). - A settlement left redemptions unpaid, and they have stayed unpaid for
maxEpochDurationor longer.
While a vault is overdue, the operator loses its trading and transfer powers: those calls revert with EpochOverdue. Anyone, the operator included, may call settleEpoch, and anyone may unwind the position with the same bounds the operator has (price band against the oracle, leg balance, margin floor) but without the hourly limit, then bring the USDC back to HyperEVM so the next settlement pays redemptions. Queued requests can be cancelled. The vault stays overdue until a settlement opens a fresh epoch and pays every queued redemption in full.
Who can unwind, and how
The unwinding functions (sellSpot, closeShort, spotToPerp, perpToSpot, spotToEvm, hypeToCore) decide the caller's role from the vault's state:
| Role | Who | Spot sells priced against | Leg balance | Hourly limit |
|---|---|---|---|---|
| OPERATOR | The operator, vault not paused and not overdue | Perp oracle | Checked | Counted |
| TRUSTED | The guardian or the owner, at any time | The spot book itself | Not checked | Not counted |
| PUBLIC | Anyone, only while overdue | Perp oracle | Checked | Not counted |
The trusted roles skip the balance check and price spot against its own book so they can always get out, even when the spot coin has depegged from the oracle and an oracle-anchored band would refuse every sale. Only the operator can add exposure (buySpot, openShort); the margin floor applies to everyone moving USDC out of perp margin.
depositToCore paths
depositToCore(amount, toPerp) moves free USDC from the vault on HyperEVM to its own HyperCore account, either to the spot balance or straight to perp margin. Two callers, two sets of rules:
- Operator
- Not while paused or closing, not while redemptions from the last settlement are unpaid, and only if the cash left behind covers minCashBps of the vault's value plus the value of shares queued for redemption.
- Guardian or owner
- Only to perp margin, at any time, paused included, up to the free cash. This is the emergency top-up for a short close to its margin floor.
- Anyone else
- Never, not even when the vault is overdue: an overdue vault only moves money back toward holders.
Pause and wind-down
The guardian or the owner can pause(); only the owner can unpause(). A pause suspends the operator entirely, so it is also the way to stop a leaked keeper key at once.
| Paused | Closing | |
|---|---|---|
| New deposits | Refused | Refused |
| New exposure (buySpot, openShort) | Refused | Refused |
| Operator | Suspended | May unwind and settle |
| Queue a redemption | Allowed | Allowed |
| Instant redemption | Allowed | Allowed |
| Cancel queued requests | Allowed | Allowed |
| Claims of settled epochs | Allowed | Allowed |
| Settlement and unwinding | Guardian and owner; anyone once overdue | Operator, guardian and owner; anyone once overdue |
startClosing() is the owner's permanent wind-down, for example if Hyperliquid delists the perp: no deposits and no new exposure, the position is unwound to USDC and holders redeem through epochs. There is no function to reopen a closing vault.
Risks
- Negative funding. When shorts pay longs, the vault pays. The vault steps out to USDC when funding stays low, but returns can be negative for a while, and stepping out and back in costs trading fees.
- The spot token. Outside HYPE, the spot leg is a token that stands for the coin on HyperCore: UBTC, UETH and USOL, issued by Unit against coins it holds on their own chains. If that token trades below the coin, or Unit stops redeeming it, the spot leg loses value while the short does not make it up. The guardian and owner can still sell it against its own book (see above), at whatever price the book gives.
- Basis. Spot and perp prices are close, not identical. The gap moves the value of a share from day to day, and an exit at a bad moment realises it.
- Liquidation of the short. A fast rise in the price thins the short's margin while the gain sits in the spot leg. The operator rebalances well before the margin floor, and the guardian can top up margin from HyperEVM cash, but a move fast enough, or a keeper that is down, can get the short liquidated, which closes it at a loss and leaves the vault unhedged until it is rebuilt.
- Execution. Trading fees, spread and thin spot books on some coins cost money each time the position is built, rebalanced or unwound. The price band limits how bad a single order can be, not how often trading happens.
- The operator and the keys. The keeper runs the position. A keeper that is down leaves the hedge unbalanced as the price moves and settlements late; exits then fall back on the overdue rule above. A wrong or leaked operator key is bounded by the price band and the hourly limit, and stopped by a pause.
- Hyperliquid. The vault depends on HyperCore, its oracle, its read precompiles and CoreWriter. Everything in Trust and risks about Hyperliquid applies.
- Contracts. The vault contracts have had internal review rounds, not an independent audit yet. See Reviews.