[Company Watch] Curve’s Formula for Stablecoins Swap and the Magic Amplification Coefficient
We have earlier summarised what is Curve, a rather superficial coverage of the largest defi platform by TVL (Total Value Locked) today. As of today, we are still of the opinion that Curve is the best defi platform and has tremendous potential in the future.
This article explains a bit of the mechanism of Curve. In plain words, how Curve decides on the relative price of the stablecoins in any pool.
Curve, to start with, is an automatic market maker like Uniswap or Balancer. It can use a constant product formula like Uniswap, xy=constant. In addition, Curve provides trading for tokens of roughly similar value, e.g. a variety of stablecoins that should all equal to US$1 or EUR 1; or ETH and its synthetic version or 2.0 staking version. Therefore, it can also choose to use a constant sum formula like mStable, x+y+z=constant.
Both ways are elegant enough. But neither is ideal.
For constant sum, the pool will end up with the cheapest stablecoin, as you can always trade 1:1 between any stablecoin. So there’s no balancing mechanism here, and thus the platform have to be very selective of what coins to put into the pool. To a certain extent, there’s limited choice of really stable stablecoins; and that restricts the scale and diversity of the platform.
For constant product, when one token depreciates (e.g. one stablecoin unpegs US$1 in another exchange), the constant product pool will be very punitive in terms of slippage, making transactions very costly. In other words, when a stablecoin unpegs, users will trade elsewhere, e.g. in Binance or mStable, than a constant product pool like Uniswap.
Neither case is good, so Curve has found a middle way: Curve’s equilibrium, let’s call it Curve constant, is constant sum x A + constant product.
The above is the formula in the whitepaper. If we ignore the mathematics thinking behind it and take XDn-1 as A, then it’s simply “constant sum x A + constant product”. A is the arbitrary number assigned to each pool by the Curve team, to decide on the weight of constant sum and constant product in determining the relative prices of stablecoins in a pool. This A is called Amplification Coefficient.
The beauty of this design is that it strikes a balance between stability and diversity, at the choice of the manager. If the manager thinks that the stablecoins in one pool are unlikely to unpeg at all, they can decide a huge A. (Of course, after the DAO votes yes.) A huge, or even infinite A, makes the Curve pool just like mStable, where you can swap any stablecoin inside just at 1:1. For example, the USDT pool (for Compound USDT, USDC and DAI) will have an A of 2000.
On the other hand, the flexibility of setting a relatively small A also allows Curve to accept relative new and experimental stablecoins. When A is small or A=0, the Curve pool functions like Uniswap. (Mathematically, when A=0, Curve Constant = constant product).
Graphically, as Curve’s whitepaper presents, Curve’s bonding curve compared to those of Uniswap and mStable looks like this:
And A, the Amplification Coefficient decides how “curved” the line is, the higher the A, the less curved the line is and the less the relative price movement impact. Deciding the appropriate A is not just a matter of democracy of let the voters choose — it’s a process of choosing the right stablecoin (and business partner) and educate the community, and watch out the experiment results.
Back to our view on Curve as an investment (whether as a way to make mining and trading fee yield, or invest in CRV), we find the design of Curve unique and hard to copy, as it’s not purely smart contract, but also depending on an experience management team and educated community to decide the A for each pool. Its fees are unparalleled even by CEX. And AMM is clearly a game of scale. As the variety of stablecoins, ETH and BTC derivatives proliferates, or as Curve moves to the other chains like Polkadot, the number of Curve pools, TVL, volume and fees income will be many time more than what it is today.
(Serenity Team, 17 Feb 2021, Twitter: https://twitter.com/SerenityFund)