KIP-117: Quanto Perpetuals
Simple Summary
Build a quanto ("quantity adjusted") perpetual futures market: Quanto Perpetuals.
Abstract
Develop a derivatives market compliant with Synthetix v3 that enables Kwenta traders to retain ETH exposure while engaging in perpetual futures contracts trading.
Motivation
Perpetual Futures on Kwenta currently requires the use of sUSD for trading as all trades are settled in USD.
Many prospective Kwenta traders are likely hindered from trading with their portfolios being composed mostly of ETH or because of the perceived inflationary and exchange rate risks associated with USD.
Quanto Perpetuals offer traders the opportunity to use ETH (in the form of synthetic “snxETH”) as collateral, allowing them to maintain ETH exposure while trading other assets and effectively mitigating the inflationary and exchange rate risks associated with USD. The difference between quanto products and other multi-collateral products is the fixed exchange rate nature. With multi-collateral, a trader takes on the exchange rate risk between the collateral and the settlement asset (for example ETH/USD price risk). This is because ETH is purchased back at the market price when a trade is settled. With quanto, profits (or losses) are exchanged back to ETH with a fixed exchange rate determined at entry protecting traders from exchange rate risk.
Specification
Traditional quantity adjusting or “quanto” futures are derivatives devised to eliminate foreign currency risk for traders. For example, US-based traders may wish to speculate on Japanese equities, but do not want to be exposed to a weakening yen. In the case of crypto, DeFi natives may find the tool similarly useful for speculating on various crypto assets while not being exposed to the US dollar that might weaken relative to ETH.
Kwenta's Quanto Perpetuals, built on Synthetix Perps V3, introduce a significant modification to the payoff mechanism. Quanto Perpetuals utilize an embedded currency forward[1] or “fixed exchange rate”, termed as a "quanto factor"[2], when calculating position payoff. This factor is the fixed exchange rate of the contract's quanto asset at the initiation of a position. It is used when determining the settlement payoff when the position is closed. As a result, a trader who secures a fixed exchange rate for their ETH at the start of their trade can potentially benefit from subsequent ETH price fluctuations or protect against sUSD volatility, contingent on the profitability of their position. Therefore, the fixed exchange rate / quanto factor in Quanto Perpetuals acts as an instrument for speculation, hedging and arbitrage for traders.
For the MVP, the focus is on an “ETH Quanto BTC/USD” and “ETH Quanto ETH/USD” market. BTC/USD as it is the most liquid non-ETH asset. ETH/USD was chosen given that historically, ETH records the highest trading volume on Kwenta. Interestingly, the payoff structure is akin to that of a power perpetual[3], enabling traders to effectively “double dip” or maximize their ETH exposure. Nonetheless, the design of this market is adaptable to support Quanto Perpetual Futures contracts underlined by any asset. Consequently, future releases of contracts underlined by major, high-volume assets will not necessitate changes in the mechanism but merely require governance approval.
Note that the below specification aims to explain Quanto perpetuals in an intuitive way. For a more technical understanding refer to the addendum material. Unless stated otherwise, for the purposes of clarity and distinction let's assign BTC as the example for the base asset and ETH for the quanto asset. Therefore, the following specification describes an ETH Quanto BTC/USD market.
Example Use Cases
- Trader Alice has ETH in their wallet and wishes to trade BTC/USD without losing exposure to their ETH (the KIP example)
- Trader Bob has ETH in their wallet and wishes to trade ETH/USD without losing exposure to their ETH
- Trader Carol has QUANTO ASSET in their wallet and wishes to trade BASE/QUOTE without losing exposure to their QUANTO ASSET
Payoff
Quanto Payoff denoted in USD terms. Note that if Quanto payoff was in ETH terms it would look similar to the first plot.
USD payoff helps highlight the differences between traditional USD settled perpetuals and quanto. A general assumption can be made that the price of ETH dampens or magnifies changes in notional value of the traded market (if measured in USD terms). This is important for understanding debt later on.
Quanto Factor (Fixed Exchange Rate)
The quanto factor is the fixed exchange rate for the quanto asset (ETH) recorded at the time a position is opened. For example, if the price of ETH is $2000, the quanto factor is 0.0005 ETH (per USD), or simply the reciprocal of the USD price. This quanto factor is the exchange rate of trader PnL over the lifetime of their position, allowing a trader to “lock in” the ETH price at which they entered the market.
If a trader modifies their position while having a position open, the quanto factor is then used to realize their gains/losses before calculating the new position. A new quanto factor will be captured at the time of modification and will be applied to respective gain/loss.
The easiest way to reason about the quanto factor is that it is a multiplier applied to a trader’s gain or loss, and then the result is settled within the margin balance. However, from a technical perspective, the quanto factor is used to divide the position size (BTC·ETH/USD), which simplifies the accounting for margin, notional value, skew, funding, and debt. See the following section and addendum on units for details.
Units
Quanto Perpetuals uses different units to classical perpetuals. To turn classic perpetuals into quanto only one mathematical change is needed, and everything else follows downstream from that. That change is the units for position size. In a classical perpetuals market we can express a user's position purely in terms of the base asset (in our example BTC) - but for a Quanto market the user’s position is more complex than this. Their position expresses a three-way relationship between USD, the base asset and the Quanto asset, in our example BTC, ETH and USD.
We express this position size as “base asset per quanto factor”: $$\frac{b}{p^e_z} = \frac{BTC}{\frac{USD}{ETH}} = \frac{BTC \cdot ETH}{USD}$$
It can equally be thought of as “quanto asset per base price”: $$\frac{z}{p_e} = \frac{ETH}{\frac{USD}{BTC}} = \frac{BTC \cdot ETH}{USD}$$
This second way is perhaps the easier way to think of it, when we consider the formula for position size and that margin is now denominated in the quanto asset (ETH): $$q := \frac{m_e \lambda_e}{p_e} = \frac{ETH}{\frac{USD}{BTC}} = \frac{BTC \cdot ETH}{USD}$$
Based on this we can further confirm that margin is now based in the quanto asset: $$m := \frac{v}{\lambda} = \frac{qp_e}{\lambda_e} = \frac{BTC \cdot ETH}{USD} \cdot \frac{USD}{BTC} = ETH$$
And also that notional value is denominated in the quanto asset: $$v := q p = \frac{BTC \cdot ETH}{USD} \cdot \frac{USD}{BTC} = ETH$$
Therefore PnL is also denominated in ETH: $$r = v - v_e$$
Based on this foundation, all the fundamental math can stay the same. Although the system needs to be changed to support the different units - for example market debt is hence denominated in ETH, but needs to be reported to the pool in USD based on the restrictions of Synthetix V3.
Profit and Loss
Previously with traditional perps, unrealized profit and loss (PnL) was the change in notional value plus accrued funding fees. For example, if the quoted asset is BTC/USD and a trader has a 1 BTC open long position, if the price moves from $30,000 -> $40,000, the trader is now in profit of $10,000. If the trader was forced to pay $1000 in funding over the duration of their position, their effective unrealized PnL is $9000.
PnL in quanto works similarly, however as derived previously, the difference is that notional value and funding is now measured in ETH. Even though the underlying market is USD denominated, this is converted to quanto PnL (and therefore ETH) by applying the quanto factor. The change to the above example is that the quanto factor is applied to the $9000 unrealized PnL, let’s say 0.0005 ETH at entry, the result is a net positive of 4.5 ETH.
At a technical level, “applying the quanto factor” isn’t necessary because it’s already applied to the position size from which notional value and subsequently profit and loss is derived.
Margin
Trader margin is denominated in ETH. Depositing ETH in the market contract guarantees the same amount of ETH back regardless of ETH price change (ignoring changes in PnL).
Invariant: If a trader enters a position and immediately exits a position, barring fees, they should receive the same amount of ETH back. Secondly, if the price of ETH changes, but the price of the base asset (BTC) does not, this still should hold true.
Note that the accounting of the market contract is not imbalanced and the contract does not incur additional risk if the price of ETH rises or falls (assuming any other market than ETH/USD, so BTC/USD, for example) and the quoted market is neutral. This is because if the price of ETH rises over the duration of the trader's open position, the ETH the trader receives back during settlement is still at the original fixed rate. The same is true if the price of ETH falls. Therefore, if there’s no change in the base/quote market, there is no change in what the contract owes back to a trader and correspondingly as debt to the LPs. Or put simply, margin is denominated in ETH.
Margin will be in the form of the Synthetix V3 synth, snxETH. The mechanism will be built atop Synthetix V3, requiring market debt to be calculated and settled in snxUSD. Having margin denominated in snxETH makes it easier to convert to snxUSD without the concern of slippage.
Funding
Synthetix perpetuals funding is calculated as the velocity of the skew. At a high level, if the skew is balanced, the funding rate does not move. However, if the skew remains imbalanced, the funding rate begins to shift in the direction that will restore balance. This allows the funding rate to reach a market rate at which one side is willing to accept the risk of the other.
This funding rate mechanism is ideal for Quanto perpetuals because there will be an expected premium on long positions in bull market conditions. As traders are looking for double delta exposure (quanto asset and base asset) the demand for those taking the short side will be increased. Not to mention the increased challenge of hedging for funding rate arbitrage. [4]
For example, in a long skewed ETH quanto BTC/USD market, to be perfectly delta neutral in USD terms, a funding arbitrageur would have to be BTC long equivalent to their short size, but also short ETH equivalent to their collateral.
Interestingly, in an ETH quanto ETH/USD market this nets out to a 1x short ETH/USD position in the Quanto market; 1x short is delta neutral.
The funding mechanism will remain the same for Quanto Perpetuals, however, the difference is that funding is now paid in the quanto asset (ETH) rather than USD.
Skew
Skew works in fundamentally the same way in a Quanto market. However, slightly different intuitions are needed about it due to the change in units. In a classical perpetual market, skew is denominated in the base asset (in our example BTC). If the volume of long BTC in the market is equal to short BTC, the market is balanced and LPs are delta neutral.
The same cannot be said for a Quanto market without the correct change in units. It is possible that while the volume of BTC on both sides of the market is equal, LPs are not delta neutral. This is due to the fact that different traders have different quanto factors.
Take the following example: TraderA goes long 2 BTC @$30k BTC and $1k ETH TraderB goes short 2 BTC @$30k BTC and $2k ETH Then the price moves to $40k BTC and ETH stays at $2k: TraderA PnL = ((2 40k) - (2 30K))/1k = +20ETH TraderB PnL = ((-2 40k) - (-2 30K))/2k = -10ETH
We can see that the net PnL for the market is (20 - 10) = 10 ETH. So this market cannot be delta neutral, and must therefore be skewed.
Hence to ensure the market is balanced, skew needs to take into account traders quanto factors. This naturally happens when we change the unit of position size from BTC to BTC·ETH/USD.
Now we can see that the above market example was imbalanced: TraderA position size = 2 BTC / 1000 = 0.002 TraderB positions size = 2 BTC / 2000 = 0.001
TraderA’s position size is double TraderBs. Now we see that we have to double the BTC size of TraderB’s position to create a balanced quanto market. By doing this longs have equally sized positions to shorts in the units BTC·ETH/USD.
Debt
It’s important to think of debt in terms of the LP (liquidity provider) or what the market contract owes to LPs.
Recall earlier it was stated that market accounting is balanced when looking purely at margin deposits into the system. This is because ETH deposits, ignoring any changes in the quote asset, are redeemable for the ETH at the same rate. Therefore the market contract (and respective LPs) do not owe more or less ETH regardless of ETH price change.
However, debt is not solely margin deposits. Changes in the quote asset, resulting in PnL, can add or subtract net debt. If a trader is in profit, market debt is now positive because if a trader looks to settle their position, the market now owes that amount of profit. The opposite is true if the trader is at a loss.
Because market debt is measured in USD (Synthetix V3), the aggregate PnL which is denominated in ETH must be converted to USD and therefore, market debt is sensitive to the price movements of ETH. If the price of ETH appreciates, debt exposure for LPs are magnified and vice versa if the price depreciates. This is best seen in the payoff diagram for traders. However, as the market matures and the skew trends towards being balanced – the risks to LPs decrease.