Intro to StableVault

StableVault is an automated market maker (AMM) that allows you to exchange Stablecoins and other pegged crypto assets with low fees and low slippage (ex: trading USDT to DAI).

It works similarly to a decentralized exchange like Uniswap v2 by using liquidity pools. In other words, some users provide liquidity and others conduct transactions. Users who provide liquidity get a cut of the transaction fees.

A big difference between our pools is that you can have more than two pairs, ex: USDT, BUSD, and DAI. Since all three of these assets are pegged to the same value (1 USD), they can be pooled together easily.

How does StableVault work?

When you add liquidity to a StableVault liquidity pool, you add the tokens required for that pool. For example, let’s say you wanted to create a pool of DAI, BUSD, and USDT where 1 DAI = 1 BUSD = 1USDT. You could deposit 1,000 of each token into that pool (1,000 DAI; 1,000 BUSD; 1,000 USDT).

If someone came along and wanted to exchange 100 DAI for 100 USDT, they could trade with the liquidity pool. After they traded, the pool would have 1,100 DAI; 1,000 BUSD; and only 900 USDT. To keep the pools balanced, any new trader would pay a premium to swap their DAI for USDT and would receive a discount for swapping their USDT to DAI.

In the end, arbitrage opportunities incentivize traders to bring the prices of the stable assets in the pool to equilibrium.

Depositing into StableVault

When you deposit a token into a StableVault liquidity pool, that token is split between each token in the pool based on their weights. This means that unlike a liquidity pool on Uniswap where you need to add both tokens, you only need to deposit one of the tokens in a StableVault pool.

For example, if you deposited 100 DAI into a pool with 200 DAI, 100 BUSD, and 700 USDT, then you would receive an sToken representing 20 DAI, 10 BUSD, and 70 USDT. sTokens represent your stake in the pool and constantly change as people trade and the token amounts in the pool change.

Deposit & Withdrawal Bonus

If you deposit a token into a pool where your token is low in supply, you will receive a deposit bonus. Let’s say you wanted to deposit into the DAI, BUSD, and USDT pool and the current token amounts in the pool were 700 DAI, 1,300 BUSD, and 1,300 USDT. Since there is a shortage of DAI in this pool, you would be rewarded a small bonus for depositing DAI. Depositing BUSD or USDT into the pool would cost a slight premium since it would further imbalance the pool.

Similarly, if you withdrew your funds you would receive a discount or pay a premium depending on the token you withdrew. In the above example, you would be rewarded for withdrawing in BUSD or USDT and penalized for withdrawing in DAI.

Why not use another exchange to trade Stablecoins?

Most decentralized exchanges are modeled after Uniswap's version 2 design. They are excellent models for swapping most cryptocurrencies; however, they are not great for Stablecoins or other value pegged assets. The reason is because the model they use allows for lots of slippage, or price variance, when trading.

If a Stablecoin pool undergoes a large transaction in this common model, then two coins may be taken off peg. One may trade slightly lower than $1, perhaps around $0.95, while the other may trade slightly higher, perhaps at $1.05. With StableVault these coins would still be relatively close to their $1 peg, perhaps closer to $0.99 and $1.01.