Curve Finance

Nick Sawinyh on 14 Jul 2020

Michael Egorov talks about Curve, the decentralized stablecoin exchange that’s taken DeFi by storm.

Hello! What’s your background, and what are you working on?

My name is Michael Egorov. My journey to crypto was quite an interesting one. I graduated from the Moscow Institute of Physics and Technology and received a Ph.D. in Physics in Australia, all while working on cooling atoms down to absolute zero, i.e., to the state of Bose-Einstein condensate. While still in Australia in late 2013, I bought my first 0.2 BTC – it went down in price, but I kept buying. In the meantime, I decided to move to the U.S. in 2014 and went to work at LinkedIn, founding NuCypher after that in 2016.

While at NuCypher and apart from using Bitcoin regularly, I became an active DeFi user starting with Maker in 2018. Around the same time, I started thinking of something that’s now called liquid staking. While thinking about liquid staking, I’ve created an algorithm for creating very deep markets for similarly priced assets, and Curve is now based on this algorithm.

Speaking of Curve, it’s an exchange expressly designed for stablecoins and bitcoin tokens on Ethereum. The key aspect of Curve is its market-making algorithm, which can provide 100-1000 times higher market depth than Uniswap or Balancer for the same total value locked. This dynamic helps both traders and liquidity providers because fundamental returns for those are higher than on Uniswap and alike by the same factor as the market depth.

It appeared that swaps between stablecoins are crucial for DeFi, and Curve just started naturally growing together with the DeFi space.

What’s Curve backstory?

As I mentioned before, Curve was very much inspired by liquid staking via thinking about staking the NuCypher NU token. For example, you have a COIN, and you have stakedCOIN, so the target price stakedCOIN/COIN must be very slowly growing, and this target price is fundamental rather than given by a potentially manipulatable oracle.

At the same time, a friend of mine and I were working on a trading bot. Its algorithm, although very different, can be considered a precursor to Curve. I came to a conclusion that it was possible to implement this in an Ethereum smart contract with a better algorithm and also translated to the language of bonding curves. After doing some math on that in September 2019, I had the algorithm prototyped in Python.

The idea was first validated in simulations of a portfolio of stablecoins arbitraged with several centralized exchanges based on historical data. The simulations showed insane returns (hundreds % APY) that quickly went down to the values we observe today when TVL in simulations exceeded $1M (which I didn’t expect to happen as quickly as it did).

I went ahead and implemented the algorithm in Vyper and launched it in January 2020 after raising a small amount of angel money. Almost immediately after launch, the Curve pools were already useful for myself when switching between different DeFi projects.

What went into building the Curve?

The first prototype of Curve was done in October 2019. In November, I worked on debugging the system, and in December, I created the first UI. Moreover, based on conversations with Robert Leshner, I put compounding assets (e.g., cDAI and cUSDC) as a basis, which of course, required changing the smart contracts. The first version of Curve was accordingly launched on January 3rd, 2020.

I built Curve so quickly because it was very obvious that there was an opportunity there, and no one had yet figured out the algorithm to properly address that opportunity.

In development, I used Vyper as a smart contract language. It leaves much less space for a developer error, and in my opinion, developer errors are much more likely to occur than compiler errors that can readily be taken care of by having good test coverage.

We didn’t have an audit at launch, and we were open about that. Nevertheless, in 10 days Curve had $500,000 in total value locked (TVL), and Sam Sun approached with a major vulnerability report, with the vulnerability caused by a developer oversight. Since the community was still small and very well aware of risks, they quickly migrated the funds to a fixed contract since upgradeability is deliberately impossible with Curve. In the meantime, I made a “smokescreen commit” to divert the attention of potential hackers and tested it with some, who couldn’t find the issue. In late January, the fixed contract was audited by the Trail of Bits team, who found no more major issues in the fixed contract.

As of now, I’m no longer the only one working on Curve, and keeping everything safe is way easier than earlier on. We have found it to be important to continue studying our contracts for potential issues, whether audited or not. Many teams see audits as a “final stamp of approval,” but they are not. In fact, our auditors recommended us to continue studying the safety of our contracts even post audit, and so far they appear to be very astute with this recommendation.

What was crucial was to get early users via integrations with DEX aggregators. integrated with us almost immediately after we asked. Since then, Curve quickly outperformed all existing stablecoin-to-stablecoin sources of liquidity, even with 30k-50k TVL, and started growing naturally to date.

What’s your business model?

Curve will be powered by a hybrid token, CRV, that will be used for both value accrual and governance. The value accrual aspect comes from:

  1. demand by issuers of new coins like new stablecoins,
  2. from people locking CRV tokens to amplify production of CRV, and
  3. from the possibility of burning CRV for admin fees (although this mechanism probably wouldn’t come into effect anytime soon).

Our competitors probably include both other DEXes and centralized exchanges. However, often we’ve seen collaboration so far instead of competition. Support for sUSD and the integration with dYdX are good examples of very fruitful, mutually beneficial collaborations. Currently, we are targeting stablecoin-to-stablecoin exchanges but quite possibly can expand to foreign exchange markets in the future.

What’s your position on the regulatory landscape today?

The crypto regulatory landscape is something I’ve looked at a lot. An example, the SEC charging EtherDelta is a notable case. At the same time, we believe that DEXes should be trustless and without the need for KYC. KYC puts customers in danger – imagine a leaked database with amounts of money and the addresses of where to get that money! Additionally, KYC creates enormous user friction.

Fortunately, it seems that regulators in Switzerland are quite ahead of many other global watchdogs. They say that if a DEX doesn’t have an ability to interfere with trades or stop them, KYC is not needed. That is why we built Curve without upgradeability and will also have it coordinated by a DAO.

What are your goals for the future?

In the near future, we will launch a DAO. Shortly after, we want to explore other types of assets, like different cryptocurrencies, foreign currencies, staked assets, and so forth. Whatever we manage to optimize algorithms for in a spirit similar to our stablecoin AMM, in other words.

One of our very significant roadblocks is something common for all DeFi projects: scalability of Ethereum. It is very important to explore the ways of achieving it – possibly with L2 solutions – and to collaborate with other DeFi projects to have L2 innovations shared, so that composability is still possible.

What are your future thoughts for the DeFi market?

I think that DeFi will grow really big and will replace banks and power a whole new world financial system, but there’s a long way to go. To make that growth happen, we should focus on adoption efforts while ignoring the natural ups and downs of the market. The need for DeFi to replace the old financial rails is there, and it is very fundamental.

Where can we go to learn more?

DeFi is coming. Don't get left behind

About the author
Nick Sawinyh
Nick Sawinyh is a crypto entrepreneur based in LA. He founded DeFiprime in 2019 to offer information on emerging DeFi ecosystem. He owns small amounts of different cryptocurrencies.

The Latest: