What is Curve Finance: 13 points you need to fully get to grips with the famous stablecoin exchange

In this article I will introduce you to Curve Finance. Curve Finance is one of the foundational protocols of DeFi. It has almost $4Bn in total value locked and is the 6th largest DeFi protocol by that measure. I find it’s simplicity extremely exciting and hope you will too. In this article I will explain in 13 points what Curve Finance is, how it works, what the big deal is and how you can use the protocol’s website.

Ready? Down another rabbit hole we go.

what is curve finance
Curve logo

1. Crypto concepts you need to know before learning about Curve Finance

To explain Curve, I am going to assume you understand core DeFi protocols such as lending and borrowing, decentralized exchanges, AMMs, liquidity pools, slippage, impermanent loss and stablecoins.

Take a look below.

Curve Finance concepts
Concepts you need to conquer before tackling Curve Finance

If you only have a vague idea of what I am talking about then you need to do some homework first. I recommend you read the following:

At a very minimum read the article on Uniswap if your memory of these concepts is flaky.

OK, let’s do this.

All good products come from founders who were scratching their own itch. Let me tell you a story.

2. How Curve Finance came about

The year is 2005. Michael Egorov, a Russian high school student, is admitted to study Applied Mathematics and Physics at the Moscow Institute of Physics and Technology. We’re talking top notch education.

He then decides he wants some adventure and moves to Australia to do a Phd in Physics and ends up as a postdoc at Melbourne’s Monash University.

The year is now 2013. Bitcoin has been around for 5 years and scientists like Michael Egorov are prime candidates to take an interest in this new technology.

And indeed bitcoin hooks Michael’s attention. In fact, by now Michael is working in California’s Bay area and using bitcoin to send money back home so as to avoid the high fees and delays offered through the traditional banking system.

In 2016, Michael joins Y-Combinator’s start-up accelerator and founds a company focused on encrypting data infrastructure.

By now Michael is fully into crypto. He is taking out loans on MakerDAO, earning a yield on Compound and swapping tokens on Uniswap. He frequently finds himself swapping between DAI and USDC in order to get cash out through centralized exchanges. And there he is trying to swap between stablecoins when the thought strikes him.

Michael Egorov
Michael Egorov’s aha moment.

So the dude codes up an algorithm in Vyper and puts it out there. He calls it StableSwap and later changes the name to Curve Finance.

Which neatly brings us to our definition.

3. What is Curve Finance?

Curve Finance is a decentralized exchange where it is extremely cheap to trade one stablecoin with another. In fact, you can trade any two assets of the same denomination. So, for example, you could trade wETH with stETH, or different versions of BTC and so on.

Originally built on Ethereum, Curve is now available across chains.

Curve finance TVL
Curve is available across chains.

So why did Egorov not like Uniswap and why did he think there ought to be a better way?

4. The dawn of decentralized exchanges

Consider traditional centralized exchanges.

What about them?

Centralized exchanges use order books to match trades. This is an ancient concept from when people used to write on paper (remember those days?).

An order book is just the same process digitized. It requires a multitude of trades on one side to be matched with many traders with an opposing view on the other side.

An order book
An order book

Centralized exchanges do this quite well. But on blockchains it doesn’t work. Each order needs to go on chain and interacting with the blockchain costs in transaction fees. EtherDelta was the first blockchain to try this and it didn’t really work out for them.

Enter Bancor and Uniswap. These decentralized exchanges entered the market with an alternative model that used bonding curves.

5. Ermm what is a bonding curve?

A bonding curve is fancy language for “formula to decide on prices”.

Imagine its 1493 and you have just come back from America on Christopher Columbus’s boat. Amongst your few belongings you have brought a souvenir from the New World. It’s a vegetable the locals called a batata. You call it a patata and plant it in your garden to try and sell it.

potato travels to europe
The first potato

The first time you go to the market few people are willing to try it.

So you sell your potato at a very low price. Say you sell it for 1 peso.

The guy who bought your potato finds it tasty. He tells his friend who comes to your stall the next day.

You sell the second potato at 2 pesos. The word spreads.

You now have a rule. For every incremental potato you produce you will increment the price by 1 peso.

At any point in time buyers can return their potato to you and you give them pesos back at the prevailing price.

Say price has reached 100 pesos. The original person who bought your potato at 1 peso can return his potato in exchange for 100 pesos netting himself a neat profit of 99 pesos.

When he returns his potato you throw it in the fire (you burn it). Hey, its your potato and you make up the rules.

If I were to plot this relationship I would get a straight line. That straight line is called a bonding curve.

They say bonding because it’s like you have bonded i.e. stored your pesos with me in exchange for potatoes.

And, yeah, a straight line in math is technically a curve with 0 curvature.

a bonding curve
The potato bonding curve

Fast forward to today

You have just discovered the “new world” of crypto and plan to introduce a token called TATO in honor of those early pioneers.

You have two options here.

  1. You either declare a token generation event and sell all your tokens in one go OR
  2. You define a bonding curve and sell each token at prices defined by the formula for that curve.

The benefit of doing it the second way is that people who buy early get the token cheaper. Then as the token becomes more and more popular you can hike up the price based on a pre-defined formula as you print more tokens.

The bonding curve does not have to be a pure line. It can be defined by any formula.

Here are some examples of bonding curves. I’ll show you more further down as well.

bonding curve examples
Bonding curve examples

I don’t want us to get too bogged down in all the possible types of bonding curves though.

Instead, let’s focus on a specific type of bonding curve called an AMM.

6. Enter AMMs

When it comes to currencies whether you say price or quantity it is the same thing. You can say 2 dollars and it means price = 2 dollars or quantity=2 dollars.

Automatic Market Makers are bonding curves with the price of one token on the y-axis and the price of the other token on the x-axis.

7. What’s so special about Curve Finance?

Now, what is special about Curve is that Michael took Uniswap’s AMM and altered it in a way that was far more superior to what Uniswap offered at the time.

Uniswap has since adapted its model and so has Curve whose version 2 now allows you to exchange any assets. But I am getting ahead of myself.

So how is Curve different to Uniswap?

The best way to understand this is to look at an example. Uniswap uses a constant product function where x*y=constant. X is the price of one currency and y is the price of the other.

So, for example, say I have 5 DAI and 5 USDT in the liquidity pool then the formula us 5*5=25.

Now this relationship needs to remain the same. So let’s say you give 1 DAI to get USDT. How much USDT can you take?

6*new amount of USDT = 25.

So new amount of USDT = 25/6 = 4.16.

Hence, you can get 5-4.16 = 0.84 USDT.

Oh man! This doesn’t look good at all.

What if we used a different formula. Say the formula was x+y=constant.

Then we would have 5+5 = 10. And if I added 1 DAI I would get 6+new amount = 10.

So new amount = 10-6 = 4.

Hence, I would get 5-4 = 1 USDT.

So it seems that the second formula results in a way better deal.

Now, let me show you something else. Say our liquidity increases to 200 DAI and 200 USDT. Then if you used the first formula, the constant product one, you would have:

200*200 = 40,000. And if you add 1 DAI you have

40,000/201 = 199.004.

So you can get 200-199.004 = 1 USDT.

So the constant product formula works but you need way more liquidity. In this example you need about 40 times the liquidity that the simple constant price formula offers.

How Curve concentrates Liquidity

Another way to think of this is that Uniswap does not assume what the price of the asset will be. It spreads its liquidity from 0 to infinity.

But stablecoins usually only require liquidity within 1% of the price being $1.

graph of curve AMM vs Uniswap AMM
Curve Finance’s formula as depicted in the whitepaper

In the graph above note how Curve focuses most of the liquidity near the price of 1. Near the price of 1 its line aligns with the constant price formula. Unlike Uniswap it does not spread liquidity across infinite prices.

Now, if you are super math savvy you will have realized that the slope of the curve is it’s price. The x+y=constant formula is called the constant price formula because the slope is always 1.

But Egorov did not want the price to always be 1.

He wanted it to be 1 close to the center where most of the trading would happen but he wanted to support multiple prices if you moved away from the center.

So he made up a formula that combines the best of both worlds.

ok enough math for now. I am not going to go into the actual formula Egorov used because I think you have got the main picture by now.

Egorov comes up with his formula
Egorov comes up with his formula

So from a trader’s perspective all is rosy. You are getting a way better exchange rate than on Uniswap.

What about liquidity providers? Let’s explore how things work out for them.

8. Curve yield farming

Curve offers liquidity providers 4 types of rewards:

  1. Fees that traders pay in order to transact. Every time they place a trade, traders pay 0.04%. Also they pay 0.02% whenever they withdraw or deposit. These fees get distributed to liquidity providers in proportion to the amount of liquidity they have provided.
  2. Some pools earn interest by providing their liquidity to lending protocols like Compound.
  3. Some pools reward you in extra tokens. For example, Synthetix is a protocol that has its own stablecoin called sUSD. In order to incentivize liquidity for their stablecoin they reward you with their SNX token.
  4. Finally, all pools are rewarded with Curve’s governance token called CRV. And the longer you lock your CRV on the platform the more you get in rewards. I’ll tell you more about this later

Let’s take a look at Curve’s interface.

9. A walk through Curve Finance’s interface.

As an example, I’ve expanded the susd pool in the screenshot below to see what goodies it offers.

Given today’s trading activity the annual percentage yield is 1.23%. This yield might be different tomorrow depending on how much trading activity there is.

You can also earn between 0.95% and 2.37% CRV depending on how much CRV you have locked up.

Then finally you earn 1.089% in SNX taking into account the current prevailing price of SNX.

Curve.finance interface explained
The Curve Finance latest interface for pools

Rewards can be vastly different between pools. For example, that last one is titled USDD/3CRV and contains 4 stablecoins: USDD plus the ones that are in Curve’s largest and most traded pool called 3pool: USDC, USDT and DAI.

Another thing to notice is how this pool has a yellow label that says “factory”. This means that this pool has been created by a 3rd party.

Anyone can deploy a pool on Curve by combining their token with Curve’s 3Pool or sBTC pool.

USDD by the way is a mix between an algo and overcollateralized stable coin issued by Tron. To reward you for the extra risk you’re taking the CRV interest rates varies from 15% to 37.65%.

10. No Impermanent loss

Because we are talking about stablecoins there is no impermanent loss involved.

Impermanent loss is the opportunity cost of you investing in a liquidity pool as opposed to holding your tokens.

If the exchange rate between the tokens in the pool changes a lot it could be the case that you would have been better off by just holding on to your tokens.

But with stablecoins the exchange rate is always going to be the same.

Hence no impermanent loss.

11. Curve Finance Governance and Curve DAO

There is one final component you need to know about Curve Finance. And that is its governance.

The CRV token is used to vote on governance decisions such as token burning, how much to concentrate liquidity, voting fees, what pools to introduce and with what incentives.

CRV holders can also vote on an emergency shut down mechanism in case there is a critical vulnerability so that only withdrawal is possible.

12. Token uses for CRV

CRV has 3 uses and for all 3 you need to lock up you CRV.

When you lock up your CRV you get veCRV in return. The VE stands for vote-escrowed.

Imagine these like vouchers that you can use in different ways.

The longer you lock your CRV to more veCRV you get. You can lock your CRV from anywhere between a week and 4 years.

So let’s explore how you can use your veCRV. There are 3 main uses.

  1. Staking: 50% of admin fees go to stakers.
  2. If you hold veCRV you can boost your CRV returns by up to 2.5 times (usually if you lock your CRV for 4 years but this varies by pool)
  3. Voting

You can find out more details about governance on Curve’s resources page

13. It’s a wrap

Ok people it’s time to wrap up.

You now know what Curve Finance is and how it works. Over time I will add more guides to describe how to go about using it.

My next article will describe Convex and what is known as the Curve Wars. Curve has grown so much in size that multiple protocols emerged seeking to accumulate veCRV so that they could influence rewards for their preferred liquidity pool.

As a write this article Curve has already evolved. On Curve 2.0 you can trade any pair of tokens.

In one of his early interviews Egorov said he wanted to fully automate ALL forex markets. It looks like he has his work cut out for himself and I am excited to see how Curve continues to evolve.

Leave a Reply

Your email address will not be published. Required fields are marked *