Vega is a protocol for trading margined financial products on a decentralised network.
The network, secured with proof-of-stake, will facilitate fully automated, end-to-end margin trading and execution of complex financial products. Any participant will be able to build a market on Vega’s infrastructure.
Innovative liquidity incentives
Built-in liquidity incentives match traders and market makers across any financial product.
Range of collateral options
Vega will connect to major networks for collateral, which can be in any digital asset including Bitcoin, ERC20 tokens, and stable coins.
Straightforward market creation
Pseudonymous market creation means any participant can easily create and launch markets.
Building the Vega network
The Vega protocol is designed to run on an open, blockchain-backed public network comprised of geographically distributed nodes.
How to create products and markets
Participants will be able to create financial products using Vega's bespoke smart product language. It will provide a toolkit of product features and economic primitives from which all cash flows and settlement instructions can be easily specified. Vega is designed to support many types of financial products, including derivatives such as options and futures.
Each product will utilise one of Vega’s risk models for margin calculations, allowing leveraged trading on certain markets. Parameters for the risk models and other relevant product parameters will be maintained with on-chain governance.
To launch a new market for a product, the participant must specify the underlying assets, dates, and other necessary parameters of a smart product, and then submit this to the network for review. Network participants will use their stake to vote on accepting a new market. A proposed market will automatically be launched and opened for trading after it passes the review period, and has the financial backing of one or more market makers.
Market making on the Vega network
Market makers on Vega provide liquidity for markets and are rewarded for all trading that occurs on that market. Any participant can become a market maker by submitting a financial stake. This acts as bond against their market participation. Market makers are obligated to provide order book volume proportional to the size of their stake at all times while the market is open. Rewards for market making are derived from the clearly marked trading fee that a trader pays when they take a price.
Trading fees are distributed between the price maker of the trade, the node operators, and all the market makers of that market. This means market makers are rewarded much like centralised owners of exchanges and are incentivised by the overall trading volume in that market. The proportion of total liquidity fees that a market maker receives is relative to their market making stake, price making activity, and the historical longevity of their market making commitment. Trading fees are dynamically adjusted by the network so as to attract market makers to where they are most needed.
Collateral and settlement on Vega
Collateral is managed by the Vega network via links to other blockchains. Funds are deposited by paying into a smart contract on a host chain. The first available chain will be Ethereum—any ERC20 token can be used as the collateral currency for creating a market, and also as margin for orders and positions.
The network calculates the minimum collateral required to maintain open positions and orders as near-to-live as possible, minimising the cost of margins and maximising leverage opportunites. The required funds will be allocated to a market until they are no longer needed and are released. The Vega network maintains a ‘view’ of a trader’s collateral balance.
Positions are settled continuously as they are closed, when interim cashflows are due, and finally at expiry of the instrument, when all collateral held in margins is also released.
Withdrawals are requested on Vega, resulting in a transaction for the host chain that must be signed by a quorum of Vega nodes. This will trigger a release of funds to the requested destination address.
How trading works
Trading on Vega is designed to operate within a transparent and fair framework. Orders on a market are received by the network, which uses a consensus mechanism to determine their relative time priority. The matching engine and trading core logic is then executed deterministically on all nodes, resulting in precisely the same results for matching, risk management, and settlement of all orders and positions.
Vega will support multiple trading modes, including limit order books, auctions and requests for quote (RFQ). Every node will see the full order book, trading and price history for the market and the margin requirements for each participant — all of which are transparent and publicly visible.
It will also support a range of order types. Those include limit, market, and stop, as well as various time in force instructions, such as good-til-time and fill-or-kill. Certain order types, such as iceberg orders, are not compatible with a fully transparent order book.
The price taker will pay trading fees in the settlement asset of the product. All of these fees are redistributed to network participants, including market makers, as rewards for liquidity provision.
How the network ensures fairness and safety
The Vega protocol is designed to operate fair markets that do not provide an advantage to any participant. Automated market protection mechanisms that prevent participants from gaming markets and extracting an unfair advantage are being built into the protocol. For example, like in many traditional markets, limits will be utilised to prevent market bullying during periods of high volatility. The protocol will include a ‘circuit breaker’, which is designed to ensure market price moves are reflective of the true supply and demand.
A notable challenge for both centralised and decentralised markets is preventing front running, which is when a subset of participants take advantage of having advanced knowledge of the state of an order book. Such information asymmetry may lead to an order book curator (in a centralised system) or a node operator (in a decentralised environment) injecting their own orders ahead of others and profiting unfairly from the resulting market movements.
We are researching a number of mechanisms to prevent front running. Broadly we focus on two approaches. One is randomising the opportunity for any given node operator to influence the content of a block, making it hard to predict when such an opportunity will arise, and furthermore, minimising the duration of such opportunities. This will make it difficult to realise unfair profit due to the sporadic and short nature of opportunities for potential front running.
The other, known as commit and reveal, involves submitting transactions in a two-step process. First, participants submit binding transactions that are encrypted using a secret-sharing algorithm that is invisible to other participants. Nodes come to consensus on an ordered list of transactions, but during this process do not see most details of market instructions, including the type of transaction, market, size, and price. Participants also submit decryption keys, as in a 'secret sharing' scheme, distributed amongst the nodes, which are gossiped to all other nodes after the consensus process achieves finality on the transactions contained within the block. Because a certain share of the keys (e.g. two-thirds plus one) are required to decrypt a transaction, nodes can only read the market instructions once the block has been finalised and its content can therefore no longer be altered. This method impacts latency—though no worse than doubling it, in the most naive implementation—and would be most likely to be used for markets using discrete trading.
Vega is designed with automated, built-in risk management mechanisms to ensure well-functioning markets under normal and extreme market conditions, without a central authority’s discretion.
Trading will be margined, with margins calculated using probabilistic risk models that take current market conditions into account together with the pseudonymous nature of Vega. Margin requirements will also take into account the slippage incurred when closing a position, and positions that present an unacceptably high risk of loss to the network will be closed automatically.
The rules are designed so that on average, closeouts will occur with a net positive margin remaining allocated to the position. This will be added to an insurance pool used to cover the difference when a closeout leaves a negative balance. Insurance pool balances will also be redistributed to other markets at expiry. This mechanic ensures that most markets, and the network as a whole, will continue to become safer.
Vega's network architecture
Vega’s technical design ensures that trading can occur with low latency, and that each market can process thousands of orders per second. This will be achieved by enforcing strict separation between the slower blockchain consensus layer and the high speed trading execution layer.
The Vega protocol is designed to be implemented in a distributed and decentralised manner on a network of nodes. They can be run by trading parties participating in markets, or by those who function solely as node operators.
Nodes will maintain a mirror of the state of the Vega network. They will also process transactions to operate markets and their governance. Nodes are included in the infrastructure through a proof-of-stake mechanism whereby a certain stake is locked by a node as a surety it will operate correctly. These infrastructure nodes jointly run a byzantine consensus protocol that ensures all honest parties sequence operations consistently, and thus feed the protocol implementation with actions in the same order across the network.
Clients can connect to any infrastructure node and send orders for any available market, perform market actions, and participate in the governance of the network or markets. The current node implementation includes a REST API for light clients to be able to access the platform, a GraphQL API for web applications, and a native GRPC API to interact with the infrastructure. It also includes an HTML-based decentralised trading application that can connect to a local or remote node.