Variational Docs
HomeDiscordTwitterBlog
  • Variational Protocol
    • About Variational
    • Peer-to-peer vs DEX
    • Roadmap
    • Key Concepts
      • Trading via RFQ
      • Settlement Pools
      • Margin
      • Slippage
      • Leverage
      • Liquidation
      • Mark price vs index price vs quote price
      • Open Interest & Funding Rates
      • Fully Diluted Valuation (FDV)
      • Fees
      • Market vs. Limit Orders
      • Take Profit & Stop Loss
    • $VAR Token
    • Media Kit
    • Official Links
    • FAQ
    • Getting Help (Support)
  • Variational Omni
    • About Omni
    • Getting Started with Omni
    • Getting Started With Omni (Testnet)
    • Omni Liquidity Provider (OLP)
    • Listings
    • Risk Limits
  • Automatic Deleveraging | Counterparty Liquidation
  • Variational Pro
    • About Pro
  • Technical Documentation
    • Technical Overview
      • Authentication
      • Deposits
      • Withdrawals
      • Trades
    • Derivative Specifications
      • Perpetual Futures
      • Settlement
    • API
      • SDKs
      • Quickstart and Tutorials
        • API Trading Prerequisites and Setup
        • Settlement Pool Deposit Tutorial
        • Taker (RFQ Submitter) Tutorial
        • Maker (RFQ Responder) Tutorial
      • Endpoints
      • Data Models
      • Headers
      • Pagination
      • Rate Limits
      • Authentication
    • Contracts and ABIs
    • Security and Audits
    • Partners
  • Legal
    • Terms of Service
    • Privacy Policy
    • Restricted Persons
  • ARCHIVE
    • Testnet Trading Competition #1 Leaderboard
    • Testnet Trading Competition #2 Leaderboard
    • Testnet Trading Competition #3 Leaderboard
Powered by GitBook
On this page
  • Quotes
  • Slippage
  • Settlement Pools
  • Flow of a Trade
  1. Technical Documentation
  2. Technical Overview

Trades

PreviousWithdrawalsNextDerivative Specifications

Last updated 7 months ago

The execution of trades involves many components of both the Variational protocol and the application.

Quotes

Variational uses a request-for-quote (RFQ) system: users announce their intention to open a trade, and have the option to accept or reject any subsequently provided quotes. Within Omni, quotes are always provided by the Omni Liquidity Provider (OLP). The OLP determines the price to quote users at by aggregating data from the Variational protocol's .

Slippage

Within Variational, slippage refers to the difference in price between the last provided quote and the quote at the time when the trade is submitted. In highly-volatile markets, quoted prices can change significantly in a matter of seconds. Setting a slippage limit ensures that users don't accept a quote that is significantly worse than the last price displayed in the UI.

Settlement Pools

Settlement pools are smart contracts created and maintained by the Variational protocol that hold margin for both parties involved in a peer-to-peer trade. Within the Omni platform, settlement pools always contain margin from the user (taker) and the OLP (maker).

Flow of a Trade

Trades are executed through the following flow:

  1. User requests a from the by interacting with the Omni frontend.

  2. The uses the Variational protocol's to provide the user with a quote.

  3. If the user wishes to accept the quote from and open a position, they can select their sizing and limit and submit the trade.

  4. The relays this information to the , which verifies the user's , performs a variety of risk checks, ensures that the user has enough free collateral in their account for the trade, and ensures that the updated quote is not outside of the user's defined tolerance.

  5. If all checks pass, the trade enters a sequential order queue on the .

  6. Once the trade is first in the que, the Variational protocol's will check to see if the has enough margin in the user's settlement pool for the trade. If it does not, the will deposit funds into the settlement pool to act as margin for the trade.

  7. Once both the user and have posted enough margin into the , the trade is considered cleared and open, and is tracked on the .

  8. Now that the trade is open, the will periodically check to ensure the position has enough margin on both sides. If the user is liquidated, both the user and 's initial margin will be withdrawn from the settlement pool and returned to the treasury. If is liquidated, 's initial margin is added to the user's initial margin and the refills 's margin to continue covering its initial position.

  9. Simultaneously, the will periodically calculate and track funding rates and payments associated with the position, which are managed inside the .

The process of closing a trade is identical to the process of opening a trade in the opposite direction, with the exception of some risk checks that are skipped by the .

Omni
Omni Liquidity Provider (OLP)
OLP
OLP
authentication token
OLP
OLP
OLP
OLP
settlement pool
OLP
OLP
OLP
OLP
OLP
settlement pool
quote
slippage
slippage
pricing oracle
pricing oracle
Omni frontend
Omni backend
Omni backend
margin & liquidation engine
treasury manager
Omni backend
margin & liquidation engine
treasury manager
settlement & funding rate engine
Omni backend