What is Curve Finance and how does it work?
Curve Finance is a decentralized exchange (DEX), that allows users to swap between stablecoins with minimal slippage. The protocol is based on the constant product market maker formula, a major innovation brought by Uniswap.
Decentralized exchanges such as Uniswap are great for trading assets with fluctuating price, but do not work well for pairs of stablecoins. The main issue is the price discovery mechanism of the constant product market maker model (CPMM) used by Uniswap and similar DEXes. This inherited design flaw may go unnoticed for trades where the price of at least one of the tokens is fluctuating (e.g. when buying ETH for USDC). However, when trading two coins with a similar price (e.g. USDC for USDT or ETH for sETH), it is much more annoying as it leads to bigger price difference between assets that should be priced 1:1. Let’s see how Curve optimizes this price discovery mechanism for stablecoins.
In the regular CPMM model, the total amount of coins in the liquidity pool is determined by the formula x*y=k, where x is the amount of token A (e.g. ETH), y is the amount of a token B (e.g. USDC), and k is constant. Since k is constant, to withdraw ETH from the pool, the user must deposit USDC in the amount determined as total ETH/total USD. Each ETH withdrawn will reduce the supply of ETH in the pool and increase the supply of USDC, thus driving up the price of ETH. This process can be represented by the following function, with the asset price shown as a point on this function.
As seen above, the price of two assets in the Uniswap model (purple dashed line) is more sensitive to changes in the pools’ reserves, resulting in a more curved invariant.
On the other hand, in the pool where the price changes evenly (the withdrawal of token A changes the price of token B by the same amount), the function is linear. As such, in this model, the sum of the prices of both assets is always constant.
Curve's innovative approach combines the best of both worlds by implementing the constant product and constant sum models in a way that the function is linear when the supply of coins is balanced but becomes more curved when there is a greater difference between the reserves. Thanks to this elegant solution, the protocol can offer better prices for trades between stable assets.
Tokenomics and governance
Curve attracts more trades by maintaining liquidity pools in balance and thus offering better swap prices. In turn, this earns more fees for the protocol, which are then distributed to liquidity providers in the form of the CRV token.
The CRV token is used to reward liquidity providers, share the revenue with the token holders, and to govern the protocol. The total token distribution is following:
While this is the release schedule:
Although initially aggressive, the issuance of CRV slows significantly over time. Additionally, the governance mechanism incentivizes holders to lock the CRV token for a period of up to four years, which significantly reduces selling pressure. Currently, the average lock time is 3.53 years. Upon locking the CRV tokens user gets vote escrow tokens or veCRV. The longer the locking period, the more ve tokens the user gets at the end of the lock period (the boost can get up to 250% in the case of the 4-year lock).
The CRV token is a reward for providing liquidity to the Curve pools. Every week, the holders of the veCRV tokens decide which pool receives the daily token emissions and how much of the emissions it receives (known as gauge weights).
Enter Curve Wars
The liquidity of a token is extremely important for the protocol issuing it. If there is deep liquidity, users can easily exchange the token without slippage. Additionally, it reduces the price impact of whales dumping their bags.
The governance and reward system of the Curve protocol incentivizes other protocols to accumulate CRV tokens, lock them into veCRV, and direct the rewards to their own pools. This make it worth for the protocols to convince liquidity providers to direct their tokens into the pools offering the most attractive yields.
The Curve Wars began when a few well-known protocols competed for the largest share of the veCRV market. The winner of the wars was Convex, a protocol originally designed to live in symbiosis with the Curve ecosystem.
Liquidity providers earn CRV tokens for providing liquidity to the pools in the Curve protocol. The yield on their LP positions depends on, among other things, the amount of veCRV tokens they own, as shown below. Individual holdings would have an insignificant impact, but what if you pool the scattered resources?
The Convex protocol enables users to collect CRV tokens from their holders, put them in the Curve LPs, and then share the rewards among the investors. In addition, the investors also receive the Convex CVX token as a reward. Through this clever incentive structure, Convex won the Curve wars and currently controls whopping 53% of the total veCVR supply.
The story here just keeps getting more complicated. For every CRV locked into the protocol, Convex gives the investors cvxCRV tokens. These tokens can be exchanged freely, so Convex provides a way to get the benefits of locked CVR in a liquid form. Another advantage of holding cvxCRV is that you can set gauge weights in the Curve liquidity pools.
Let’s recap how we got to this point:
The investor deposits CRV tokens into Convex and receives liquid cvxCRV in exchange
Convex locks pooled CRV tokens into Curve and directs future CRV emissions to the Curve liquidity pools of its choice through a Curve DAO vote
The vote is made through Convex DAO by cvxCRV holders
Now, if a protocol wants to direct CRV emissions to their pools, instead of buying the CRV tokens, the protocol can load onto the cvxCRV and rule the gauge weights in Curve! Or does it have to? Maybe a little bribe here and there would be good enough?
Bribery
In the world of DeFi, even bribes are public. There's no need to panic, everything is alright.
This is where Votium comes in. Votium allows protocols that are interested in increasing the liquidity of their tokens (which is why the complex machinery described in this article was put in place, in case you forgot) to bribe CVX holders to direct the Curve emissions to their pools.
The whole idea is based on a simple incentive - it is cheaper to buy a vote with CVX tokens than it is to become a CVX holder. For the last couple of months, one CVX vote has cost between $0.05 and $0.09, while one CVX token, at the time of writing, buys around 5.7 votes and costs $3.9. That’s a 10x difference! What’s more, by staking CVX tokens, you receive further rewards from the Convex protocol at around 3%, and another 27% from the bribes on Votium (if you vote or delegate your votes there).
These are the Cruve Wars, won by Convex, fueled by the Votium bribes.
Personal take
Curve Finance is a masterpiece of crypto innovation and the protocol governance. The design of the rewards, sustainable tokenomics and innovative stableswap feature make it clear why Curve is and will remain one of the top DeFi protocols for a long time.
The decentralized finance revolution began a few years ago and flourished in 2020 during DeFi Summer. It's only a matter of time before it becomes mainstream.
I’m here for the journey and will write about other protocols that bring innovation and move the industry forward, so stay tuned!