We are extremely excited to bring you the USDA/xUSD StableSwap in collaboration with AlexGO !
The fine folks at Alex are bringing us the technology to create a new type of liquidity mechanism, a StableSwap pool. Such a pool is fundamental to the Arkadiko Protocol as it allows for low fee and low slippage swaps between USDA, Arkadiko’s Stablecoin and xUSD, a wrapped version of USDC custodied by Anchorage and issued by Tokensoft. The two stablecoins already exist on the Stacks blockchain but are not directly linked to each other. Thanks to the StableSwap pool, we’ll soon be able to swap between the two stablecoins.
USDA is the only decentralised stablecoin on Stacks and we see it playing a crucial role in Stacks DeFi whenever a stable value component is required. xUSD is great as it can be converted one to one to USDC. This makes it an ideal token to be used in bridges that take your stablecoins to other chains. One of the developments in the pipeline of Alex is the Alex Bridge, which will allow xUSD to be bridged to and from other blockchains!
Let’s dive into the exact nature of stable swaps and see how it’s different from traditional liquidity pools.
What are StableSwaps?
Arkadiko and Alex have both introduced decentralized token swaps through liquidity pools on Stacks. In such a mechanism, users deposit tokens in the liquidity pool in return for Liquidity Pool shares, which can be redeemed back for the underlying assets. While the assets are in the pool, they can be used as liquidity for token swaps. Token swaps change the composition of the pool, which can have a big effect on the price of the tokens in the pool itself. A liquidity pool is a pricing mechanism and a token swap should not change the total value of the pool. Therefore, if a user swaps token x for y, this means that token x declines in price and token y rises in price. As we’ve said, the value needs to remain constant. Mathematically, this can be expressed as x*y = k, called the Uniswap variant as it was first introduced by Uniswap.The total value of all x tokens multiplied by the total value of all y tokens need to remain constant. So taking liquidity away from the pool in token y results in that token appreciating in value by the same amount that token x depreciates. This type of behaviour is great for volatile assets but not so much for assets that are expected to be equal to each other.
Enter the StableSwap.
A big first use case for DeFi were stablecoins. But how do you permissionlessly move from one stablecoin to the other ? Centralized Exchanges might only accept stablecoins like USDC or USDT while decentralized applications prefer decentralized stablecoins like DAI or USDA. StableSwap liquidity pools were created to support this usecase of swapping efficiently between the two tokens. The typical formula to price two assets in a regular liquidity pool is not ideal for assets that are expected to be roughly equal to each other. The idea rose that we can be more relaxed about the composition of the pool. A different type of formula was constructed, pioneered by the curve finance in their StableSwap paper.
Their idea was founded on the premise that when the pool assets are somewhat balanced, we can allow for swaps at a constant price point. By playing with the pool parameters we can set a range for which this balanced property is true. This allows liquidity pools based on the StableSwap invariant to have increased flexibility with regards to the composition of the assets in the pool. But if things get too out of balance, the formula reverts back to larger fluctuations.
Why is this so important for USDA ?
USDA is a dollar-pegged stablecoin. Within the Arkadiko smart contracts when users mint USDA against their assets like STX and xBTC, the price of USDA is always assumed to be equal to 1 USD. But the reality in liquidity pools could be different based on supply and demand for different assets on the Stack blockchain.
We’ve always been as transparent as possible by displaying the USDA price as measured by STX/USDA liquidity pool. But such a pool is volatile and is vulnerable to price fluctuations which also made USDA seem volatile. It was an imperfect way to measure USDA market price. Since there was no way to arbitrage USDA to a lack of off-chain adoption, USDA surfed on the waves of STX as its price went up and down.
We’ll be switching to the StableSwap pool to measure USDA’s price against xUSD. This should mean that USDA can be honestly priced at 1 dollar as long as you can get 1 xUSD for 1 USDA. This remains true for as long as the pool remains relatively balanced. xUSD can be converted through Tokensoft if you are a whitelisted entity. This should technically allow for some more arbitrage opportunities as well. More infrastructure is on the way to allow bridging of xUSD between other blockchains, further increasing liquidity and arbitrage opportunities.
How to participate?
You may ask yourselves what you can do to support these innovations and to profit of their existence.
The USDA/xUSD liquidity pool needs liquidity providers. While the Arkadiko DAO will provide some initial liquidity to get the pool started, we are hoping for your deposits into the pool to give it deeper liquidity and to allow larger swaps to happen. In return you will receive pool tokens that you can stake on Arkadiko for your share of DIKO emissions. That’s right, we’ll be providing rewards for supplying stablecoin liquidity to the StableSwap. A great yield farming opportunity with low theoretical impermanent loss and without exposure to volatile assets.
See you on the swapside !