Curve finance is a decentralized exchange that facilitates the swapping of crypto-tokens. But it is specifically designed for stablecoins like DAI or USDT with low slippage and low transaction fee while using the liquidity pools like those of Uniswap. Let’s back up a little and first clear the basics.
Let’s say Alice wants to send money to Bob. She can transfer the assets by going to a bank. Here a bank works as a centralized entity and verifies the transfer but cryptocurrencies are known for being decentralized.
In a decentralized environment, Alice can send Bob assets without the need of a central entity, and a set of independent nodes to verify the transfer.
Liquidity is the process where liquidity providers pour in their crypto tokens in a pool and allows others to exchange the tokens. They earn a fee on every swap where slippage is the price change of a token during a transaction.
X * Y = K
Understanding this formula is extremely important as it is widely used in the decentralized exchange world to determine the price of two tokens in a particular pool. The variables x and y in the formula represent the quantities of two tokens and k being the constant.
If the value of one token increases the value of the second token automatically decreases in order to maintain the constant k. However, this formula could be problematic when dealing with stablecoins as the stablecoins should remain constant. Also, while dealing with different flavors of the same tokens, prices have to be the same for each flavor.
What is Curve Finance?
The curve finance is a platform for the exchange of tokens rather particularly famous for stable tokens. Stable tokens are tokens whose value does not fluctuate rather remain stable.
It offers different flavors of similar tokens like ETH and BTC while using a formula called the STABLE-SWAP INVARIANT for swapping.
The flat line in the graph ensures the stable swap of two coins. Uniswap uses the x * y = k formula where one token’s price can grow exponentially and the other token can lose its price and the two tokens could be dollars to pennies. Curve introduced the Stable-swap invariant in which both the tokens tend to remain stable.
Let’s understand this with the help of an example:
Suppose, Uniswap pool has a pair of USDT/DAI, both of which are of $1 with a proportion of 50/50. After some swapping the pool becomes unstable now with a proportion of 60/40. Now we have an excess of USDT and a scarcity of DAI. So, the price of USDT will become slightly less than 1$ (0.97$) and DAI will become slightly more expensive than 1$ (1.03$) and the pool becomes lopsided. Here, Curve will incentivize the liquidity providers to pour in DAI thus making the pool stable. The formula handling this is known as the Stable-Swap Invariant.
This is what the Stable-Swap Invariant looks like:
Stablecoins have become an integral part of De-fi with more and more varieties of stablecoins in the market. Which means that there is a bigger space for people trading stablecoins. The curve has captured the market and emerged to become a giant by offering low fees and slippage at the same time. Stablecoins on other exchanges might deviate from their price whereas Curve ensures stability, which is one of the many reasons behind Curve’s success.
Learn about Nexus Mutual, a DeFi Project.
Liquidity On Curve
Liquidity providers can earn rewards by providing liquidity in Curve pools just like Uniswap. Additionally, there is another way liquidity providers can earn extra rewards; by the concept of lending. Curve finance offers lending pools where liquidity providers can lend tokens to other exchanges like Compound. This takes place in the background and liquidity providers earn fees on top of the transaction fee, as some protocols enable lending and borrowing functionality to the users.
It’s important to note that the rewards are based on the transaction volume; they can be high or low.
You might be wondering about the security risks that might occur while lending a token to another exchange. Curve solves this issue by wrapping the token as a cToken(wrapped token) and lending it to Compound while backing the cToken to the original token.
With Curve, we can have a pool of three or four tokens as well.
Once you deposit the tokens in, you can split it among all the tokens in the pool or you can add just one token. After adding tokens to the pool you will get LP tokens. These LP tokens represent your share in the pool which can be used to stake and mine new CRV tokens.
The 3Pool is a pool with 3 tokens DAI, USDC and USDT, it does not matter in what token the user adds the liquidity as the reward generated is the same. You can get the LP tokens in all the tokens or in a single token.
A metapool is a pool where a stablecoin is paired against an LP token from another pool. For example, a liquidity provider can deposit DAI into 3Pool and earn pools liquidity token 3CRV.
CRV is Curve’s native token, which is generated when the user deposits and stakes the tokens on the Curve platform. It is awarded to liquidity providers, proportional to their share from the yields created by their pools. With Curve’s transition to become a DAO, CRV tokens also represent the holders’ rights to take part in its governance mechanism. That way they can make proposals and vote on them with CRV. Their Governance follows a ‘time-weighted’ voting system which simply means that the longer they hold CRVs, the greater their voting power in the DAO becomes.
Curve’s smart contract is audited by Trail of Bits but this doesn’t eliminate risks completely. Curve lends tokens to other exchanges and hence opens up another front to security risks. Curve finance is in the market for around a year and needless to say that hackers for sure have tried their unsuccessful attempts to steal the funds.
Here’s a link to Curve-fi: https://curve.fi/
“Curve is an exchange expressly designed for stablecoins and Bitcoin tokens on Ethereum”
– Michael Egorov (Founder and CEO of Curve)
Also read, Uniswap v3: Power To Liquidity Providers.