Curve Finance Review: The Decentralized Exchange King
On July 31st, 2023, Curve Finance experienced a significant hack for over $50 million at the time of writing. This was a result of an issue with a Vyper compiler in versions 0.2.15-0.3.0, resulting in the following pools being impacted: crv/eth, aleth/eth, mseth/eth, peth/eth. As of Oct. 1, 2023, the hacker has returned about $12.7 million, and Curve Finance is offering a $1.9 million bounty to anyone who can identify them. We recommend monitoring the situation until the security issues are resolved.
Moment before this article was completed, Uniswap was suddenly cast from the throne as the largest decentralized exchange. Nearly 70% of Uniswap’s assets have moved to another DEX called SushiSwap.
This has consequently made Curve Finance the gold medalist on the DEX leaderboard. Although it is not even a year old, Curve Finance now also sits as the third largest DeFi platform by total value locked.
Some of you may know Curve Finance as being the engine of the now famous DeFi aggregator, yearn.finance. However, it was last month’s infamous launch of CRV, Curve Finance’s governance token, which really put Curve Finance on the map. Why? Because when the token launched, the market cap of CRV was briefly larger than Bitcoin’s. As you will see, Curve Finance is much more than just another DEX.
Who made Curve Finance?
Curve Finance was created by Russian physicist Michael Egorov. Egorov is a seasoned cryptocurrency veteran. He began by investing in Bitcoin during its peak in 2013 and despite losing on his initial investment, continued to use Bitcoin as means of transferring money across borders and even briefly mined Litecoin.
In 2016, Egorov founded a company called NuCypher, a fintech company which specializes in encryption. NyCypher morphed into a blockchain/cryptocurrency project that raised over 30 million USD in a 2018 ICO and a acquired a further 20 million USD in private funding in 2019. Unfortunately, the NU token is currently not listed on any major exchanges.
Egorov has also been playing with DeFi protocols since 2018, starting with MakerDAO. In 2019, he was shopping around for a good DEX and was not very impressed Uniswap. This prompted him to develop a new DEX called StableSwap for which he published a whitepaper in November of 2019.
After coding it and debugging it, he released the protocol to the public in January of this year under the name Curve Finance, with a rainbow Klein bottle as its eye-catching logo.
In May of 2020, Curve Finance hinted they would be issuing their own governance token, CRV. In an interview, Egorov noted that a large part of the transition to a decentralized autonomous organization was to bypass any legal issues the Curve Finance team could face. The current Curve Finance team is based in Switzerland and consists of five people including Egorov. Of the remaining four, one is a developer and the other three are involved in social media and marketing.
What is Curve Finance?
Curve Finance is a decentralized exchange built on Ethereum. It is specifically designed to provide efficient trading between cryptocurrencies of the same value and provide high annual interest returns on cryptocurrency funds deposited into Curve Finance by liquidity providers. The recent release of its governance token, CRV, turned Curve Finance into a decentralized autonomous organization (DAO).
Curve Finance can be conceived of as a series of asset pools. All these pools contain cryptocurrencies that are worth the same value. At the moment, 3 of the 7 pools on Curve Finance involve stablecoins, and the remaining 4 involve various versions of wrapped Bitcoin such as wBTC, renBTC, and sBTC. These pools can give incredibly high interest on deposited funds, currently returning over 300% per year to liquidity providers (for the BUSD pool).
You might be wondering how this is possible. The simple, short answer is that Curve Finance uses these deposited funds to provide liquidity to other DeFi protocols such as Compound. Doing this generates interest in Compound and Curve Finance basically passes on that interest to liquidity providers, plus a cut of trading fees from the Curve Finance platform, plus some CRV tokens. Yearn.finance takes this to the next level by using Curve Finance to automatically swap stablecoins to the Curve Finance pools with the highest yields.
Unlike many other DeFi protocols, Curve Finance is very upfront about the potential risks of using their platform. Curve Finance’s DEX code has already been audited twice and the CRV token contract and DAO have been audited three times.
Egorov has stressed that it is necessary to constantly review the code to ensure there are no issues. As such, Curve Finance offers bug bounties worth up to 50 000$USD to anyone who can find any errors in their DEX, CRV, or DAO code.
How does Curve Finance work?
If the last two paragraphs left you scratching your head, do not fret. To fully understand how Curve Finance works, it is necessary to brush up on some important terminology.
Knowing these will also help you understand how it is possible for Curve Finance and similar DEXs to have incredibly high liquidity compared to centralized exchanges and execute enormous trades with near-zero slippage.
What is a liquidity provider?
A liquidity provider is the term used to describe someone who deposits cryptocurrency into a DeFi protocol, usually a decentralized exchange. This is done to increase the quality of the DEX for people who are using it, as they will not have to wait forever for their trade to complete.
In many cases, liquidity providers can earn some handsome rewards for providing liquidity. These rewards normally come from a cut of any fees on the protocol, and from being awarded protocol tokens (if there are any). These incentives are known as liquidity mining schemes. The practice of finding the highest annual interest returns on deposited funds is referred to as yield farming.
What is an Automated Market Maker?
An automated market maker is any protocol which relies on a smart contract rather than an order book to determine the price of an asset. On centralized exchanges, there is a tug of war between buyers and sellers.
You have probably noticed the different trading fees on centralized exchanges offered to market makers and takers. Makers are those which put an offer to buy or sell a crypto on the order books for a price other than the current price, and takers are those which simply buy the asset for the current listing price.
Keeping this terminology in mind, automated market makers instead use the ratio of assets in a given pool to determine the price of the asset. Liquidity providers are incentivized to provide certain assets to these pools to ensure the ratios also remain balanced. This is what DEXs like Uniswap and Curve Finance do, and why liquidity providers must provide equal ratios of two (or more) cryptocurrencies to start a liquidity pool on these platforms.
For example, imagine you have 10 Ethereum and 1000 USDC in a pool. This means each Ethereum is worth 100 USDC, since the ratio is 1-100. Suppose someone comes and buys 1 Ethereum from the pool. Now that ratio has changed, and once you math it out, the price of Ethereum is now 111$USD.
This gives incentive to someone to arbitrage (take advantage of a price difference on two trading platforms) and buy 100$USD on another exchange like Coinbase, and sell it in this hypothetical pool for 111$USD, restoring the equilibrium (which is the actual current market price of the asset – 100$USD).
What is a bonding Curve?
If you were to graph an automated market maker equation, you would see something that is known as a bonding curve. What it shows is that the more of an asset in a pool is purchased relative to the others, the more expensive it becomes, increasing exponentially up to a theoretically infinite price.
This makes it practically impossible for anyone to buy all of the cryptocurrency in the pool and gives arbitrage traders more incentive to come in and restore balance when the ratio between the pooled assets (and therefore price) deviates too much.
Curve Finance uses a unique bonding curve – unique because it is designed to squeeze the price into a narrower margin (1$USD for stablecoins). This curve looks more like the side of an octagon than an actual curve as a result. In plain English, it gives more wiggle room for the ratio between the stablecoins in the pool to deviate.
This means that you can buy more without experiencing slippage. Egorov notes that a regular bonding curve would not work well for stablecoins or pegged assets for the reasons outlined earlier (their prices would fluctuate too much with a regular bonding curve).
What is slippage in Crypto?
Slippage can happen a lot on centralized exchanges and it is something you have probably experienced if you ever went to buy an altcoin with low volume. You might see that there is 100 of an altcoin up for grabs for the current market price, but the next 100 being sold in the order book might be for a price that is 5% higher. This increase in price as you buy from more expensive sellers is slippage.
Curve Finance has extremely low slippage because of its unique bonding curve and the incredibly high volume of cryptocurrency deposited by liquidity providers. Egorov has claimed that you could easily execute a trade on Curve Finance worth more than 5 million USD and experience less than 0.4% slippage. Imagine if you tried buying that amount of a stablecoin on a cryptocurrency exchange – you would wipe out the order books after a lot of slippage!
What is Impermanent Loss?
Simply put, impermanent loss is the potential loss a liquidity provider experiences for depositing their cryptocurrency into a protocol instead of just holding it. Impermanent loss can happen when, say, someone buys 1 ETH from the aforementioned hypothetical pool of 10 ETH and 1000 USDC.
If the price of ETH is rising, the liquidity provider may miss out on an extra few dollars of profit if they had held all 10 ETH instead of the resulting 9 ETH + extra USDC deposited by the person who bought the 1 ETH.
As you can see, this “loss” is often small and usually temporary but can become permanent if a user withdraws their funds. The fact that Curve Finance uses stablecoins (and other pegged assets) means that impermanent loss is also much lower compared to other platforms such as Uniswap because the price of the asset does not vary to the same degree.
Curve Finance Roadmap
Curve Finance does not have a clearly defined roadmap. However, there is one very important thing to note. Egorov mentioned in an interview that the Curve Finance team was playing with the idea of adding more cryptocurrencies to Curve Finance, and not just stablecoins.
He explained that this would require the creation of additional bonding curves which would better support more volatile assets. This potential change as well as any others are fundamentally up to CRV holders to vote on.
The CRV cryptocurrency token
CRV is an ERC-20 token used for governance in the Curve Finance DAO. While the DEX itself cannot be changed, CRV holders can lock their CRV (which turns it into veCRV – vote escrowed CRV) to vote to add new yield pools, change existing fee structures, and even introduce token burning schedules for CRV.
Voting power can be increased depending on how long CRV tokens are locked. The current maximum lock is 4 years, which gives 2.5x voting power to those dedicated CRV holders (in the form of veCRV).
Any user with at least 2500 veCRV can table a proposal by posting in the Curve Finance DAO governance forum. At least 33% of existing veCRV must participate in voting for the proposal to be considered, with a 50% voting quorum (more than 50% of veCRV must vote in the affirmative). Any changes to DEX parameters are implemented by the Curve Finance team. The Curve Finance DAO itself is built using Aragon.
CRV Cryptocurrency ICO
The CRV token did not have an ICO. Instead, the token had a surprise release on August 13th when a Twitter with the handle 0xc4ad (0xChad) suddenly deployed a CRV smart contract by paying over 8000$USD in Ethereum gas fees.
He/she/they were able to do this by using the code on Curve Finance’s Github as reference. The team initially rejected the token launch but surprisingly accepted it as legitimate after reviewing the code.
If you are wondering exactly how these CRV tokens were distributed, you are in for a bit of a headache. As you may have guessed, 0xChad apparently pre-mined over 80 000 CRV tokens which were selling for a whopping 3.1 ETH (1275$USD) per CRV on Uniswap moments after release, temporarily giving CRV a jaw dropping market cap of over 3.8 trillion USD.
The total supply of CRV is just over 3 billion. 5% (151 million) CRV will be issued to addresses which provided liquidity to Curve Finance prior to the token launch in proportion to how much liquidity they provided. These funds will unlock gradually on a daily basis for one year (365 days).
Another 5% will go to Curve Finance DAO reserves, 3% will go to Curve Finance employees with the same unlock schedule as early liquidity providers, and 30% will go to shareholders (Egorov plus 2 angel investors) with a 4 year and 2 year release period, respectively.
The remaining 62% of tokens (1.86 billion) will be given to current and future liquidity providers on Curve Finance. 766 000 CRV will be distributed to liquidity providers each day. This daily amount will be reduced by 2.25% each year. When you do the math, this means that it will take around 300 years for all CRV tokens to be issued.
CRV Price Analysis
As mentioned in the previous section, CRV was initially trading at a price of 1275$USD on Uniswap moments after launch. This was because Uniswap’s AMM equation works in much the same way as Curve Finance’s.
This means that the low ratio of CRV tokens in Uniswap pools relative to other cryptocurrencies gave CRV this preposterous price. As more tokens were added to the pool, the ratio became more balanced so the price of CRV fell accordingly.
The price of CRV continued to fall for about 10 days before stabilizing at a price of around 3$USD by the end of August. Earlier this month, CRV spiked to nearly 5$USD before crashing down to under 2$USD. This was along with many other DeFi-oriented tokens, which saw an over 50% pullback in price over a 3-day period. CRV has hovered around 2$ since then, showing a slight uptrend in recent days.
Where to get CRV cryptocurrency
Believe it or not, Binance announced they would be listing the CRV token within 24 hours of the botched launch. By August 14th, CRV was trading on Binance and has since been listed on other reputable exchanges such as OKEx and HTX.
You can also still get CRV on Uniswap, but you may be better off simply farming it by providing liquidity to Curve Finance pools if you have some spare stablecoins under your couch pillows.
CRV Cryptocurrency Wallets
Since CRV is an ERC-20 token, you are able to store it on virtually any wallet which supports Ethereum-based assets. CRV cryptocurrency wallets include Atomic Wallet (desktop and mobile), Exodus Wallet (desktop and mobile), Trezor (hardware), and Ledger (hardware).
You can also use a Web 3.0 browser wallet like Metamask. This is especially convenient if you plan on using your CRV to vote, since you require a Web 3.0 wallet to interact with the Curve Finance DEX and its DAO.
(A short) Curve Finance Tutorial
Using Curve Finance is straightforward. As we just noted, you will need a Web 3.0 wallet such as Metamask. While the retro interface of the DEX can feel a bit overwhelming (or nostalgic), basically everything you need to know is on the main page of Curve Finance.
If you are there to swap between stablecoins and wrapped Bitcoins, the first box titled “Swap using all Curve pools” is the one you want to interact with. You can adjust advanced settings just above the “Sell” button.
Scrolling down will reveal some of the greenest pastures in yield farming – Curve Finance’s pools. The third column shows the different APY (annual interest rates) you will gain for providing liquidity to each pool, along with the assets you will get in return (if any).
As you can see, every pool is giving CRV tokens to liquidity providers, and when you factor in the market price of CRV, this is what turns an already insane 34.76% annual interest rate into a heart-stopping 337% annual interest rate.
Once you have decided which pool you want to provide liquidity to, simply click on it and deposit the appropriate stablecoin (or wrapped Bitcoin). Note that this will cost some amount of Ethereum gas fees, which is estimated for you.
Make sure to factor this into your calculations! Interest is accrued every Ethereum block (roughly 15 seconds), and compounds automatically. CRV accrues every second. You can withdraw at any time to claim your funds and accumulated CRV but remember that this will cost gas.
The Curve-Vyper Exploit
On July 30, 2023, several Curve liquidity pools on Curve Finance were exploited in a hack, accumulating damages of about $61 million in various crypto tokens. Following the incident, Curve set a bounty offer of $1.85 million on the hacker’s identity.
How did the Exploit Transpire?
The Curve Finance protocol is made of several liquidity pools, which are smart contracts that operate on the blockchain. Like every other software, programming smart contracts involves using a compiler, an environment where programmers write and test the code to iron out bugs and prime them for deployment on the blockchain mainnet.
The liquidity pools (smart contracts) that suffered from the hack were programmed using the Vyper compiler, particularly versions 0.2.15, 0.2.16, and 0.3.0. These versions were plagued with an issue, making the smart contracts complied on them vulnerable to reentrancy attacks, in which an attacker can trick the contract’s balance calculations and steal funds.
What’s interesting about this attack is that it sourced a vulnerability from the smart contract compiler and not the Curve codebase itself. Swapping out a cook’s salt jar for pepper would ruin the dish even if the cook follows the recipe impeccably, similarly, a perfectly compiled smart contract may still be vulnerable if the compiler itself is inherently vulnerable.
While smart contract protocols run robust bounty programs to keep their code in check, compilers do not receive similar attention, which is perhaps why this vulnerability could slip past Curve Finance’s watchdogs all this time. While several white hat hackers have chipped in to mitigate the attack, it is worth mentioning that Curve pools complied with Solidity (another smart contract compiler) remain unaffected and operate as intended.
Our take on Curve Finance
The appeal and potential of Curve Finance is not all that apparent at first glance. You may be asking what the point is of having a platform which only lets you trade between assets worth the same amount.
To be honest, we wonder the same thing, but it seems that there is legitimate demand for these types of swaps in DeFi. Also, the appeal of Curve Finance fundamentally boils down to the high interest yields on funds deposited by liquidity providers.
The potential of Curve Finance is something which has been greatly underestimated. We briefly noted in the Roadmap section of this article that the Curve Finance team is playing with the idea of supporting assets beyond stablecoins and various flavors of wrapped Bitcoin. If this were to happen, Curve Finance could become one of the most power DEXs on the market.
While there is almost nothing negative that could be said about the Curve Finance DEX, the Curve Finance DAO is a bit of a different story. This all boils down to the incredible voting power which Egorov has compared to other token holders since he holds the most CRV by a wide margin.
Yearn.finance creator Andre Cronje publicly criticized Egorov for this. Egorov responded by giving his word that he would not abuse this power (a smart contract would be better than his word, however).
On the bright side, as more CRV tokens are released to former Curve Finance liquidity providers and issued to new liquidity providers, the more decentralized the DAO will become. It is also worth noting that Egorov’s immense voting power is not as much of a threat as in other DAOs, since the number of variables which can be modified in Curve Finance by token holders is much more conservative compared to some other community governed DEXs and protocols.
All in all, Curve Finance seems to have an incredibly bright future ahead. Egorov himself has said that the project has no issues forming new partnerships. The fact that the Curve Finance Team is next door to other huge DeFi projects such as Aave (which is also based in Zug, Switzerland’s “Crypto Valley”) means that this is truly just the beginning for Curve Finance, and consequently the value of the CRV token. It will probably never be worth more than Bitcoin again though!
A big thank you to Curve Finance's very own Michael Egorov who helped our us fill in the blanks when writing this article.
Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.