Ghostboard pixel

Spot Market V3 Alpha Release

Spot Market V3 Alpha Release

Per SIP-317 and SCCP-304, a synthetic ETH spot market and the snxETH token have been deployed to Optimism. Find the README and source code for the spot market on GitHub. Prototype UIs for interacting with these smart contracts are available for liquidity providers and for traders. The documentation for Synthetix V3 has been updated as well.

This codebase has received an initial audit from Open Zeppelin and Iosiro, and is currently undergoing a security review from Macro. Vulnerabilities for the spot market (as well as the V3 core protocol) may be disclosed via Immunefi. Feedback can be provided in the #synthetix-v3 channel on Discord. Upgrades to the spot market can be proposed in future SIPs. The addition of markets and configuration changes can be proposed in future SCCPs.

This should be considered an experimental alpha release. You may currently prefer to use Synthetix V2, including the existing staking app to provide liquidity, the sETH synth, and the Perps V2 ETH market. (Currently, voting power and any other incentives are calculated exclusively based on participation in the Synthetix V2 system.)

What is a Spot Market?

Spot markets powered by Synthetix V3 allow anyone to exchange the V3 protocol’s stablecoin with a synthetic asset (or “synth”). Per SCCP-304, the spot market system has deployed a synthetic ETH token by creating a market for it.

Synths comply with the ERC-20 standard, which means they are compatible with an enormous number of protocols, standard smart contracts, wallet applications, and more. The exchange rate (i.e. the price) for each market is determined by decentralized oracle networks like Chainlink and Pyth, after various fixed and dynamic fees are applied.

Though the spot market has been built with the same tooling and tech stack as the core system, it is technically a standalone system which integrates with the core system for the stablecoin and liquidity provisioning.

Buying and Selling Synths

The market’s core functionality is exposed in the buy and sell functions. These are “atomic orders” (as they are fulfilled in a single transaction). In Synthetix V2, this logic is primarily found in the ExchangerWithFeeRecAlternatives contract.

A major benefit of atomic orders is composability. Any smart contract can integrate with the spot market to have an order fulfilled as a part of another function. Integrations can also be built with functions that generate quotes (to decide whether to execute an order) and place orders specifying the desired amount to receive in the exchange (rather than the amount to provide). Orders can also specify a slippage tolerance, as fills could deviate from a quote if price updates or other orders are completed ahead of a transaction, even on the same block.

Price data is provided to the spot market via the oracle manager, a standalone system which is responsible for conforming on-chain price data from various oracles, circuit-breaking functionality, and any pre-processing.

A drawback to atomic orders is their susceptibility to front-running. The market can apply a fixed fee to mitigate this risk and then override the fixed fee with a lower value when it’s being called from specific addresses where that context provides its own mitigation (which may be its own fee, or otherwise).

The spot market also implements asynchronous orders, which complicate composability but effectively solve for front-running. Here, two transactions are required to complete a trade: a commitment and a settlement. Markets can utilize an array of settlement strategies.

The on-chain settlement strategy is mostly analogous to fee reclamation in Synthetix V2. The user commits a certain amount to trade and their order is executed using a price later available on-chain. Depending on price volatility, the frequency of oracle updates, and the speed of the chain, the settlement delay may need to be long to effectively mitigate front-running.

For significantly smaller settlement delays, the other strategy implemented so far uses Pyth’s On-Demand Updates. This is essentially the same pattern currently in use with Synthetix Perps V2. Here, to settle an order, the market requests a signed price with a timestamp from an off-chain URI per EIP-3668. The returned data is cryptographically verified on-chain, the timestamp is validated, and the order is filled using the price provided.

Regardless of the settlement strategy used, a reward can be set such that bots will be incentivized to settle orders, improving end-user experience.

Scaling Derivatives Liquidity

In Synthetix V2, wrappers serve as a useful mechanism to increase synth liquidity. Wrappers allow an asset to be “wrapped” into an equivalent synthetic asset.

By providing collateral to the core system (via the mechanism outlined in SIP-308), the V3 Spot Market implements wrap and unwrap functions. Positive and negative fees can be applied to wrappers, which can incentivize arbitrageurs to fill or empty them.

The main risk of wrappers is the skew they can introduce to the debt issued by the system. Because there isn’t a liquidations mechanism related to market-provided collateral, price action could lead to losses for liquidity providers. To mitigate this risk, the maximum amount of collateral a market can provide is set by governance. The new skew fee, discussed below, mitigates this risk as well.

New in V3

In addition to asynchronous order functionality, this spot market implementation adds some novel dynamic fees which may be enabled optionally, per-market. (Note that it generally wouldn’t make sense for all three of these fees to be enabled on the same market. The snxETH market currently has the only the skew fee enabled.)

Skew Fee

The skew fee is meant for spot markets with wrappers enabled. It serves an analogous role to the premium/discount function in Perps V2, where traders are incentivized to buy or sell such that the skew is reduced. (The core system takes on zero price exposure when the amount wrapped and the amount issued are equal.)

For example, if the market has wrapped 100 ETH and has issued 50 snxETH, traders will be incentivized to buy snxETH and disincentivize to sell snxETH. The opposite is the case if the amount issued is greater than the amount wrapped.

Utilization Fee

Because the V3 system enables significantly more fine-grained control in the “contract” between liquidity pools and markets, the utilization fee has been introduced to help limit liquidity provider’s exposure to price action. This is especially useful for long-tail, experimental synths which may have limited liquidity available to them.

Instead of applying a hard cap on the supply of synths that a market is able to issue, for better end-user experience, it can instead apply a fee which grows as the total supply of synths exceeds the amount of credit provided to it by the core system.

Interest Rate

Markets can enable an interest rate for synths with low exchange volume. This creates a stronger incentive to back these derivatives, allowing for a more sustainable dynamic between liquidity providers and synth holders.

The Decay Token Module implements an approximation of the compound interest rate formula on-chain, such that synth balances rebase to collect this fee. Synths with an interest rate can introduce complications for composability, as holders’ balances are reduced each block. Existing solutions, like wrapping rebase tokens, could be used to resolve this.

Next Steps

Synthetix Governance and the broader community will test and monitor this deployment. Upgrades, the creation of additional markets, and configuration changes can be proposed as SIPs/SCCPs and voted on by the Spartan Council.

The Core Contributors are now largely focused on testing cross-chain functionality and building version 3 of perpetual futures markets. Notably, Perps V3 is being built to integrate with the spot market system, such that synths (not only the stablecoin) can be used as collateral for margining positions.