L2 Perpetual Contracts
Detailed perpetual contracts explainer
New contract pairs will be added in time, and an open market creation tool is being proposed for development. Join our Discord to discuss if you have ideas or suggestions!
There are a number of high-level components required for the implementation of synthetic perpetual futures on Synthetix, they are outlined below:
Each of these components will be detailed below in the technical specification. Together they enable the system to offer leveraged trading while charging a funding rate to reduce market skew and tracking the impact to the debt pool of each futures market.
A position, opened on a specific market, may be either long or short. If it's long, then it gains value as the underlying asset appreciates. If it's short, it gains value as the underlying asset depreciates. As all positions are opened against the pooled counterparty, the price of this exchange is determined by the spot rate read from an on-chain oracle.
A position is defined by several basic parameters, noting that a particular account will not be able to open more than one position at a time: instead, it must modify its existing one.
We will use a superscript to indicate that a value is associated with a particular position. For example
corresponds to the size of position
. If the superscript is omitted, the symbol is understood to refer to an arbitrary position.
Symbol | Description | Definition | Notes |
---|---|---|---|
| Position size | | Measured in units of the base asset. Long positions have \(q > 0\), while short positions have . for example a short position worth 10 BTC will have . The position size is computed from a user's margin and leverage. See the margin section for a definition of terms used in the definition. |
| Base asset spot price | - | We also define , the spot price when position was entered. |
| Notional value | | This is the (signed) dollar value of the base currency units on a position. Long positions will have positive notional, shorts will have negative notional. In addition to the spot notional value, we also define the entry notional value . |
| Profit / loss | | The profit in a position is the change in its notional value since entry. Note that due to the sign of the notional value, if price increases long profit rises, while short profit decreases. |
Each market, implemented by a specific smart contract, is differentiated primarily by its base asset and the positions open on that market. Additional parameters control the leverage offered on a particular market.
Symbol | Description | Definition | Notes |
---|---|---|---|
| The set of all positions on the market | - | We also have the positions on the long and short sides, and , with . |
| Base asset | - | For example, BTC, ETH, and so on. The price defined above refers to this asset. |
| Market Size | | The total size of all outstanding positions (on a given side of the market). |
| Open interest cap | - | Orders cannot be opened that would cause the notional value of either side of the market to exceed this limit. We constrain both: The cap will initially be on each side of the market. |
| Market skew | | The excess base units on one side or the other. When the skew is positive, longs outweigh shorts; when it is negative, shorts outweigh longs. When , the market is perfectly balanced. |
|