Veyronn Documentation
Trading Lifecycle
Follow a Veyronn position from quote to settlement.
Open
The app requests a fresh oracle report and constructs an OpenRequest containing market ID, side, USD size, collateral, expected price, and maximum slippage. The report and trade execute atomically through the oracle router. The protocol:
- verifies account and market state
- reads the side-aware execution price
- checks freshness, confidence, slippage, leverage, open interest, skew, and vault capacity
- charges the open fee
- reserves collateral
- updates market open interest
- records the position and emits
PositionOpened
While open
The frontend marks the position with live oracle observations. The keeper reacts to affected markets and:
- updates funding
- simulates open positions for liquidation eligibility
- evaluates active TP/SL and conditional orders
- executes individually signed delegated intents
Reduce or close
A close request can specify a partial reduceSizeUsd or use zero to close the entire remaining position. Settlement applies:
- long PnL from
exit - entry - short PnL from
entry - exit - accrued funding
- proportional close fees
- returned or consumed collateral
- open-interest reduction
The final account state is emitted as position and account events, then materialized by the indexer.
Liquidation
When post-PnL equity after close fee falls below the market's maintenance requirement, the position becomes liquidatable. The keeper submits a fresh signed report together with liquidate. The protocol closes the position, assigns the bounded keeper bonus, records bad debt when necessary, and releases the position from open interest.