Decentralised finance Spotlight: Curve Finance — spot FX on the blockchain

Olivier Truquet
gft-engineering
Published in
8 min readAug 17, 2022

Disclaimer: The content below is for informational purposes only and should not be construed as financial or legal advice. Consult your financial advisor and lawyer before making any material investment decision. The views expressed in this blog post are those of the author only and do not represent the opinions of GFT or its management.

Curve Finance is a permissionless spot market and a top-10 DeFi protocol by “total value locked” (a measure of the total liquidity available on the platform). At the time of writing, the total value locked on Curve amounted to 5.78 billion USD.[1] Curve is a concentrated liquidity automatic market maker (AMM). The protocol competes directly with Uniswap and was originally designed to facilitate the spot exchange of stablecoins (e.g., USDT/USDC pair) and equally priced assets (e.g., renBTC/wBTC, ETH/stETH pairs). The scope of the exchange has recently expanded to include non-stable assets (e.g., CVX/ETH pair).

In this Spotlight, we explore desirable features of the protocol design. We also propose improvements to suit regulated institutions and stock exchanges better.

What is Curve Finance?

Source: https://curve.fi/pools
Figure 1: Curve Finance UI

Foreign exchange markets are core institutions that ensure access to liquidity in local and foreign currencies. “Traditional” exchanges are centralised market infrastructures managed by regulated entities and barriers to entry for market participants are relatively high.

AMMs, such as Curve Finance, break from this approach by allowing anybody to interact with their smart contracts regardless of jurisdiction. Furthermore, Curve Finance is non-custodial as the protocol does not require users to deposit funds in a custodian account to trade.

Curve and other AMMs facilitate the exchange of tokens via liquidity pools. These are smart contracts that hold tokens provided by market makers and liquidity providers who are incentivised to lock their tokens in the liquidity pools by trading fees and rewards. Anybody can create a liquidity pool on Curve Finance thanks to the factory smart contract, a method to create standardized Curve pools.

Curve’s core technical innovation lies in the formula used to compute the exchange rate of assets holding the same value (for instance, USD Circle and USD Tether). It is, therefore, able to offer lower trading fees and slippage than its competitors. Curve has recently expanded its reach to assets that are priced differently. The protocol uses an algorithm that concentrates liquidity around the current market price and creates more liquidity than earlier AMM versions. Trading of assets holding the same value (e.g., USDT and USDC) occurs on Curve V1 while trading of assets with different values occurs on Curve V2 (e.g., USDC and EURS). Curve V2 was made possible thanks to the integration of Synthetix[2], another core DeFi primitive.

The business case for Curve stakeholders

Trading fees are 4 basis points (bps). 50% of these fees are distributed to liquidity providers and the remaining half is distributed to veCRV holders (a token issued in exchange for locking the Curve Finance governance token, CRV, in a staking contract). It is also worth noting that liquidity deposits and withdrawals are subject to a fee ranging from 0 to 2 bps if they create liquidity pool imbalances.

Liquidity providers

Liquidity providers assume various risks by locking their assets inside the liquidity pools and are compensated for these through trading fees and various rewards mechanisms we present below.

Table 1: Curve Rewards

Traders

Liquidity pools and market inefficiencies create arbitrage opportunities that traders can profit from and therefore maintain a fair market price on Curve. Traders also benefit from using Curve Finance due to relatively lower slippage.

Governance system

Curve Finance issues a token with a finite supply (CRV[3]) to incentivise liquidity on the protocol and voting on governance decisions. There are currently three core use cases for the CRV token:

1. Staking to earn lending and trading fees

2. Boosting to increase CRV Rewards and voting power

3. Voting on governance proposals

The CRV token can be earned from providing liquidity on incentivised pools or it can be purchased on the secondary market.

Simplified smart contract overview

Types of liquidity pools

There are three types of liquidity pools on Curve Finance: Plain Pools, Lending Pools, and MetaPools[4].

Table 2: Curve Pools

Core smart contracts and their roles

Curve trading contracts

Each Curve Finance trading pool operates autonomously through a set of three or four smart contracts.[5] Once deployed on the mainnet of EVM-compatible blockchains, anybody can interact with them, which reflects the permissionless nature of Curve.

A typical trading pool is comprised of the following smart contracts:

· Swap contract that quotes an exchange rate for each token pair

· Pool Token contract that tracks how much liquidity was provided by each liquidity provider (LP) and the fees owed to the LPs after they withdraw their liquidity

· Liquidity Gauge that computes the values of CRV rewards that should be distributed to liquidity providers

· Deposit contract (only applicable to Lending and MetaPool liquidity pools) that facilitates the deposit and withdrawal of tokens in lending pools that only support interest-bearing tokens or wrapped assets (e.g. wrapped bitcoin, a bitcoin IOU issued on another blockchain than the bitcoin network).

Curve DAO Contracts

Curve Finance is both a protocol facilitating the spot exchange of digital currencies and a decentralized autonomous organization (DAO), an entity governed by a set of smart contracts rather than a Charter or Articles of Incorporation.

Voting is performed on-chain and therefore completely transparent. The Curve DAO smart contract development was outsourced to Aragon[6], another DAO specialising in on-chain governance. The core smart contract for voting on Curve is the VotingEscrow Contract, which locks in CRV and issues veCRV, a non-transferable token, that represents a stakeholder’s voting power. A stakeholder’s voting power depends on both the amount of CRV owned and the length of the locking period. The longer a stakeholder locks their CRV, the more voting power their tokens will bear. The maximum locking period is currently four years[7].

What are the risks of using Curve Finance and how to mitigate them?

Please note that the list below is non-exhaustive and that each risk category could be the subject of a dissertation paper. We keep the content informational and high-level in this blog post.

Smart contract risk

Smart contract risk can be summarised as risk caused by smart contract bugs. While such risk will always exist, it can be mitigated through sound architecture and smart contract design, educated technology selection, repeated testing, third-party audit, and research.

Idiosyncratic risk and correlation with tech stocks
Investors using Curve Finance should be aware of idiosyncratic risks inherent in cryptocurrencies. Cryptocurrencies are often referred to as their own asset class due to their role as a store of value and the innovation they have spurred since bitcoin’s creation in 2009. However, for most of their existence, crypto assets have exhibited strong correlation with the price of bitcoin. This implies diversification amongst crypto assets will not reduce idiosyncratic risk and that a diversified investment strategy is required.

Furthermore, cryptocurrencies have exhibited increasing correlation with tech stocks as the industry has matured over the past cycle. Therefore, a well-diversified portfolio across sectors and asset classes might mitigate such risks.

Counterparty risks

Lending pools on Curve are exposed to counterparty risk by design because the underlying token is deposited in a third-party smart contract managed by a lending protocol issuing a yield-bearing token. Should the protocol issuing the interest-bearing token suffer a hack, the holder of the interest-bearing token providing liquidity on Curve may lose a significant portion of the principal locked in the lending protocol smart contract.

Travel rule compliance and know-your-transaction (KYT) risks

Cryptography and the permissionless nature of the Blockchain mean it is difficult to track transaction information such as the information of the sender and beneficiary. Curve does not require users to provide identification information to access its services, nor does it require its clients to provide information on the provenance of funds. Protocol such as Curve will either leverage regulatory arbitrage to continue operating as such or invest to comply in jurisdictions where they operate.

Curve Finance in a regulated environment

Curve Finance and competing AMMs enhance market transparency as all trades and liquidity information are easily accessible on the blockchain. Curve has also demonstrated interesting programmability features such as enabling the trading of interest-bearing tokens. AMMs have also reduced the barriers of entry to FX trading for retail investors by — arguably — simplifying the trading user interface.

While Curve has demonstrated product-market-fit with native crypto VCs and its retail customers, adoption by regulated players will require protocols such as Curve to adapt their offerings and work with regulated entities. In January 2022, Aave, a lending and borrowing protocol, pioneered a regulated offering with Aave Arc, a permissioned liquidity pool based on a whitelisting mechanism. Know your client, anti-money laundering obligations, and user onboarding are performed by Fireblocks, a regulated entity[8].

Source: https://cointelegraph.com/news/aave-launches-its-permissioned-pool-aave-arc-with-30-institutions-set-to-join
Figure 2: Aave Arc Product Description

We believe regulated entities can play a key role in the adoption of decentralized finance protocols. Decentralized finance will also create new opportunities for regulated entities to perform their roles as intermediaries and generate new revenue streams. Therefore, incumbents and innovators would both benefit from driving further adoption of decentralized finance solutions by offering innovative products to their customers and ensuring proper safeguards are in place.

References

[1]According to DeFi Pulse: https://www.defipulse.com/projects/curve-finance

[2] For more information on Synthetix’s role , please refer to the documentation: https://resources.curve.fi/troubleshooting/cross-asset-swaps

[3] For more information on the Token, please refer to the documentation: https://resources.curve.fi/crv-token/understanding-crv

[4] Curve Registry Docs, https://curve.readthedocs.io/exchange-pools.html

[5] We limit this blog post to the core smart contracts only for simplicity.

[6] Curve Dao, https://curve.fi/files/CurveDAO.pdf

[7] Curve Registry Docs, https://curve.readthedocs.io/dao-vecrv.html?highlight=VotingEscrow%20#curve-dao-vote-escrowed-crv

[8] Cointelegraph: https://cointelegraph.com/news/aave-launches-its-permissioned-pool-aave-arc-with-30-institutions-set-to-join

--

--