Low Slippage Trades Across Pools via Virtual Swap
5 min read

Low Slippage Trades Across Pools via Virtual Swap

Low Slippage Trades Across Pools via Virtual Swap
A guide for low slippage trades across Saddle BTC, ETH, and USD pools via Virtual Swap

Virtual Swaps are the latest addition to Saddle. In this article, we will cover all you need to know about Virtual Swaps using Synthetix’s synths. Saddle up for your Virtual Swap ride!

Bridging liquidity pools with Synths

Synths provide a way to trade across pools with low slippage. For example, to bridge USD, ETH, and BTC pools, synths can act as the common asset. We can exchange the synths with infinite liquidity, allowing them to act as a liquid bridge between any pool that contains sUSD, sBTC, or sETH-- This can support VERY large trades, up to the size of the Synthetix global debt pool (which is ~$1B as of writing).

The virtual swap smart contracts have been audited by Quantstamp, read the full audit here.

Note that Synthetix’s fee reclamation and rebate mechanism introduces a waiting period to mitigate front-running of oracle price updates for a Synth <> Synth exchange. This breaks up the swap into 2 transactions (with a waiting period in between), like such:

  • Step 1 (transaction 1): USDC -> sUSD (rate set by the AMM)
  • Step 2 (transaction 1): sUSD -> sBTC (rate set by Chainlink Oracle)
  • Step 3 (transaction 2): sBTC -> WBTC (rate set by the AMM)

Note that this trade cannot be done atomically (due to fee reclamation).

Saddle synth pools

Saddle currently supports sBTC, sETH, and sUSD synths via three liquidity pools. This enables Virtual Swap between any assets in any of these pools.

BTC Pools (v1 and v2)

Graphical user interface, text, application, chat or text message

Description automatically generated

alETH Pool

Graphical user interface, application

Description automatically generated

sUSD Metapool

Graphical user interface, text, application, chat or text message

Description automatically generated

How to swap using virtual swap

Watch this 2-part tutorial to learn how to swap from WETH to WBTC as an example:

  • On the swap page, when selecting your “From” currency, you’ll see that some options have the green “Virtual Swap” tag
  • After you’ve made your swap From/To selections, “Route” will show you the path your transaction takes. (Ex: WETH -> sETH -> sBTC -> WBTC)
  • Note that a warning will be shown that if your Max Slippage is set to less than 0.5%, your transaction may fail. So you’ll want to set your Max Slippage (in Advanced Options) to at least 0.5%. (The max slippage needs to be higher because of the waiting period, during which there may be price fluctuations)
  • Once the first part of your transaction completes, you will see a clickable Virtual Swap status bubble appear toward the bottom of the page. There’ll be a waiting period (currently 6 minutes, as per latest Synthetix SIP) before you’ll be able to settle/withdraw.

  • Once the waiting period is over, you’ll be able to withdraw your Synthetix asset (Ex: sBTC) or settle it for your target asset (Ex: wBTC. Most users will want to settle).
  • Once you do either of these, your balance will update and the new transaction will be added to the timeline in your Virtual Swap status bubble.

SYNTHETIX ASSETS

Synthetix is a protocol for issuing and trading synthetic assets on the Ethereum blockchain. Synths are ERC-20 tokens, providing exposure to a range of assets. Each synth tracks the price of an external asset (fiat currency, cryptocurrency, commodities, etc). For example:

  • sBTC synth tracks the price of Bitcoin (BTC) through price feeds supplied by an oracle.
  • sUSD synth tracks the price of a single US Dollar (USD). This synth is always valued at $1 in the debt repayment mechanism of Synthetix.
  • sCHF tracks the price of the Swiss Franc (CHF) through price feeds supplied by an oracle.

Synths provide exposure to an asset (at a clear price) without holding the asset. With synths, traders can get exposure to assets which don’t exist on-chain.

How do synths work?

Synths differ from asset backed cryptocurrencies like stablecoins. For instance, US Dollars back DAI stablecoin. If you own 1 DAI, then in a way you own US$ 1. But owning sBTC synth doesn’t mean you own the equivalent Bitcoin. Rather, the owner only has the exposure to the BTC price.

Synthetix works on an over-collateralization model; each synth is collateralized by more value than it represents to absorb any sharp price changes. The native token of Synthetix is used for collateral. Synthetix is a multi-token protocol:

Collateral: SNX, the native token of Synthetix, is a primary collateral backing mechanism. The community governance determines the collateralization ratio for synths. Trial with ETH as a collateral have been completed and further trials are planned.

Synthetic assets: Synths are the ERC-20 tokens that mirror the price of any asset with a given price oracle.

When traders stake SNX to mint sUSD, the trader takes on debt, reflecting the amount of synth that must be burned to un-stake the SNX. The SNX token acts as the trading counterparty for all synths and the synth as the debt.

Smart contracts manage the entire transaction in Synthetix, eliminating the need for counterparties. The stakers act as pooled counterparties mitigating the counterparty risks.

Synthetix supports instant and seamless conversion between different flavours of synths. Pooling ensures there is sufficient liquidity for trading across various assets. This reduces the slippage and liquidity challenges faced by many cryptocurrency exchanges.

Solving the front-running challenge

While synths are great, they came with a limitation: Front-running. Many DEXs suffer from front-running.

When traders are trading with synths, the traders are simply swapping debt from one form to another at the current market price on-chain. For example, the traders are not swapping ETH to USD, but traders are swapping sETH to sUSD, where the on-chain oracles are providing the price information for the derivative tokens.

Because of constraints on Ethereum, there is a latency and cost in sourcing and updating the real-world asset price for the synths. Front-runners can see the difference between price of the asset in the real-world and on-chain. They see an arbitrage opportunity and over-pay for Ethereum gas fee to prioritize their orders in the queue, before the on-chain price reflects the real-world.

Synthetix, to overcome the front-running challenge, introduced a waiting period before a trader gets the underlying asset. During this waiting period, traders cannot exchange, transfer, or burn the synth they have just traded into. The waiting period also gives room for the oracle to check the price difference (if any).

Once the waiting period expires, the difference between the price at the beginning and end of the waiting period is calculated. If there is a difference in price, then the difference is reclaimed (updated price higher than executed price) or given as a rebate (updated price lower than executed price).

It’s important to note that in addressing the front-running issue via rebate and reclamation, Virtual Swap does require a second transaction to settle the exchange (breaking atomicity). Despite this, synths still offer an attractive means for reducing fees and slippage when trading between pools of different assets.    


The Saddle team has V2 virtual swaps on the roadmap, which will support atomic settlement. This will eliminate the time for users to retrieve funds, allowing seamless integration with aggregators, and lower transaction costs.

Follow us, if you haven’t already, for the latest updates:

BLOG

DISCORD

TWITTER

GITHUB

TELEGRAM


Visit and Trade on Saddle:

Saddle Main Website

Saddle Exchange