#App

By Jason Ridgway-Taylor

How does one go from Tez to a stablecoin? If you are considering moving a major amount of Tez to a stablecoin, you might assume it is effortless. However, this task can be complex if you are trying not to move the price. In this article, we will look at one particular instance of transferring a sizable volume of XTZ to USDT and look into the concepts of liquidity and composability, their implications, and how Batcher can help to provide deep liquidity within the Tezos ecosystem.

A Token Trade

The example we will use is one of moving a relatively large amount ($100k) of XTZ into USDT. Having the ability to move in to and out of stablecoins is a prerequisite for a healthy DeFi ecosystem on any chain, and this is undoubtedly also true of Tezos. The key to this post is not whether it is possible; but whether it is possible with a minimal impact on the price of the assets.

Liquidity in the Tezos Ecosystem

One of the most significant considerations when exchanging one token for another in the Tezos ecosystem is liquidity. Liquidity is the term used to describe how quickly an instrument can be sold without negatively impacting its price. The more liquid an instrument is, the quicker it can be sold and the easier it is to sell it for a fair price.  If an instrument is illiquid, it is more likely to trade at a premium.

An ecosystem home to highly liquid assets allows investors to quickly move into and out of projects built in that ecosystem. This makes the ecosystem attractive to a broad range of investors, including institutional and large-ticket investors.

Deep liquidity is a related concept such that when a blockchain has deep liquidity, it means that there is a large pool of buyers and sellers available at any given time, which makes it possible to execute large trades without significantly impacting the market. Deep liquidity is crucial for facilitating substantial trades on Tezos, or any other chain.

When a blockchain lacks deep liquidity, it may be challenging to find buyers or sellers for large trades, leading to significant price fluctuations and delays in the execution of the trade. In contrast, when a blockchain has deep liquidity, traders can execute large trades quickly and with minimal price impact, making it a more attractive option for high-volume traders, institutional investors and market makers.

When looking for (deep) liquidity, there are a few options available: centralized exchanges, decentralized exchanges and Sirius DEX (previously known as Liquidity Baking).

Centralized Exchanges

In general centralized exchanges have more liquidity than their decentralized alternatives, but this isn’t always the case.

Exchange Pair Price +2% Depth -2% Depth 24h Volume
Kraken XTZ/USD $1.16 $200,767 $320,600 $435,439
Coinbase Exchange XTZ/USD $1.16 $188,789 $332,954 $2,338,751
Binance XTZ/USDT $1.16 $220,415 $193,548 $7,045,142
Bitfinex XTZ/USD $1.16 $133,317 $111,343 $355,823
Crypto.com Exchange XTZ/USDT $1.16 $64,650 $70,874 $88,962
KuCoin XTZ/USDT $1.16 $47,704 $56,288 $816,121
Huobi XTZ/USDT $1.16 $13,483 $31,682 $409,491
Bitfinex XTZ/USDT $1.16 $27,918 $28,997 $20,641

The table above is an excerpt (as of 30th Jan 2023) from CoinGekko showing some popular exchanges along with the +/-2% depthmetric [1] for each. This metric illustrates the volume required to shift the asset’s order book by 2% in either trade direction. As seen from this, a trade of $100k would be enough to change the order book by a non-trivial amount and in some cases a very large percentage.

Decentralized Exchanges

On decentralized exchanges, the situation is exacerbated by using liquidity pools. Liquidity pools will maintain the balance between two tokens based on some relationship. These are typically based on constant sum, constant product or, more recently, a stableswap invariant. Regardless of the mechanism, the price impact of a large trade is a function of the following:

  • the size of the trade relative to the size of the liquidity pool
  • the trading (balancing) rule being used

To visualize this, we can look at the impact on a constant product pool based around XTZ / USDT. Assuming a starting price of $1 / 1 tez, the following table shows the effect of a range of large trades on the price given a CPMM pool.

Trade Size (\$) / Liq Pool Size ($ each side) 200,000 500,000 1,000,000 2,000,000
10,000 5.00% 2.00% 1.00% 0.50%
50,000 25.00% 10.00% 5.00% 2.50%
100,000 50.00% 20.00% 10.00% 5.00%

As was the case with CEXs, a large trade relative to the pool size will shift the price a significant amount.

Liquidity Baking

A third option available only on Tezos is a protocol-based liquidity pool (Sirius DEX) designed to improve liquidity in the Tezos ecosystem. Sirius was introduced in the Granada upgrade and supports a single pair XTC / tzBTC. The tzBTC token tracks the value of Bitcoin 1-1 and was chosen to help bring BTC liquidity into the Tezos ecosystem.

The SD (Sirius DEX) mechanism deposits 2.5tez into a CPMM (constant product market maker) contract, which currently balances tez(XTZ) against tzBTC. Currently, this balance stands at ~8.2 million tez for ~390 tzBTC. For our example trade of $100k (~92k tez), this represents just over 1% of the liquidity available.

Sirius would be the preferred option due to its liquidity being underpinned by the protocol itself; however, this only enables us to get to tzBTC. If our goal is to get to a stablecoin, we would need to compose the Sirius DEX pair with another method to move from tzBTC to another stablecoin. In the current ecosystem, we would be constrained to the CEX and DEX liquidity, use a DEX aggregator, or split the trades over time. This is where Batcher comes in.

Batcher

Batcher enables deep liquidity without having a liquidity pool. As long as there is enough volume of buyers and sellers in a given batch, tokens can be traded in large amounts, and the price impact will be bounded to the tolerance levels chosen by the user (+/-10 basis points).

Composability

The entrance of Batcher provides a deep liquidity path from tzBTC to USDT and vice-versa. This ability of Batcher can be composed with Sirius DEX to enable a low friction path from XTZ to USDT


tez -(Sirius DEX)-> tzBTC -(Batcher)-> USDT

Currently, Batcher provides only one token pair, the one designed to be composable with Sirius DEX.

Multiple Token Pools

As part of the final addition before Batcher is launched on mainnet, Marigold will add support for multiple token pairs. The token pairs supported, at launch and in the future, will be designed to further increase the composability of Sirius DEX and help additional low-friction routes from XTZ to other stablecoins.

For the initial mainnet launch, Batcher will support the following token pairs:

  • tzBTC / USDT
  • tzBTC / EURL

The current mainnet supply for each token chosen is summarised here:

Token Total Supply Price ($) TVL ($)
USDT 141,000,001 141,000,001 141,000,001
tzBTC 1,076 22,675 24,402,115
EURL 4,200,000 4,522,560 4,522,560

Conclusion

Batcher is a unique DEX within the Tezos ecosytem which takes advantage of Tezos specific strengths, i.e. Sirius DEX. Marigold is excited to support superior composability by launching Batcher onto mainnet.  Stay tuned for our final mainnet announcement.

1. The +2% depth metric represents the size of the trade required to shift the order book up by 2%. Conversely, the -2% metric represents the size of the trade required to move the orderbook down by 2% ↩︎


Post Script

Why Batcher instead of XTZ/USDT on Liquidity Baking?

In this blog post, we discussed the composability of Batcher with Sirius DEX to provide a highly liquid path from XTZ to stable coins like USDT.  An obvious counter-question might arise: “why not just liquidity bake with XTZ/USDT?”.

The answer to this is primarily bound up in the correlation and volatility of the pair.  Providing liquidity into a CPMM pool is more expensive than on an exchange because of the inherent BPEV (block producer extractable value) in the impermanent loss.

As an illustration, at the time of writing, the 10-day volatility and variance for both pairs are:

Pair 10 day vol Variance
XTZ/USDT 0.0849 0.007208010000
XTZ/BTC 0.00000259 0.000000000007

The more volatile the pair is, the higher the risk of impermanent loss in a CPMM pool.  It is much cheaper to subsidise liquidity for the XTZ/tzBTC pair than for XTC/USDT.  And this is where Batcher comes in.  Batcher works differently.  It is not backed by a liquidity pool, so it does not have the same weakness to volatility that a CPMM pool would have.

When will Batcher be released?

Batcher will be released to mainnet after an external audit of the contract code. Marigold will announce the deployment in a subsequent blog post.

Until the release batcher can be evaluated on Tezos ghostnet.

*Disclaimer:* All investing comes with risk and DeFi is no exception. The following content contains no financial advice.Please do your own thorough research and note that all users funds are traded at their own risk (No reimbursement will be made and Marigold will not assume responsibility for any losses).

If you want to know more about Marigold, please follow us on social media (Twitter, Reddit, Linkedin)!

Scroll to top