The hangover from the Rave Testnet is not yet over, and Dexter is back at building new things at its base, preparing for the launch.
The goal for Dexter is to facilitate efficient trading for yield-generating assets.
These assets represent a share of a pool of assets and grow in value over time as they accrue the yield on the underlying assets, like liquid-staked assets.
The Stableswap Invariant works perfectly for pegged assets like stablecoins but not for assets like liquid-staked assets, which are not pegged but highly correlated to the underlying staked assets.
Inspired by Balancer, Dexter has implemented Metastable pools, which make trading for yield-generating assets more efficient by quoting accurate prices using the current exchange rates of these assets.
Let’s dive into the blueprints.
The Stableswap is an optimized AMM for pegged assets such as stablecoins and tends to keep the liquidity tied around a ratio of 1:1, facilitating low slippage trades between these assets.
Constant product AMMs are helpful for price discovery since moving on the curve in either direction will affect the price of each asset. However, this curve is less efficient for trading closely pegged assets, which should theoretically trade without affecting each other’s price.
The constant sum pool (X + Y = K) has no slippage but can run out of liquidity when the pool is imbalanced on one side. The constant product pool (X*Y=K) has slippage but can always maintain liquidity since the price of an asset increases with the demand.
Stableswap combines the constant product and constant sum functions to achieve minimum slippage and provide a balanced pool. This function acts as a constant sum when the pool is balanced, providing low slippage trades, and shifts towards a constant product as the pool becomes more imbalanced to ensure the pool never runs out of liquidity.
But this is not ideal for highly correlated assets such as liquid-staked assets. These assets can be attractive for LPs due to being capital-efficient, as they can earn both swap fees and the yield generated on these assets.
The Stableswap does not consider the constantly changing exchange rate for yield-generating assets and assumes a 1:1 ratio between the tokens. For example, the pool assumes the price of 1 stkATOM = 1 ATOM; as the value of stkATOM in terms of ATOM grows, arbitrage traders can use this incorrect ratio to leach out the yield from the pool while LPs suffer from impermanent loss.
Dexter has come up with a solution to this problem.
Enter the Metastable pool.
A metastable pool is more suited for assets that follow an exchange rate with a base asset, like liquid-staked assets such as stkATOM and interest-bearing tokens from lending protocols such as cDAI.
For example, stkATOM would keep accruing yield in the form of staking rewards in ATOM and would be worth 1.01 ATOM, 1.02 ATOM, and so on.
Metastable pools use stable math along with the known exchange rate for the asset. The metastable pool can take this constantly changing exchange rate into account and hence concentrate the liquidity around the price by changing the slope of the flat part (the price of an asset is the slope of the curve at any point) of the curve, making it capital efficient for LPs and trades more precise.
This kind of pool was first introduced by Balancer in collaboration with LIDO finance for the stETH — ETH Pools.
Dexter’s implementation uses a “Scaling Factor” to take the exchange rate into account.
The Scaling Factor
The scaling factor is a variable that factors in the known exchange rate for a yield-generating asset.
The stableswap concentrates the liquidity around the flat region of the curve at a 1:1 ratio between the assets. The curve behaves approximately like a constant sum AMM in this range, X + Y = K.
The scaling factor changes the slope of this line and hence the ratio between the assets to, let’s say, a:b, a and b are the scaling factors, and the ratio a : b is based on the exchange rate between the assets.
And the equation works something like this, aX + bY = K.
The scaling factor is constantly updated, thus changing the curve's slope and the asset's relative price.
Metastable pools enable more capital-efficient liquidity provision for yield-generating assets by offering a precise exchange rate for trading.
Efficient trading for these assets will increase the adoption of liquid staking. By supporting assets from all liquid staking zones in the Cosmos, Dexter will be the liquidity hub for liquid-staked assets.
Metastable pools will be live at launch (look out for the stkATOM-ATOM pool 👀)
Dexter continues on its mission to make an efficient DEX for yield-generating assets. Stay tuned for the upcoming mainnet launch scheduled for next week 🚀