Technical Overview
Last updated
Last updated
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 is an underlying protocol with applications (like and ) 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:
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 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.
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 positions that fall under margin requirements.
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 . Omni, due to its sole focus on perpetual futures, does not utilize the settlement aspect of this engine and exclusively focuses on funding rates.
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.
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.
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, 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.
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.
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.
To use the Variational protocol, users interact with applications. is a retail-focused application for trading perpetuals, while is a more generalized, institutional-focused application for trading highly customized derivatives.
The 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.
The automated treasury manager is responsible for requesting the to move funds. The treasury manager is triggered when OLP needs to post more margin to a or withdraw funds from a settlement pool, and submits requests to the .
Documentation on the technical architecture of the service is currently under construction. Visit this page again soon!