Technical Overview
Overview
While the Variational protocol is generalized to manage all kinds of peer-to-peer trading, end-users will use Variational through purpose-built frontends and backends that directly interface with the Variational protocol.
Variational (Protocol Layer)
Variational is an underlying protocol with applications (like Omni and Pro) built on top of it. The vast majority of users (outside of those interacting directly with the API) will never interact directly with Variational, but will use the protocol through applications.
All applications built on Variational take advantage of the following foundational components:
Pricing Oracle
Variational uses a custom pricing oracle to provide reliable data on the current prices of assets. The pricing oracle streams and aggregates data from a number of partnered data providers to price assets from both centralized and decentralized exchanges.
For Variational to support the trading of an asset, the primary requirement is that there are reliable services to stream pricing data from.
Core Margin & Liquidation Engine
The core margin & liquidation engine manages margin requirements for trades, and handles the liquidation of positions that run out of margin. This engine consistently calculates the required amount of margin to maintain a position, and liquidates both user and OLP positions that fall under margin requirements.
Settlement & Funding Rate Engine
The settlement & funding rate engine determines the settlement price (via TWAP) for futures contracts upon their expiration, calculates funding rates for markets based on open positions, and tracks funding payments between counterparties within a settlement pool. Omni, due to its sole focus on perpetual futures, does not utilize the settlement aspect of this engine and exclusively focuses on funding rates.
On-Chain Transaction Handler
Transactor
The on-chain transactor submits all necessary on-chain transactions for both users and automated market makers. As part of Variational's gasless experience, the on-chain transactor covers gas for user deposits and withdrawals, and as necessary to move funds into new settlement pools.
Watcher
The on-chain watcher is used to determine whether transactions submitted by the on-chain transactor have been finalized to the blockchain. The watcher protects against double-spend attacks, and ensures user's balances reflect on-chain activity.
Application Layer
To use the Variational protocol, users interact with applications. Omni is a retail-focused application for trading perpetuals, while Pro is a more generalized, institutional-focused application for trading highly customized derivatives.
Each application built on the Variational protocol will have its own frontend, backend, and features, but take advantage of the same core protocol components.
Omni
Omni, the first application built on Variational, is designed to offer retail users a simple and comprehensive platform to trade perpetuals on as many underlying assets as possible.
Frontend
Omni, with it's sole focus on perpetuals, is able to provide a straightforward UI that both new and experienced traders can be comfortable with. The Omni frontend interfaces with the Omni backend, but doesn't interact directly with the Variational protocol.
Backend
The Omni backend acts as a middle layer between the Omni frontend and the Variational protocol. The Omni backend performs risk checks before allowing trades to go through, maintains an ongoing que of positions waiting to be opened, and tracks open positions.
Omni Liquidity Provider (OLP)
The Omni Liquidity Provider (OLP) is an automated community market maker for the Omni application. OLP interacts with the Variational protocol to offer quotes, determine margin requirements, and settle positions.
Automated Treasury Manager
The automated treasury manager is responsible for requesting the transactor to move OLP funds. The treasury manager is triggered when OLP needs to post more margin to a settlement pool or withdraw funds from a settlement pool, and submits requests to the on-chain transaction handler.
Pro
Documentation on the technical architecture of the Pro service is currently under construction. Visit this page again soon!
Last updated