Synthetix - Project Breakdown | Revelo Intel

Synthetix

Table of Contents

Overview

Synthetix is a decentralized protocol that facilitates the creation and exchange of synthetic assets, such as commodities, stocks, and currencies, on Ethereum and Optimism. The protocol is designed to provide a trustless way for traders to swap between synthetic assets that are collateralized by SNX stakers. SNX stakers accrue debt every time they mint synthetic assets and, in order to unlock their collateral, they must pay back their debt by burning synths.

Synths or synthetic assets are derivative tokens that provide exposure to a range of assets, such as forex, commodities, or crypto assets. They can be traded by leveraging the Synthetix protocol’s unique pooled collateral model, where trades between Synths generate a small fee that is distributed to SNX collateral providers.

A synthetic asset is a tokenized derivative that mimics the value of another asset. For example, using a synthetic, you can trade $sXAG (Synthetic Gold) instead, which behaves like the underlying asset by tracking its price using data oracles such as Chainlink.

The Synthetix protocol

The Synthetix protocol is the actual liquidity layer of the platform. Stakers provide liquidity that is used to collateralize a suite of synthetic assets and, in return, earn rewards and market yield. This liquidity is used to underwrite swaps between synthetic assets as well as to facilitate the trading of perpetual futures.

Trading takes place based on the output of price oracles. This avoids the need to implement an orderbook and minimizes counterparty risk since all trades are executed against the contract. This is known as P2C or peer-to-contract trading. Given the pooled liquidity that is available in the platform, the protocol can support both spot and perpetual futures trading:

The following steps are taken in order to process exchanges of synth assets (from sUSD to sBTC in this example):

  1. Burn the source synth or input asset (sUSD), which involves reducing the wallet address’s sSUSD balance and updating the total sUSD supply.
  2. Determining the conversion amount or exchange rate based on the price of each asset.
  3. Charge an exchange fee and send the fee as sUSD to the fee pool, where it can be claimed by SNX stakers.
  4. The remaining amount (after the fee) is issued by the destination synth (sBTC) contract and the wallet balance as well as the total supply is updated.

When exchanging synth assets, there is no counterparty risk. Also, no order book or matching engine is needed. This results in infinite liquidity between synths where no debt change is required to be recorded against the debt pool either since the same value that is burned from the source synth is being minted from the destination synth.

SNX staking

Synthetix staking differs from the standard staking that is implemented in the majority of DeFi protocols. The reason for that is that it allows anyone to earn rewards by contributing collateral to the protocol. All protocols built on top of Synthetix tap into its liquidity, hence why all protocols built on top of Synthetix benefit from deep liquidity, low slippage, and competitive trading fee.

Users stake SNX and mint sUSD. This represents a debt that must be burned when SNX is unstaked. Each staking position represents a proportion of the overall protocol debt denominated in sUSD and that increases or decreases based on the supply of synths and their exchange rates. In this way, stakers act as a pooled counterparty to all the trades that are executed against the protocol.

Synths are minted when SNX holders stake their SNX tokens as collateral. This way, SNX incurs debt every time a synth asset is minted. Similarly, when SNX is unstaked, the users must pay back their debt by burning synths. This debt can increase or decrease independently of their original minted value, based on the exchange rates and supply of Synths within the network.

For instance, if 100% of synths in the system were sBTC and the price of BTC halved, the debt in the system would halve, as well as each staker’s debt. Similarly, if only half of the synths in the system were sBTC and the price of BTC doubled in price, the system’s total debt and each staker’s debt would increase by one quarter.

Currently, the system is backed by a 500% collateralization ratio, even though this variable is subject to governance decisions. As long as SNX stakers maintain their c-ratio, they will get revenue from trading fees. This ensures that the protocol is backed by sufficient collateral at all times to absorb large price shocks. The current target c-ratio for each position is set at 500%.

When the value of SNX fluctuates, so does each staker’s c-ratio. If the c-ratio falls below the target threshold (with a small buffer to allow for minor fluctuations), the staker will be unable to claim rewards until they restore their ratio. This ratio can be adjusted either by minting synths if their ratio is above the target c-ratio, or burning synths if their ratio is below the target c-ratio.

Overall, staked SNX performs the following actions:

Currently, SNX is the only collateral that can be staked in Synthetix. This drives value to SNX stakers since they are rewarded for offering up their collateral to backstop the network. However, this also presents the challenge that staking participation is often between 60% and 80% and varies based on market conditions.

With Synthetix V3, adding other more liquid staking collateral assets would alleviate some of the constraints. In V3, it may eventually be possible to create markets with nearly any collateral type.

Collateralization ratio

The collateralization ratio or c-ratio is a dynamic variable that changes based on the staked SNX value and the active debt. It represents the ratio between an account’s active debt and available SNX being staked, expressed as a percentage.

A user’s active debt refers to the dynamic proportion of the Synthetix global debt pool that a staker is responsible for creating. For example, if you are responsible for 10% of the debt pool and the overall debt pool is $100,000, your current active debt is $10,000. If traders are profitable and the debt increases to $200,000, then your active debt becomes $20,000, while if traders are unprofitable and the debt pool decreases to $50,000, your active debt becomes $5,000.

c-ratio% = (total SNX value in USDactive debt value in USD) * 100

Since both SNX value and active debt are constantly fluctuating, a user’s c-ratio changes accordingly.

The target c-ratio is a static, system-wide ratio that is equally applicable to all stakers. It determines the over-collateralization required for collateral in the system. This ratio is set through governance.

The target c-ratio is critical to incentivize participation by stakers and ensure the proper collateralization of the protocol.

Liquidations

When a staker’s c-ratio goes below the liquidation ratio, their positions are flagged for liquidation. When this happens, they will have a set amount of time to increase their c-ratio and bring it back to the target c-ratio. Otherwise, they will be force-liquidated with a penalty. Every time a liquidation occurs, both SNX in escrow and sUSD debt are distributed to health stakers in order to ensure the overall long-term health of the system. The current liquidation ratio is set to 160%.

When a staker’s c-ratio goes below the liquidation ratio and they are flagged, they have 8 hours to raise their c-ratio. In this scenario, one of three things will happen:

SNX escrow and vesting

Escrow refers to the time delay enforced on SNX rewards.

Benefits of staking

SNX stakers earn weekly rewards for collateralizing the protocol with their liquidity. These rewards are distributed in two ways:

Risks of staking

Stakers are effectively providing collateral to the protocol, and their liquidity is being used to underwrite swaps and act as the counterparty for traders to trade against. Even though stakers earn revenue from the fees paid out by traders, their profits are highly reliant on the PnL of traders. If traders are profitable, net of fees, the profits of stakers may decrease.

In addition to the counterparty risk of traders, stakers are also exposed to smart contract risk and oracle risk. Since stakers are taking on the risk of the overall debt in the system, they also have the option to hedge their positions externally to the system. For example, when users are staking, they will be given the option to hedge their debt using dHedge’s one-click hedging tool (Toros uses dHedge smart contracts).

1 sUSD worth of debt mirror token will hedge 1 sUSD worth of debt.

Burning debt

When an SNX staker wants to exit the system or reduce their debt to unlock staked SNX, they must pay back their debt. For example, a staker that mints 10 sUSD by locking SNX as collateral will have to burn 10 sUSD in order to unlock it. However, if the debt pool fluctuates while the user’s assets are staked, they may need to burn more or less debt than they minted.

  1. The Synthetix contract determines the debt balance of the user.
  2. The required amount of sUSD is burned and the total supply of sUSD is updated along with the sUSD balance in the user’s wallet.
  3. The SNX balance of the user becomes transferable.

The debt pool

Synthetix’s debt pool is tracked by issuing debt shares to stakers every time they mint or burn sUSD. This way, a staker’s debt percentage would be their balance of tokens divided by the total supply of debt shares.

As an example, a user A that mints 100 sUSD gets issued 100 debt shares, and a user B that mints 100 sUSD gets issued 100 debt shares as well. Now user A and user B each have 50% of the total debt shares (100 / 200 debt shares).

When the total debt pool value fluctuates, the shares will be used to calculate how much debt the minter owes. In the example above, if the debt pool doubled to 400 sUSDC, now user A (who has 100 debt shares) would have 200 sUSD and user B (who also has 100 debt shares) would have 200 sUSD debt, 50% each of them.

Burning sUSD reduces the number of debt shares issued against a staker and the number of shares burnt is calculated with the total debt pool value. Following with the example, if user A burned 100 sUSD, they would have 40 shares left after the burn, which is 1⁄3 of the debt pool (50 / 150 shares) and their remaining debt would be (⅓ * 300 sUSD = 100 sUSD) 100 sUSD.

SNX inflation

As determined by SCCP-294, SNX’s inflation is derived from a target 70% staking ratio that is adjusted up or down by 10% on a weekly basis depending on whether the staking ratio is above or below the target ratio. The inflation rate is monitored and the following responses occur in response to changes in the staking ratio:

All of the token inflation is allocated to SNX stakers weekly on a pro-rata basis as long as their collateralization ratio does not fall below the target threshold.

Oracles

Synthetix uses Chainlink and Pyth as Oracle networks in order for the protocol smart contracts to fetch up-to-date token prices. In Synthetix, oracles serve the following functions

Perps

Users can trade perpetual futures to gain exposure to a range of assets without holding the actual asset. The margin for each position is denominated in sUSD, since it can be minted and burned as needed. The SNX debt pool is the counterparty to all orders and takes on the risk of any skew in the market. A perpetual funding rate is paid from the heavier to the lighter side of the market in order to encourage a neutral balance.

As a decentralized platform, users can trade and access Synthetix’s smart contracts through frontend operators validated by the community, such as Kwenta or Decentrex.

Perpetual futures use funding rates to balance short and long positions, which keeps the demand stable for both sides of the derivatives and helps maintain the perp price in line with the underlying spot price.

​​

Perps v2

In perps v2, an engine is responsible for matching buyers and sellers, with SNX stakers serving as a temporary counterparty as needed, while receiving incentive rewards for bringing markets to a state of neutrality.

Perps v2 was designed with risk management for the debt pool as a primary concern.  In Synthetix, the debt pool is the pool of synthetic assets (synths) that are created by SNX stakers who provide their capital in exchange for minting sUSD. SNX stakers collectively are short the debt pool, meaning they take the other side of all trades on Synthetix.

In order to protect the debt pool and incentivize traders to take the other side of existing orders, perps V2 uses a premium/discount mechanism depending on the position skew. This incentive was expressed in V1 as a funding rate. However, V2 introduces an actual price premium or discount on the oracle price. This way, the protocol is able to simulate a bid/ask spread in the market, enabling market makers to bring the market back to a state of neutrality, reducing the need for restrictive limits on open interest, and reducing the risk exposure of LPs. However, V2 does not ignore funding rates either. In V2, rather than the skew position determining the funding rate, it simply determines the adjustment to the funding rate. This small mathematical change has big implications for the protocol and allows the perp markets to find a market-based funding rate without requiring LPs to take positional risk.

With V2, Synthetix minimized the risk exposure of liquidity providers (SNX stakers):

Market stability and LP protection

Synthetix perpetuals rely on a number of mechanisms to maintain market stability and protect liquidity providers against market imbalances.

A price impact function is used to simulate the behavior of traditional order books and encourage neutral markets. Given the nature of perpetual futures, where positions can be kept open indefinitely as long as the trader maintains sufficient margin, Synthetix ensures market balance by employing a dynamic funding rate that works in tandem with the price impact function to promote delta neutrality. This is achieved by offering incentives for traders to take positions that reduce the market skew.

This creates a high-frequency rebalancing incentive and places soft limits on the maximum exposure held by the debt pool. By storing premiums from takers (expanding skew) and distributing them to makers (compressing skew), Synthetix can protect liquidity providers (stakers) without needing to rely on explicit restrictive open interest limits.

Even though Synthetix’s dynamic funding rate shares some similarities with traditional funding rates, there are a few differences. Rather than just depending on market sek to determine the funding rate, the dynamic funding rate takes into account both velocity and market skew. This implies that when there is an enduring long skew, funding rates will keep on expanding as time passes by. Conversely, when short positions overwhelm, funding rates will diminish so long as the short skew is kept up. By incorporating velocity into the financing rate computation, this system encourages traders to take positions inverse to the current market skew, advancing market stability and balance.

As an example, we can consider the following scenario:

And calculate the price impact:

We can observe that the trader is going short, and the market has a long skew, so they receive a discount, resulting in an execution price lower than the oracle price.

The role of funding rates in perpetual futures is generally to balance long and short demand. Traders will either pay or receive funding rates, depending on their positions. If the funding rate is positive, long position holders will pay the funding rate to those holding short positions, and vice versa.

Perps V3

Perps V3 is the latest version of the perpetual market built on Synthetix V3.

Synthetix v3

Synthetix V3 is a total revamp from the ground upIt is meant to give lenders (SNX stakers) control over what they collateralize along with permissionless asset listing. The transition will include migrating sUSD and turning the current V2 protocol into a pool on V3. All proposals from SIP-300 to SIP-310 are needed in order to complete the upgrade. It fulfills what Synthetix set out to achieve from its first days: a decentralized derivatives liquidity system to power the next generation of blockchain-based derivatives products.

With v3, Synthetix turns into a layer of liquidity where any derivatives markets can be built.

Synthetix v3 creates a generalized vault system agnostic to collateral types. Even though each vault supports a single collateral asset, vaults can be combined into pools that are connected to one or more markets. This allows the system to support features such as:

This provides the following benefits with respect to v2:

Synthetix V3 will also introduce new features such as cross-chain expansion, expanded margin collateral types, agnostic oracle integrations, and synth teleporters (liquidity can be provisioned cross-chain, and assets/markets aren’t siloed to one chain).

SNX Staking Module

On June 19, 2023, a proposal for the implementation of an SNX staking module in Synthetix V3 was published by Kain.eth.

The simplified staking module in the Synthetix V3 system aims to streamline the staking process and attract new users to the platform. With this module, users can easily deposit SNX without the need to navigate market risks or engage in hedging strategies.

By removing complexity and barriers, the simplified staking approach aims to provide a user-friendly experience for individuals interested in participating in the Synthetix ecosystem. Initially, the staking pool will be funded by the Treasury Council as outlined in STP-4. However, in the future, a portion of the protocol fees may be allocated to support this staking pool. By offering this simplified form of SNX staking, the goal is to create a primary gateway for users to enter and engage with the Synthetix ecosystem.

SNX Liquidity Provisioning (SNXLP)

In Synthetix V3, LPs will supply collateral for the markets within the protocol and will receive all generated protocol fees, excluding fees allocated to specific initiatives such as integration incentives. LPs, similar to stakers in V2x, will still be required to hedge their debt and monitor their collateral ratios to maintain a healthy financial position.

The introduction of the SNX LP system in V3 brings several advantages over the previous staking system. LPs have the flexibility to choose which markets they want to collateralize, allowing them to tailor their participation based on their preferences and risk appetite. Additionally, the LP system enables the creation of new permissionless markets, fostering innovation and expansion within the Synthetix ecosystem.

With the SNX LP mechanism, it is expected that spot markets in V3 will be more delta neutral, meaning they have minimal price exposure. This minimizes the overhead for stakers, making it increasingly likely that stakers in V3 will transition to becoming LPs over time. The SNX LP system efficiently provides the collateral required to scale the Synthetix protocol and support its growth.

Loans

Synthetix V3 introduces a new approach to liquidity and borrowing. Instead of being required to choose between borrowing sUSD or being a liquidity provider, Synthetix V3 allows you to do both. Users can deposit collateral, delegate liquidity to markets, and generate an sUSD loan. This loan is automatically paid off by fees paid out from perps traders.

Governance

Synthetix V3 will continue to be governed based on the magnitude of collateral provided by SNX LPs. This ensures alignment between those who underwrite the risk in the protocol and the decision-making process for protocol changes. However, it is also possible that in the future, SNX stakers utilizing the new staking module could be granted limited governance rights, allowing them to have a voice in the protocol’s governance processes.

Chainlink Cross-Chain Interoperability Protocol (CCIP) Integration

CCIP is a new open-source standard for cross-chain communication powered by Chainlink, which aims to establish a universal connection between blockchain networks.

CCIP was integrated into V3 on July 17, 2023, and enables V3 sUSD to move between Ethereum and Optimism, but has been configured to allow transfers to any EVM compatible chain if approved by the Synthetix Spartan council.  In the future, Synthetix has the ability to expand the cross-chain Synth Teleporter functionality to additional EVM-compatible chains, including Arbitrum and Base. Synthetix is also exploring the usage of Chainlink CCIP for additional use cases, including cross-chain synthetic perpetual futures, cross-chain staking pools, and more.

 

Synthetix Spartan Council, via SIP 311, has decided to use Chainlink CCIP because it offers a variety of benefits, including:

Synthetix ecosystem

SIP-267 was the beginning of Synthetix’s direct integrations. This allowed the protocol to let approved integrators to tap into exchange functionalities with custom parameters. This allowed Synthetix to create a unique environment for partner protocols and provided the following advantages for the overall ecosystem:

Kwenta

Kwenta is a decentralized derivatives trading platform offering perpetual futures on Optimism. This allows traders to buy or sell synthetic assets with up to 25x leverage as well as stake KWENTA to receive inflationary rewards.

Kwenta relies on decentralized oracle price feeds provided by Chainlink and there is no order book. Instead, all trades are executed against a Synthetix debt pool. This way, users have guaranteed access to a liquid pool of liquidity filled with sUSD, Synthetix’s liquid, and immutable stablecoin.

Although Kwenta’s flagship product is perpetual futures, it also offers a spot exchange that enables users to swap token and synth assets thanks to a 1inch integration.

Decentrex

Decentrex is a trading front end that taps into Synthetix’s deep liquidity to allow users to trade perpetual futures. Decentrex is available in Optimism and dynamic pricing is enabled by Pyth oracle fees.

Lyra

Lyra is an options protocol on Arbitrum and Optimism. Lyra achieves this with a suite of smart contracts that implement an options AMM (Automated Market Maker) that allows traders to buy and sell options against a liquidity pool.

Liquidity providers (LPs) deposit sUSD into one of the asset-specific Lyra Market Maker Vaults (MMVs) and traders tap into this liquidity to create a two-sided (buy and sell) options market for the asset that the vault specifies (e.g. ETH Market Maker Vault LPs quote options on ETH).

Lyra uses Synthetix in 3 different ways:

Thales

Thales is a protocol for prediction markets on Optimism that works by leveraging sUSD as collateral by using Chainlink data feeds as the source of truth. The payoff for these types of markets can be easily understood as the total pool (minus the house fee) shared across all winning positions

Overtime markets

Overtime markets is a protocol that leverages Thales’ smart contracts to create positional markets for popular sporting events. This creates a sports AMM powered by Chainlink price feeds that allow traders to speculate on the outcome of sports events: HOME WIN, AWAY WIN, DRAW, CANCELED GAME, H1 WIN, H2 WIN, OVER WIN, UNDER WIN. Overtime offers markets for the NCAA, NFL, MLB, NBA, WNBA, NHL, English Premier League, Bundesliga, La Liga, Serie A, Uefa Champions League, ATP, CSGO…

Users can provide liquidity to the sports AMM in order to gain exposure to the AMM’s performance

Users can also invest in vault strategies such as:

Parlays are a common feature in centralized sports betting platforms. They allow traders to expand their positions to multiple markets in one potential payout. This is achieved by combining multiple wagers into one position. This is done by rolling over the winnings from each individual wager into the next leg of the wager. Each “leg” or individual position in the parlay must win for the parlay to grade as a winner.

dHedge – Toros Finance.

dHedge’s smart contracts power Toros Finance, a platform that provides automated vaults with various strategies to optimize their returns on a given yield strategy. What makes Toros special is that the investment strategy can change for improved returns, but the underlying market risk remains constant.

The platform offers yield strategies on stablecoins, ETH, BTC, market neutral yield, the SNX debt hedge index, and the Ethereum-gold index among others. As far as the integration with Synthetix goes, the SNX debt mirror pool token replicates the payoff of the Synthetix debt pool, enabling users to hedge their active debt exposure such that 1 sUSD worth of dSNX pool tokens hedges 1 USD worth of active debt.

Polynomial

Polynomial is a decentralized perpetual futures exchange that allows for trading with up to 25x leverage. The protocol is built on top of Synthetix and SNX stakers are the counterparties to the trades being made on the platform. In exchange, Synthetix stakers earn fees.

The orders are executed on Synthetix V2 and are, therefore, delayed orders. These are also known as next-price orders and have an associated time delay in their execution. Rather than being executed after a semi-arbitrary Chainlink price update, Polynomial allows the executor (trader or keeper) to fill the order after n seconds have passed, in addition to a price update. For example, if the specified delay is 30s and a price update occurs 10 seconds after submission, a keeper can still execute the execute or wait 30s to be executable. This eliminates front-running risk.

Polynomial also has other products that make DeFi more accessible to users, such as:

    Infinex

    Infinex is a new perps dex being created by Kain the original founder of Synthetix, it will use Synthetix’s underlying architecture to provide a CEX-like experience for trading decentrally.

    It has not been launched yet.

    Ethena Labs

    Ethena Labs is a decentralized stablecoin protocol built on Ethereum that will provide a crypto-native solution for money, not reliant on traditional banking system infrastructure, alongside a globally accessible and permissionless dollar-denominated savings instrument.

    On July 28, 2023, it was announced that they would be building their first decentralized perpetual exchange integration on the Synthetix Platform.

    It has not been launched yet.

    1inch / Curve atomic swaps

    Synthetix facilitates atomic swaps by pricing synths with a combination of both Chainlink and Uniswap V3 oracles. Using both sources for pricing protects stakers from frontrunning and allows traders to access the low slippage and low fees from Synthetix.

    One example of an atomic swap would be for example a user that wants to swap 100 ETH for BTC. To do so, 1inch converts ETH to sETH using Curve and then swaps sETH for sBTC at the oracle price with 0 slippage. 1inch then sells sBTC for BTC in Curve.

    Atomic swaps are one of the most dominant features in terms of volume routed through the protocol since most users don’t even notice that they are using Synthetix when they are interacting with 1inch. Besides, 100% of the fees generated from burning and minting synths are distributed to SNX stakers in the protocol.

    Others

    Platforms like 1inch, Curve, Dhedge, Paraswap, Yearn, or Aelin already leverage the deep liquidity and composability of Synthetix to deliver better trades with lower slippage, allow for hedging opportunities, and support other unique use cases.

    Why the Project was Created

    Synthetix was created in 2017 as a stablecoin protocol before Maker had even launched the DAI stablecoin. The original mechanism supported multiple collateral assets and was finally launched in 2018 as a multicurrency stablecoin. The project was called Havven, and the whitepaper is still available on Github. The original model aimed to create a stablecoin called nUSD, which was backed by a decentralized network of collateralized smart contracts that supported a dual token system (HAV and nUSD). This would allow for greater stability and resilience to market fluctuations compared to other stablecoins that rely on a single asset for backing. However, there was very little adoption and the protocol ended up leaning towards the trading side. Havven was then rebranded to Synthetix and pivoted to focus on synthetic assets and derivatives trading, while the stablecoin component has been replaced by sUSD within the new platform.

    Since then, Synthetix was built from the ground up to become a decentralized and composable derivatives liquidity system that would power the next generation of blockchain-based derivatives products. The system would become the de-facto liquidity layer for other protocols to build derivatives products on (options, perpetuals, insurance products, prediction markets…).

    Launching a new derivatives protocol is quite challenging in DeFi. Oftentimes, these protocols are faced with the cold-start problem of needing to attract collateral. Synthetix aims to solve this problem by making it possible for developers to create new markets and seamlessly connect to existing collateral vaults. In this way, almost any derivative protocol could be built on top of Synthetix V3, instead of from the ground up. As a result, Synthetix could be described as a protocol offering liquidity-as-a-service. 

    Roadmap

    The last official roadmap was posted on the Synthetix blog on July 31, 2020.

    A team member, cavalier.eth, has also published an article detailing where Synthetix v3 could lead to, including:

    Current Progress of Perps V3

    Perps V3 is still under development.

    A testnet trading competition was announced on August 24, 2023, starting in the first week of September, in order to stress-test the mechanism and identify any bugs before mainnet deployment, with prizes including:

    Current Progress of V3

    On February 22, 2023, Synthetix V3 was deployed on Ethereum Mainnet and Optimism.

    On June 7, 2023, the prototype for V3 Spot Market went live, allowing liquidity providers and traders to interact with the prototype UI. The prototype is considered an experimental alpha release and has undergone an initial audit from various security firms, listed under the Audit section.

    On July 17, 2023, Chainlink Cross-Chain Interoperability Protocol (CCIP) was integrated into Synthetix V3.

    On August 20, 2023, SIP-336 passed with the community voting to deploy the Synthetix V3 Core System on Base mainnet.

    The following are major V3 milestones that are still in progress:

    Sector Outlook

    Synthetix is the largest protocol working on synthetic assets and has ranked consistently in the top 5 protocols by TVL on Optimism, along with Velodrome, Uniswap V3, Aave v3, and Beefy.

    In the DeFi category of synthetics, Synthetix has consistently stood over its competitors across all chains in terms of both volume and liquidity.

    Its major competitors are perpetual protocols like GMX and Gains Network, even though these protocols are not specialized in the tokenization of synthetic assets per se and, instead, they compete against protocols that build on top of Synthetix, such as Kwenta. The same applies to Lyra competing against other option protocols like Ribbon, Dopex…

    GMX V2 will be centered around the introduction of synthetic assets and could effectively become the number 1 competitor of Synthetix across all chains. Nonetheless, Synthetix could still maintain its leadership on Optimism and even increase its market share with a cross-chain expansion. Synthetix already has the liquidity and is unlikely to face a cold-start problem, unlike its competitors, who will have to bootstrap their initial liquidity from scratch. On a similar note, Synthetix can also capitalize on the opportunity of listing velocity for new asset perps. When this process is permissionless, Synthetix would benefit from creating new market opportunities even before centralized exchanges have time to do so.

    With the increasing adoption of Oracle networks like Chainlink and Pyth, and the growth of derivatives markets, it is expected to see an increasing number of emerging protocols offering trading services built on top of a single or multi-asset liquidity pool. However, what makes Synthetix unique and sets the protocol apart is its ability to work as a liquidity layer that other protocols can tap into and build on top of.

    Chains

    Synthetix is deployed on Optimism and Ethereum mainnet. The introduction of asset teleports suggests an imminent cross-chain expansion across other EVM-compatible chains.

    Using the Protocol

    Synth assets are minted by incurring debt after depositing a whitelisted asset as collateral.

    Note that if the price of the collateral asset increases, an equivalent amount of a staker’s SNX is automatically unlocked as collateral.

    The system tracks the debt pool by issuing debt shares to stakers when they mint or burn sUSD or exchange for other synths. This debt can increase or decrease independent of their original minted value, based on the exchange rates and supply of synths within the protocol.

    SNX stakers act as a pooled counterparty to all synth exchanges that take place on the platform. As a result, stakers take on the risk of the overall debt in the system, even though they also have the option to hedge by taking positions external to the system.

    Automating staking

    Synthetix has partnered with Gelato to enable stakers to automate staking-related tasks. Some of the tasks that can be automated are – claiming rewards, minting max (to stake additional SNX), and burning (to unstake some SNX and raise your c-ratio).

    Automation functionality can be enabled using the Synthetix Delegate function, which has been a part of the system since the release of SIP-10 in March 2020. Gelato bots cannot control your staking account; they can only claim rewards on your behalf by utilizing the delegate function.

    Automated claiming

    Gelato claims work in the following way.

    Setup Guide – Claiming

    An example of automation works in the following way.

    Deposit funds to your Gelato Account. These funds will be used to pay for transactions that claim on your behalf. Recommended Value is $20-25 as Optimism transactions only cost approximately $.50.

    Create a Task on Gelato by clicking the “Create Task” button.

    Use 0xaAd3a6178d741DEA76F57901FeeDaC0f7Bb280E5 as the contract address

    Click “Select a function” and then select “Claim”

    Put your address into the “address” line

    Click “Whenever Possible” to ensure that the contract checks if you’re eligible for rewards all the time. If this isn’t selected, then it may miss eligible rewards.

    Name your task and finish creating it. Once you’re done, now you’ll need to delegate only claiming rights to the Gelato contract, accessible as msg.sender once the task is created.

    Automated Claiming with Burning to ClaimAutomated Claiming with Burning to Claim

    If you are below the target and have enough sUSD in your wallet to burn to the target, Gelato will burn sUSD and then claim your pending SNX rewards. Although this feature is useful, it is not required.

    To enable automated claiming with burn to claim, use the same setup guide, but instead of “Claim,” use the function “Burn and Claim” and delegate the ability to burn alongside claim to the gelato address.

    Steps for claiming staking rewards

    If you are unable to claim, that means that your c-ratio is below the target c-ratio. You can raise your c-ratio by burning sUSD or staking more SNX.

    Debt, minting, and burning SNX

    A user’s active debt represents a staker’s share of the debt pool. This is a key metric for users to be aware of since stakers must eventually repay their debt to unlock SNX collateral.

    A staker cannot claim their epoch rewards if their account’s c-ratio is below the target c-ratio. In this situation, they would burn sUSD to increase their c-ratio. Conversely, if a staker’s c-ratio is higher than the target c-ratio during an epoch snapshot, that means that they are not using their SNX collateral to their full potential, since some SNX tokens are not being staked and used as collateral. In this case, an SNX staker would mint sUSD by staking more SNX.

    Delta-hedging strategies that mimic the overall debt pool are the safest way for stakers to ensure that their active debt follows their issued debt.

    For liquidity providers

    Creating Accounts

    To deposit collateral in the Synthetix protocol, users are required to create an account. These accounts are represented as ERC-721-compliant tokens, which function as non-fungible tokens (NFTs). They can be transferred between wallets using any application that supports NFTs.

    To mint an account token, anyone can call the createAccount() function on the Synthetix Core address. The process of minting an account token incurs gas fees, but there is no additional cost associated with it. When creating an account, there is an optional parameter called requestedAccountId, which allows users to specify an ID value below type(uint128).max / 2 that is not already in use.

    The ERC-721 compliant interface for the account token can be accessed at the Account Token address. All other functionalities related to accounts, including the createAccount function, are available at the Synthetix Core address.

    Account Permissions

    Accounts within the Synthetix protocol have the ability to delegate permissions to addresses other than the owner. This feature serves various purposes, such as enhancing security (e.g., using a hardware wallet as the owner and a software wallet with limited permissions for regular activities like claiming rewards) or collaboratively managing liquidity positions.

    Here are the available permissions and their respective functionalities:

    Notably, there are no specific permissions for “DEPOSIT” or “BURN” operations. These operations are permissionless and can be performed by anyone in any liquidity position as they contribute to the position’s health improvement.

    The Account Module, accessible at the Synthetix Core address, manages these permissions. Each permission mentioned above should be encoded/decoded as a bytes32 value when making requests.

    To determine whether an address possesses a particular permission for a given account, you can use the hasPermission function. The “getAccountPermissions” function provides all addresses and their respective permissions associated with a given account. The account owner, as well as addresses with the “ADMIN” permission, can grant and revoke permissions by calling the “grantPermission” and “revokePermission” functions. Additionally, an address can revoke its own permissions by using the “renouncePermission” function.

    Delegating Collateral

    Providing liquidity to pools involves two function calls:

    The actions of depositing and withdrawing collateral impact the amount of available collateral associated with an account. When using the “delegateCollateral” function, the available collateral is adjusted by modifying the amount provided to a specified pool. These functions can be executed together using the multicall function, enabling users to perform multiple actions in a single transaction.

    When delegating collateral, the position size must exceed a minimum amount determined by governance for each collateral type. This minimum amount typically serves as the liquidation reward for the position.

    There are specific scenarios where collateral cannot be reduced or withdrawn:

    The types of collateral accepted by the protocol are globally configured by governance. Any changes to enable, disable, or modify collateral settings can be proposed through SCCP. You can retrieve information about the currently accepted collateral types by using the “getCollateralConfigurations” function.

    Liquidity Pools

    Pools within the Synthetix protocol are identified by unique ID numbers. These pools can fall into different classifications:

    Liquidity Positions

    When a liquidity provider uses the “delegateCollateral” function, it creates or updates a liquidity position within a pool. This action can affect the amount of debt associated with the position by minting or burning sUSD. Additionally, the performance of the markets that receive liquidity from this pool can either positively or negatively impact the debt linked to the position. If the markets perform well, they will gradually reduce the debt owed by the liquidity providers.

    Each liquidity position comprises:

    These positions are distinguished by the combination of the relevant Account ID, Pool ID, and Collateral Type Address. It’s important to note that a single account cannot have two separate positions with the same pool and collateral type.

    Collateralization Ratio​ (C-Ratio)

    Every liquidity position is associated with a collateralization ratio, which represents the relationship between the value of the collateral in the position and the amount of debt it is responsible for. This ratio is expressed as a percentage. For instance, a C-Ratio of 200% indicates that the value of the collateral is twice the amount of debt it supports. 

    The value of the collateral is determined by the price of the collateral, which is reported by an oracle through the oracle manager. On the other hand, the debt value is calculated based on the sUSD minted and burned with the liquidity position, along with any debt or credit assigned by the markets supported by the pool.

    If the collateralization ratio of a liquidity position drops below the Liquidation C-Ratio specific to its collateral type, the position becomes eligible for liquidation. To mitigate the risk of liquidation, liquidity providers can increase their collateralization ratios by depositing more collateral or burning sUSD.

    Retrieving Liquidity Position Data

    To obtain data regarding a liquidity position, you can use the following functions: 

    The “getPositionCollateral” function retrieves the collateral amount associated with a specific liquidity position. Similarly, the “getPositionDebt” function retrieves the debt amount tied to that position. The “getPositionCollateralRatio” function, on the other hand, returns the C-Ratio (collateralization ratio) of the specified liquidity position. It’s important to note that if the position has more credit than debt, the “getPositionCollateralRatio” function will return 0.

    You can retrieve the Liquidation C-Ratio for a particular collateral type by utilizing the getCollateralConfiguration function. All values obtained from these functions are represented as integers with 18 decimal places.

    It’s worth mentioning that functions related to a position’s debt, such as “getPositionDebt” and “getPositionCollateralRatio”, may update cached values within the system. Consequently, these functions are not declared as view functions. To treat them as view functions, you can query them using callStatic. This ensures that the values returned by the system are accurate, regardless of any recent internal caching updates.

    Minting and Burning sUSD

    The Synthetix protocol generates sUSD, which is a decentralized stablecoin. It is backed by the collateral deposited in the Synthetix protocol and operates as an ERC-20 token. Markets integrated with Synthetix utilize sUSD as a medium of exchange.

    Once a liquidity position has been created by delegating collateral, liquidity providers have the option to borrow sUSD without any interest by “minting” it. This is done by calling the mintUsd function. Each time sUSD is minted, the debt of the position increases by $1.

    However, liquidity providers are not allowed to mint sUSD in a way that causes their position’s collateralization ratio (C-Ratio) to fall below the Issuance C-Ratio specified for the relevant collateral type. The Issuance C-Ratio for each collateral type is determined by the governance of the Synthetix protocol. The getCollateralConfiguration function can be used to retrieve the Issuance C-Ratio, represented as an integer with 18 decimal places.

    On the other hand, sUSD can also be used to repay loans by “burning” it. This is accomplished by calling the burnUsd function. Burning sUSD reduces the debt of a position by $1 for each sUSD burned, regardless of whether the debt was accrued from minting sUSD or from debt distributed by a market. In order to reduce the collateral delegated to a position, the debt must be repaid to ensure that the resulting C-Ratio is above the Issuance C-Ratio.

    Position Liquidations

    In the Synthetix protocol, if the collateralization ratio of a liquidity position falls below the liquidation collateralization ratio specific to its corresponding collateral type, the position becomes eligible for liquidation.

    During liquidation, the collateral and debt associated with the position are distributed among all other liquidity positions participating in the same pool and collateral type in a pro-rata manner. However, a fixed amount of collateral is provided to the liquidator (usually a bot) as an incentive.

    To determine if a liquidity position is eligible for liquidation, the “isPositionLiquidatable” function can be used. If this function returns true, it indicates that the position can be liquidated. The liquidate function can then be called to initiate the liquidation process. The address calling the liquidate function will receive a liquidation reward per the specifications defined in the “getCollateralConfiguration” function. Alternatively, if the collateral of the position is less than the liquidation reward amount, the entire collateral will be given to the liquidator.

    For liquidity pool managers

    Creating and Configuring Pools

    Liquidity Pools distribute credit and debt between liquidity providers and derivatives markets. A pool’s manager (i.e. owner) can decide which market to provide liquidity and set relevant configuration values.

    Creating Pools

    Pools within the Synthetix protocol can be created using the “createPool” function. Once a pool is created, ownership of the pool can be transferred by utilizing the “nominatePoolOwner” and “acceptPoolOwnership” functions. In case the nominated ownership needs to be revoked, the “renouncePoolNomination” function can be used.

    Additionally, pools can have human-readable names associated with them, which are stored on-chain. The owner of the pool has the ability to set the name of the pool using the “setPoolName” function. This name can be retrieved using the “getPoolName” function.

    Configuring Pools

    The owner of a pool has the ability to define its market composition, weights, and maximum debt share values using the “setPoolConfiguration” function. This configuration plays a significant role in determining the portion of profit or loss that the pool will assume from each market, the maximum debt limit the pool is willing to accept, and the credit capacity (withdrawable sUSD) allocated to each market.

    However, there are certain limitations and restrictions regarding the update of a pool’s configuration:

    These restrictions help maintain the integrity and stability of the pool’s configuration and prevent potential disruptions or manipulations.

    Calculating Credit Capacity

    The pool configuration function plays a crucial role in determining the available credit capacity, which refers to the amount of withdrawable sUSD, allocated to markets within a pool. Here’s how it works:

    Weights 

    The weights assigned to each market determine the proportion of liquidity allocated to that market within the pool. A higher weight means a larger share of liquidity. For example, if a pool has $500,000 of liquidity, and the snxBTC market has a weight of 3 while the snxEUR market has a weight of 1, the collateral provided to snxBTC would be $375,000, and the collateral provided to snxEUR would be $125,000.

    Maximum Debt Share Value

    The maximum debt share value is determined by comparing two factors:

    1. a) The maximum debt share value specified in the pool’s configuration, which allows the pool to limit its exposure to a market.
    2. b) The minimum liquidity ratio, which is applied to the collateral value after factoring in the weights. This ensures that the debt share does not exceed a certain threshold based on the value of the collateral.

    Calculation of Maximum Debt Share Value

    The maximum debt share value is derived by adding the existing debt share value to the lesser of the two factors mentioned above. The debt share value represents the amount of debt assigned to the market. It fluctuates over time based on changes in the value of debt, collateral, and the amount of collateral backing the market.

    Credit Capacity

    The credit capacity allocated to a market is calculated as the difference between the maximum debt share value and the current debt per share value. It represents the additional debt the market can assume before exceeding the minimum liquidity ratio. This credit capacity is expressed in terms of stablecoin value (sUSD).

    Available Credit Capacity

    The available credit capacity for a market is determined by considering the total credit capacity allocated to it across all pools. It is calculated by subtracting the market’s reported debt and net issuance (minted minus burned stablecoins) from the total credit capacity. This available credit capacity represents the maximum amount of stablecoins the market can withdraw.

    If a market reports debt such that its available credit capacity drops below 0, it becomes insolvent, and positions backing that market no longer accumulates debt.

    Debt Shares

    The collateral value provided to markets, as determined by the weights discussed above, represents the value available to support the derivatives issued by the market. It encompasses both the sUSD withdrawn by the market and the reported debt, which reflects the value of the derivatives issued by the market.

    When liquidity pools provide liquidity to a market, they assume pro-rata shares of the market’s changes in debt, whether positive or negative. This means that if a pool allocates a larger weight to a specific market (all other factors being equal), it will experience greater gains if the market is profitable and greater losses if the market performs poorly. As other pools start providing liquidity to the same market, the original pool’s share of gains and losses diminishes. This dynamic creates a market for derivatives liquidity within the Synthetix ecosystem.

    To measure a market’s performance over its lifetime, we can consider its debt share value, which represents the accumulated profit or loss generated by the market. For instance, if a market has earned $2 in profit for every $1 of credit capacity assigned to it, its debt share value would be -$2. This value serves as a reflection of the market’s overall profitability or loss since its inception.

    Collateral Vaults

    In the Synthetix protocol, each pool is associated with one vault for each accepted collateral type. This separation of collateral into vaults has several implications:

    Rewards Distributors

    Owners of pools have the ability to manage rewards distributors within the vaults of their pools. Rewards distributors are implemented as smart contracts that enable the distribution of rewards to all liquidity positions within a specific vault. These rewards can be distributed either instantly or gradually over a period of time, and they can be collected by the liquidity providers. Pool owners have the authority to register and remove these rewards distributors as needed.

    Creating a Rewards Distributor

    The “IRewardDistributor” interface outlines certain requirements that reward distributors must adhere to. One of the key functions within this interface is the “payout” function, which facilitates the transfer of a specified amount of rewards to the address of the sender. It is important for security purposes that the payout function reverts unless the message sender is the Synthetix Core address.

    To establish a connection between a rewards distributor and a vault, a pool owner can utilize the “registerRewardsDistributor” function. It is worth noting that, due to gas considerations, a maximum of 10 rewards distributors can be linked to a particular vault at any given time. If a pool owner wishes to remove a rewards distributor, they can do so by invoking the “removeRewardsDistributor” function.

    Distributing Rewards

    Once a rewards distributor is registered, it has the ability to invoke the “distributeRewards” function. This function requires the “poolId” and “collateralType” parameters to identify the relevant vault. The amount parameter specifies the total quantity of tokens to be distributed, commencing from the start timestamp and extending over the duration specified in seconds. It is important to note that duration can be set to 0, resulting in the instantaneous distribution of rewards based on the pro-rata distribution at the start. A rewards distributor can invoke the “distributeRewards” function multiple times, supplementing the rewards already distributed to participants in the vault.

    Any individual can utilize the “getAvailableRewards” function to ascertain the amount that can be claimed by a specific account ID from a rewards distributor that is registered to a designated vault. This calculation accounts for any previously claimed amounts. Subsequently, the address that possesses ownership of the account (or holds relevant permissions) can execute the “claimRewards” function. This function, in turn, triggers the payout function on the rewards distributor, ensuring that the appropriate amount is transferred.

    Vault Liquidations

    It is possible for an entire vault to be liquidated. This may occur when the ratio of the value of all the collateral it contains relative to the value of all of the debt it’s responsible for drops below the Liquidation C-Ratio for its corresponding collateral type. This is a scenario where sequentially performing liquidations on each of the liquidity positions would result in the last remaining position still having a collateralization ratio below the Liquidation C-Ratio.

    In this case, anyone can wind down this vault by repaying some or all of its debt with sUSD and receiving a proportional share of the collateral held in the vault. Because this can occur the moment the vault’s C-Ratio drops below the Liquidation C-Ratio (while still above 100%), liquidators are incentivized to restore the health of the system by receiving collateral worth more than the debt they are repaying. The liquidated collateral is seized from all of the liquidity positions in the vault pro-rata.

    To perform a vault liquidation, anyone can call the “liquidateVault” function. The “poolId” and “collateralType” parameters specify the vault to liquidate. The “liquidateAsAccountId” parameter specifies an account that should receive the collateral. (It can then be delegated to a pool, or retrieved from the system using the withdraw function.) The maxUsd parameter specifies the maximum amount of sUSD that will be transferred from “msg.sender” to perform the liquidation. If maxUsd is less than the total debt carried by the vault, a partial liquidation will occur.

    Credit and Debt Distribution

    The Synthetix protocol enables a flexible relationship between liquidity pools and derivatives markets, allowing for a many-to-many connection. When liquidity providers participate in liquidity pools, they extend credit to the markets and have their debt adjusted accordingly. Liquidity providers have the option to modify their positions within the pools, and pools can also adjust their configurations in relation to the markets, albeit with some restrictions.

    Importantly, markets can have an unlimited number of pools backing them, and this does not impact the gas usage of the protocol. This scalability feature ensures efficient operation regardless of the number of pools supporting a market.

    To understand Synthetix, one can view it as a mechanism for generating a stablecoin through collateralized debt positions. In addition, markets within the protocol have the capability to mint and burn stablecoins on behalf of positions that have opted into the liquidity pools backing those markets. Furthermore, markets have the ability to report the debt they have issued, which is assumed by the liquidity positions supporting the market. Governance-configured limits determine whether markets are allowed to provide their own collateral to increase their credit capacity.

    Balancing Pools

    As described in the section on Configuring Pools, collateral from individual positions is aggregated into vaults within pools, and then allocated to a set of markets based on predetermined weights set by the pool owner.

    The value of the collateral assigned to each market, along with the resulting available credit capacity, is cached in the protocol. This ensures that traders can interact with markets smoothly without encountering scalability issues related to gas usage. The cached values are automatically updated in various scenarios, such as when liquidity providers delegate collateral to a pool, when a pool’s configuration is modified, or when liquidations occur. Additionally, anyone can trigger this update process by using the external function called “rebalancePool”.

    It’s important to note that if the cached value becomes outdated and doesn’t accurately reflect price movements or other factors, it doesn’t pose a risk of insolvency for the stablecoin. The issuance of markets is limited by the minimum liquidity ratio, which prevents excessive debt relative to the collateral value. If the debt surpasses a certain threshold, liquidators still have an opportunity to step in and initiate the liquidation of positions and vaults to maintain the stability of the system.

    The Debt Distribution Chain

    Debt adjustments originating from markets are distributed through pools to vaults and eventually to individual liquidity positions. This process is facilitated by the debt shares system, which relies on the Distribution.sol contract.

    Each debt share represents a specific dollar value of debt that it is responsible for. The maximum debt share value, which is set when pools are configured to back markets, serves as a threshold beyond which the pool effectively stops supporting the market. This mechanism acts similarly to a “stop loss” feature, where if a market reports an exceptionally high amount of debt, liquidity providers’ exposure is limited. If a pool is no longer backing a market due to this mechanism, it also ceases to receive negative debt adjustments, such as those from earned fees.

    In the Synthetix system, debt is accounted for as a signed integer, allowing it to be positive or negative. Negative debt can be viewed as a form of credit that liquidity providers can utilize to issue additional sUSD. In an extreme scenario, a market that only deposits sUSD and never reports any debt would accumulate a negative debt balance. Liquidity providers supporting this market would earn credit that they can collectively use to mint sUSD equivalent to this negative balance. It’s important to note that markets cannot report negative debt themselves; they can only decrease their debt by depositing sUSD. If a market reports an excessively high debt value, liquidity positions are safeguarded by the maximum debt share value mechanism mentioned earlier.

    For traders

    Spot Market

    The Spot Market system within Synthetix is responsible for generating synths, which are ERC-20 tokens, and facilitating their exchange with stablecoins generated by Synthetix. The price at which these synths are exchanged is determined by the Oracle manager, taking into account applicable fees.

    In order to execute orders, the markets associated with the Spot Market system interact with Synthetix by either withdrawing or depositing stablecoins. These actions have a direct impact on the positions of liquidity providers within the market. Withdrawing stablecoins from Synthetix negatively impacts the position of liquidity providers, while depositing stablecoins has a positive impact.

    Additionally, the market reports the total supply of synths multiplied by their current price to Synthetix as debt. This ensures that the synths are collateralized by the liquidity providers within the Synthetix system. The reported debt amount is locked, meaning that liquidity providers cannot remove the delegated credit that secures the issued synths. This mechanism ensures that the synths remain adequately collateralized by the liquidity providers’ contributions, preventing the synths from becoming undercollateralized.

    Creating Synths

    To generate a fresh synthetic asset and its associated market, utilize the “createSynth” function by providing the desired token name, token symbol, and market owner address as parameters. This function will yield a unique market ID, which can be employed when configuring a pool within the Synthetix protocol to provide liquidity to the market. 

    By using the “getSynth” function with the specified market ID, you can obtain the address of the deployed synthetic asset. The market owner’s address holds the authority to set up price feeds and fees that govern the market’s operations.

    Configuring Prices

    To set the price feeds that should be used by the specified market, the owner of a market may call “function”:

    The node IDs must first be registered with the Oracle manager.

    Configuring Synth Market

    The owner of the market may set market configurations which include different fee structures, leverage values, and more. See IMarketConfigurationModule interface for a list of configurable values.

    Types of Transactions

    This market implementation allows synths to be exchanged using three different transaction types: atomic orders, asynchronous orders, and wrapping/unwrapping.

    Atomic Orders

    The market incorporates an Atomic Order Module that enables traders to buy or sell synths in a single transaction without any intermediary steps. This functionality streamlines the process and ensures atomicity.

    To initiate a purchase of a synth in an atomic order, traders can use the buy function. They need to provide the market ID of the desired synth, the number of stablecoins they wish to exchange, the minimum amount of synths they expect to receive for the transaction to be considered successful, and an optional referrer address. Prior to calling this function, traders must approve the transfer of the specified amount of stablecoins to the market. Alternatively, the “buyExactOut” function can be used to purchase synths by specifying the exact synth quantity desired.

    On the other hand, to sell a synth in an atomic order, traders can utilize the sell function. They need to specify the market ID of the synth they want to sell, the number of synths they wish to provide for the exchange, the minimum amount of stablecoins they expect to receive in return, and an optional referrer address. Similar to the buy function, traders must approve the transfer of the specified amount of synths to the market before executing this function. Alternatively, the “sellExactOut” function allows traders to specify the desired amount of stablecoins they want to receive instead of specifying the amount of synth to sell.

    Before executing a transaction, traders can also utilize the quote functions to estimate the transaction cost, including the associated fees. The available quote functions are listed below:

    Fees

    Asynchronous Orders

    The Async Order Module facilitates asynchronous orders, which involve two separate transactions: 

    While this approach reduces composability, it offers advantages such as mitigating front-running risks and enabling the provision of lower fees to traders through the “MarketConfiguration.asyncFixedFee” parameter. It’s important to note that asynchronous orders can only be canceled before settlement if they fall outside the settlement window.

    The market owner has the ability to configure different settlement strategies for asynchronous orders. Each settlement strategy can be defined with the following properties:

    The following actions are involved with asynchronous orders:

    Fees

    The “asyncFixedFee” is applied to async orders instead of the “atomicFixedFee”.

    Note: if a custom fee is set for a given transactor, the custom fee takes precedence over all fixed fees.

    Wrapping

    The Wrapper Module enables markets to directly provide collateral to Synthetix and issue synths of equivalent value after applying fees. This functionality is implemented in the module’s logic.

    To wrap collateral and receive a synth, a trader can use the “wrap(uint128 marketId, uint wrapAmount)” function. The trader needs to specify the relevant market ID for the synth they want to wrap and the amount of collateral they wish to provide for the exchange. Prior to calling this function, the trader must approve the transfer of the specified collateral amount to the market.

    To unwrap a synth and receive collateral, a trader can use the “unwrap(uint128 marketId, uint unwrapAmount)” function. The trader needs to specify the relevant market ID for the synth they want to unwrap and the number of synths they want to provide for the exchange. Before calling this function, the trader must approve the transfer of the specified synth amount to the market.

    Traders can simulate these functions using the “callStatic” method to obtain a quote that estimates the amount to be provided in the exchange. This allows traders to assess the expected outcome of the transaction without actually executing it.

    Fees

    Additional Fees and Configuration

    In addition to the fees specific to transaction types outlined above, the following fees may be applied for different effects. Some or all of the fees may also be captured and distributed by a custom fee collector, rather than returned to liquidity providers directly.

    Utilization Rate Fee

    A supply target fee is implemented to limit the exposure of liquidity providers to price fluctuations in situations of high demand. The liquidity provided to a market corresponds to a supply target, which represents the maximum amount of synths the market would ideally issue if all the credit capacity provided to the market were fully utilized. This can be seen as achieving a utilization rate of 100%.

    If the utilization rate exceeds 100%, a supply target fee can be applied to buy orders in both atomic and asynchronous orders. The fee rate, expressed as a percentage, is configured by the market owner using the” setMarketUtilizationFees()” function. The fee is calculated based on the percentage by which the utilization rate exceeds 100% and is applied to the order.

    For example, if a buy order would increase the utilization rate from 90% to 120%, only the utilization above 100% incurs a fee. In this case, the fee rate would be calculated as (100% + 120%) / 2 = 110%. The configured fee rate is then multiplied by the average utilization above 100%, which in this case is 110%. If the fee rate is set to 0.1%, the calculation would result in 10 (percentage points above utilization) * 0.1% = 1% fee.

    Additionally, there is a configurable parameter called “collateralLeverage”, which allows the market owner to specify the extent to which the delegated collateral can be leveraged. By default, when creating a new synth market, the collateral leverage is set to 1x. However, it can be adjusted to 2x, for example, where the market utilization % is based on the ratio of the total outstanding synth supply to 2x the delegated collateral.

    Auto-Rebalancing Skew Fee

    An auto-rebalancing skew fee is implemented to reduce protocol risk by utilizing the wrapping functionality. This fee can be applied to buy and sell orders based on the market skew, which is determined by the difference between the total supply of synths and the amount of wrapped collateral. The purpose of this fee is to create an arbitrage opportunity that helps reduce the skew.

    The market owner has the ability to set the skew scale using the “setMarketSkewScale()” function. The skew scale is a factor by which the current market skew is divided to determine the fee rate.

    The calculation of the skew fee depends on the asset provided by the trader. When a trader uses functions like “buyExactIn” or “sellExactOut” and specifies a desired USD amount to buy or receive on a sell, the synth amount is determined using the following formula. This equation ensures that when a trader both buys and sells the same amount, the resulting fee is zero.

    “calculateSkew” equation:

    For “buyExactOut” and “sellExactIn”, we know the synth amount the user is requested, or is willing to sell, so the skew calculation boils down to just adding or subtracting the synth amount and averaging the skew for before and after the trade. Ex:

    This example shows a buy transaction, the same eq applies but after skew is a subtraction and we use the negative value of skew fee since it’s a sell to get the correct skew fee %.

    Custom Fee Collector

    The owner of a market has the ability to deploy a custom fee collector contract that follows the “IFeeCollector” interface. This custom fee collector can be attached to the market using the “setFeeCollector()” function.

    Once a custom fee collector is set, the market will approve the collected fees (in the form of stablecoins) to be transferred to the fee collector contract after each transaction. 

    Subsequently, the market will call the “collectFees()” function on the fee collector contract. Any fees that are not transferred out of the market during this call will be deposited to liquidity providers in Synthetix according to the usual process.

    Referral Fees

    Market owners can set different addresses (referrers) to receive a portion (or all) of the exchange (fixed: async/atomic) fees. Once a referrer is set, on any trade, via the optional referrer parameter, the trader or trade initiator can specify a referrer, and a portion of the fees get sent to the referrer during the transaction. Only exchange fees are eligible for referrers.

    Interest Rate

    The owner of a market can set an interest rate (denominated as an annual percentage with 18 decimal places) for the synths issued by their market with the setInterestRate() function. This is implemented by making the synth a rebase token, where the total supply (and holders’ individual balances) automatically decay at the specified rate.

    Though synth decay may complicate composability, this incentivizes liquidity providers to back synths that tend to be held over long periods of time rather than actively exchanged.

    For derivatives market builders

    Integrating Synthetix

    Derivatives market implementations can be registered with the Synthetix protocol by conforming to the “IMarket” interface, which consists of three functions:

    Managing Credit & Debt

    When a market receives sUSD, typically through the sale of a synthetic asset, it should deposit that sUSD into the market manager by calling the “depositMarketUsd” function. This action credits all the pools and their corresponding liquidity positions that back the market in a proportionate manner.

    Conversely, when a market needs to pay out sUSD, such as when a synthetic asset is sold back to the market, it can withdraw sUSD from the market manager using the “withdrawMarketUsd” function. This withdrawal increases the debt among all the pools and their associated liquidity positions that support the market, again in a proportionate manner. However, the market is only allowed to withdraw up to the amount returned by the “getWithdrawableMarketUsd” function.

    To determine the net issuance of sUSD by the market (the difference between the amount withdrawn and the amount deposited), you can use the “getMarketNetIssuance” function. It’s important to note that this value can be negative, indicating a net deposit rather than a net withdrawal. By combining the values from “getMarketNetIssuance” and “getMarketReportedBalance”, you can calculate the total debt of the market using the “getMarketTotalDebt” function.

    Finally, to retrieve the amount of collateral backing the market, you can use the “getMarketCollateral” function. This provides insight into the collateralization of the market.

    Minimum Delegation Duration

    User

    Market implementations may call the “setMarketMinDelegateTime” with a duration (of seconds) that must elapse between calls where a pool or liquidity provider alters their delegation to this market. Similar to the “minimumCredit” value, if this is set very aggressively, liquidity providers will be disinclined to delegate collateral to the market.

    This functionality helps mitigate the front-running of liquidity providers. For example, an active liquidity provider or pool manager may be able to anticipate that a market will call depositMarketUsd with a large amount, delegate collateral to the market just before this transaction, and then remove their collateral just after the transaction completes. The intention here would be to extract risk-free yield at the expense of passive liquidity providers; this is limited if the minimum delegation duration forces them to continue to be exposed to the market’s performance for a longer time period.

    Market-Provided Collateral

    In certain cases, governance has the authority to authorize specific markets to deposit collateral. These markets can then utilize the value of the deposited collateral to increase their credit capacity. This functionality is particularly useful in market designs like the wrapper feature in the Spot Market implementation, where a specific amount of collateral, such as one ETH, can be deposited to issue an equivalent amount of snxETH.

    By allowing markets to provide collateral, it enables the implementation of new market design mechanisms that support the scalability of the stablecoin. The collateral can be minted against its full value, offering increased flexibility and liquidity. However, it is important to note that granting this functionality to all markets would introduce significant risk to the protocol, as there currently isn’t a mechanism in place to liquidate this type of collateral. Therefore, governance carefully assesses each market implementation and determines if it includes sufficient risk mitigation measures before permitting the use of market-provided collateral, up to a certain cap.

    Registering a Market

    To access credit capacity from liquidity providers, markets can be integrated with the Synthetix protocol. This integration involves the market reporting its debt balance, depositing sUSD, and withdrawing sUSD based on the amount of liquidity delegated to it by pools, which determines its credit capacity.

    To initiate the integration process, a market must be registered using the registerMarket function. This function requires the address of the market as a parameter. Once registered, the market will be able to interact with the Synthetix protocol by using the ID returned by the registerMarket function.

    It’s important to note that markets can only be registered if they conform to the IMarket interface. This interface defines the required functions that the market implementation must adhere to in order to integrate with Synthetix successfully. For more detailed information on the specific functions that need to be implemented, you can refer to the “Integrating Synthetix” documentation.

    For governance participants

    Please refer to the Governance section for more information about Synthetix Governance.

    The current codebase used for governance can be found at the Governance v1.0.0 release in the Synthetix V3 repository.

    For developers

    Quick Start

    Run a local node with clean deployment of the Synthetix core system, mock collateral, the oracle manager, a spot market, and a perps market with the following command:

    To export the ABIs and contract addresses for this deployment, run the following command:

    Remember to always interact with the proxy contracts instead of the router or modules directly.

    Check out the Synthetix Sandbox repository to see the specifics of how this node is configured. You can fork the repository, make modifications to the Cannonfile to create different scenarios, and use SampleIntegration.sol as a boilerplate for developing smart contract integrations.

    If you have questions, reach out in the #dev-portal channel of the Synthetix Discord server.

    Technical Architecture

    Synthetix V3 consists of a collection of separate systems. Each system includes:

    Router Generator

    Router contracts in the Synthetix V3 repository are generated automatically using specialized tooling located in the utils/router folder. To find more information and guidance on utilizing this tooling, please refer to the README file in that directory.

    It’s worth noting that Etherscan currently does not support the proxy architecture employed by these router contracts when generating Read/Write Contract user interfaces. As an alternative, you can use a tool like the Cannon registry explorer, which offers similar functionality and can help you interact with the router contracts effectively.

    Storage Libraries

    In systems utilizing storage libraries, similar to models in MVC frameworks, contracts are employed to load and save structured data from specific storage slots. An example of such a library is the Collateral Configuration storage library.

    To prevent the risk of data corruption caused by invalid upgrades to storage libraries (such as rearranging the order of items in a struct, which can lead to unintended side effects), a Hardhat plug-in has been developed. This plug-in facilitates the validation of storage updates in the continuous integration pipeline.

    Interacting with storage libraries during unit testing can be challenging. To address this issue, the plug-in includes a “generate-testable” task. This task automatically generates a smart contract with getter and setter methods tailored to the specified storage library. This simplifies the process of testing and interacting with storage libraries in a unit testing environment.

    Video Overview

    Users can also take a look at the overview in video format.

    Smart Contracts

    These are not implemented yet but users can take a look at the Natspec documentation for information.

    Subgraphs

    These are not implemented yet but users can take a look at the subgraph directory for each system in the Synthetix-v3 repository on Github for information.

    Addresses + ABIs

    These are not implemented yet but users can take a look at the synthetix-omnibus deployments on the Cannon registry for information.

    Smart Contract Audits

    Please refer to the Audit section.

    Design Guidelines

    These guidelines were created to assist new protocols that want to build on top of Synthetix V3 and be part of our growing ecosystem. They are design standards/best practices that will help guide you and ensure a design standard across all protocols.

    Figma File

    Resources

    Business Model

    Synthetix charges a small fee on all trades executed on its platform. These fees are then distributed to SNX stakers, who must use their SNX tokens as collateral in order to provide liquidity on the platform. As a liquidity layer, Synthetix benefits from trading volume as well as from protocol integrations that will underwrite derivatives products using Synthetix’s liquidity.

    100% of the trading fees are allocated to stakers. Out of that proportion, all of the fees are burnt on a global debt pool ratio, so that everyone gets the same proportion.

    SNX stakers act as a pooled counterparty to all synth exchanges on the platform.

    Note that if the collateral ratio falls below the target collateral ratio, stakers will be unable to claim fees until they restore their ratio.

    Revenue Streams

    SNX stakers can claim the fees that have been accrued by their positions through the Synthetix contract. When claiming fees, stakers can also claim their SNX rewards.

    1. The fee pool checks whether there are fees currently available and whether the staker is eligible to receive fees.
    2. The amount of fees in sUSD is sent to the staker’s wallet address and the balance of the fee pool is updated.
    3. A prorated amount of escrowed (inflationary) SNX is assigned to the wallet address from the SNX staking rewards contract.

    Fees are allocated based on the proportion of debt issued by each staker. For example, if a staker has issued 1,000 sUSD in debt, the debt pool is 10,000 sUSD and 100 in fees are generated during that fee period, the staker will be entitled to 10 sUSD, since their debt represents 10% of the debt pool. The same proportional distribution mechanism is used for SNX staking rewards.

    Economics

    Coingecko: https://www.coingecko.com/en/coins/synthetix-network-token

    Synthetix debt pool Optimism: https://dune.com/queries/848325/1481031

    Synthetix debt pool Ethereum: https://dune.com/queries/848330/1481037

    Volume

    Synthetix  total volume: ​​ https://dune.com/queries/1910149/3145742

    Total liquidation volume: https://dune.com/queries/562267/1054069

    Users

    Synthetix daily active users: https://dune.com/queries/1920184/3165585

    Fees

    Synthetix total fees: https://dune.com/queries/1893390/3115284

    Liquidation fees: https://dune.com/queries/562254/1054027

    Synthetix L1 fees: https://dune.com/queries/1903285/3133479

    Synthetix L2 fees: https://dune.com/queries/1903756/3134278

    sUSD fees Optimism: https://dune.com/queries/848369/1481090

    sUSD fees Ethereum: https://dune.com/queries/848372/1481094

    Fees token terminal: https://tokenterminal.com/terminal/projects/synthetix#key-metrics

     

    Perps

    Daily perps volume: https://dune.com/queries/1848603/3041535

    Daily perps fees: https://dune.com/queries/1848603/3041537

    Cumulative volume: https://dune.com/queries/1848603/3041536

    Cumulative fees: https://dune.com/queries/1848603/3041538

    Exchange dominance by cumulative volume: https://dune.com/queries/1848603/3041539

    Unique user by exchange: https://dune.com/queries/1893461/3115514

    Perps v2 daily PnL: https://dune.com/queries/2162282/3542476

    PnL closed positions: https://dune.com/queries/848360/1481079

    PnL opened positions: https://dune.com/queries/848364/1481084

    Total PnL cumulative: https://dune.com/queries/2162282/3542497

    Staking

    Staked SNX TVL: https://dune.com/queries/1898719/3125555

    Unique stakers: https://dune.com/queries/1895265/3119548

    Staking debt issued: https://dune.com/queries/1898719/3128575

    L2% staked: https://dune.com/queries/1898719/3132282

    L1% staked: https://dune.com/queries/1898719/3132283

    SNX escrow schedule: https://dune.com/queries/1679207/2779078

    SNX vesting events: https://dune.com/queries/1679358/2780498

    Operating Expenses

    Weekly SNX inflation: https://dune.com/queries/1906342/3139063

    Tokenomics

    Token allocation

    Supply schedule

     

    With the implementation of SIP-2043, $SNX inflation was reduced to zero.

    Inflation was introduced in 2019 to incentivise staking in the recently deployed Synthetix network, following the pivot from Havven. It was critical the staking ratio was high in the early period of the network to scale liquidity. This incentive loop was incredibly effective and led to a multi-year bull market in Synthetix liquidity and network growth. Yet in recent years the effectiveness of this incentive has declined significantly; with inflation now in low single digits it does not meaningfully impact staker behaviour.

    SNX

    The SNX token is used in the platform to incentivize coordination and growth of the ecosystem by serving two primary functions:

    sUSD

    SNX holders can mint sUSD by locking their SNX as collateral in Synthetix’s smart contracts.

    1. The Synthetix contract checks that the SNX staker can mint synths against their SNX, which requires the user’s c-ratio to be below the target c-ratio.
    2. Debt shares are issued to the staker in order to track the issued debt amount when mining/burning sUSD.
    3. With the debt assigned to the staker, the Synthetix contract instructs the sUSD contract to issue the new amount of sUSD that must be added to the total supply and minted to the user’s wallet.

    If the price of SNX increases, an equivalent portion of a staker’s SNX is automatically unlocked as collateral. For instance, if a user locks $100 SNX as collateral, and SNX doubles in price, then half of their SNX is locked and the other half is unlocked. In this scenario, the user can choose to stake the extra unlocked SNX in order to mint more sUSD.

    The launch of V3 will mean the migration of sUSD, with the old v2 sUSD being renamed to sUSDlegacy.

    eSNX

    In Synthetix V3, inflation is provided to a staking rewards contract that awards eSNX based on a user’s participation in a vault. eSNX is an ERC-20 token that can be traded on exchanges and that is burned when it is converted into staked SNX, with a vesting period set by the user. This vesting period influences the exchange rate between eSNX and SNX. Vesting occurs linearly and multiple vesting schedules can be combined into a curve. When staking positions with vesting positions are liquidated, a curve is created or updated, which applies to all staking positions receiving the liquidated collateral.

    Governance

    Synthetix takes a collaborative approach toward governance. The governance structure is composed of Councils, Committees, Core Contributors, and a DAO. Councils are directly elected by SNX stakers, while other governance bodies are appointed according to the existing governance procedures.

     

     

    In July 2020, the Synthetix Foundation transitioned control to the community.

    Anyone can propose a SIP, but the Spartan Council ultimately decides on approval or rejection.

    DAOs and councils

    Community and core contributors

    Elections and voting

    Each user’s staked SNX allocation represents their share of influence over the governance process, where users can apply their voting power to ensure that the protocol is moving in the right direction.

    Prior to voting, it is important for voters to familiarize themselves with those who are prominent and notable members of the ecosystem. To do so, it is recommended to stay up to date on Discord, follow Synthetix discussions, the Synthetix Grants Council, Synthetix Ambassadors, listen to SNXWeave podcast, and read the SNXWeave blog for weekly recaps.

    Every 4 months, SNX stakers can use their voting power by participating in the Synthetix governance module and voting in council member elections.

    You must have SNX staked prior to the snapshot for a particular election, which is done prior to the nomination period. 

    1. A member of the community presents their ideas in the Discord governance channel to gauge community interest.
    2. If the community is receptive, the author will submit a new SIP (Synthetix Improvement Proposal) via Github.
    3. The draft SIP then moves through the process of review by the Spartan Council.
    4. The author is then interviewed by the Spartan Council, which is uploaded for the community to hear. If approved at this stage, the SIP is assigned a core contributor from the Spartan Council to assist with a feasibility study to gauge the impact on the system.
    5. If the feasibility study is successful, the SIP is voted on by the Spartan Council.
    6. If successful, the SIP is implemented by the protocolDAO, which maintains the contracts for the protocol.

    SIP and SCCP submissions

    SIP contributions standard: https://sips.synthetix.io/

    The Synthetix community allows anyone to submit a proposed change to the platform in the form of a SIP (Synthetix Improvement Proposal), even if they are not staking and don’t have the ability to vote.

    Instead of using GitHub directly, the grants council has funded an easy-to-use tool to submit a SIP/SCCP through a web interface, which will then post it for you on the SIP repository.

    Github is a web-based platform used for version control and collaboration. It is used as the backend infrastructure that supports Synthetix’s governance. With Github, users can store and manage their code repositories, collaborate on code with others, and track changes to code over time. As a result, there are a few key concepts that must be understood before submitting a proposal:

     

     

     

    Once a proposal has been polished with the assistance of the community, it will go through the following steps after being submitted:

     

    1. Draft – SIP is a work-in-progress or under review.
    2. Feasibility – SIP has been assigned to a Core Contributor who is working to determine how likely it is to succeed
    3. SC Review Pending – SIP is under formal review by the Spartan Council. 
    4. Vote Pending – SIP is featured on the staking site for community members to vote on
    5. Approved – SIP has passed community governance and is in development, or Rejected – The SIP has failed to reach community consensus
    6. Implemented – the SIP has been deployed and is live on mainnet

     

    For a SIP to be successful, it must include the following sections:

    1. A Preamble, done in RFC 822 style (this is an internet standard syntax for text-based email messages).
      • SIP Number: This will be determined by the SIP editor.
      • Title: A short concise title (maximum of 44 characters).
      • Author: The Author’s name, Username, email address, etc, formatted as follows: “Submitters Name/moniker” <emailaddress@dom.ain> to include email. “Submitter’s Name/moniker” (@username).
      • Discussions-to: <URL to a discussion forum, open GitHub issue, or discord conversation with the greater community>.
      • Status: Start in <Draft> status
      • Created Date: In “yyyy-mm-dd” format, e.g. 2001–08–14.
      • Updated Date: When substantial changes have been made to the SIP during the Draft phase. *Optional.
      • Requires: <SIP number(s)> SIPs that this SIP is dependent on. *Optional
    2. Simple Summary of the proposal avoiding technical details
    3. Abstract – short ~ 200-word description of the SIP that lays out the technical solution being proposed. This describes what will be done if implemented, not why or how it will be done.
    4. Motivation for the SIP. This is the problem statement or the why. 
    5. Specification. This is where technical details can be added.
      • Overview of how the solution will improve a problem that is present in the protocol
      • Rationale behind the design decisions and approach taken to solve the problem. 
      • Technical specification.
      • Test cases are to be applied during the implementation phase. 
    6. Copyright waiver – since all SIPs must be public domain. 
    7. Any files, such as diagrams, tables, etc. that accompany a SIP should be named as follows:
      • SIP-XXX-Y.ext
      • XXX= SIP number
      • Y= serial number starting at 1
      • ext= file extension, such as “.png”

    Security

    Audits

    Synthetix v3 is under audit, however, no reports have been made available. 

    There is also an Immunefi bug bounty program ongoing. Rewards are distributed according to the impact of the vulnerability based on the Immunefi Vulnerability Severity Classification System. This is a simplified 5-level scale, with separate scales for websites/apps and smart contracts/blockchains, encompassing everything from the consequence of exploitation to the privilege required to the likelihood of a successful exploit.

        Dependencies and Access Controls

        A number of aspects of the protocol are still centralized, such as the use of proxy contracts. For better or worse, this centralized control and contract upgradeability makes it possible to alter the system by conferring control to Synthetix’s engineering team.

        Synthetix is also reliant on external providers that, while decentralized, also require some level of trust, such as the Chainlink and Pyth networks. In the past, Synthetix has already suffered from oracle manipulation attacks. In 2019, it suffered an oracle attack that netted the attacker over 37M sETH as a result of an incident in the price feed of sKRW, which was believed to be done automatically by an arbitrage bot and where the attack ended up returning the capital in exchange for a bounty. 

        Liquidity risk

        Debt is issued in the system when SNX holders stake their SNX to mint synths. This debt can fluctuate along with changes in the total debt pool, which means that, in order to exit the system and unlock staked SNX, users might need to burn more synths than they originally minted.

        Team

        Linkedin indicates that there are 33 members in Synthetix.

        Advisors / Investors

        Project Investors

        Additional Information

        Trading Rewards

         

        FAQ

        Staking FAQ

        Synthetix V3 FAQ

        Community Links