Curve Finance: StableSwap, veCRV, the Curve Wars, Vyper Hack

How Curve's StableSwap pools work, how veCRV voting started the Curve wars, how much of the vote Convex holds, and the Vyper exploit of 30 July 2023.

TECH & NETWORKS7 min readBy AlgoSys ResearchPublished Dec 6, 2026
At a glanceCurve Finance · Decentralised exchange for assets of similar value
Whitepaper
StableSwap, Michael Egorov, 10 November 201911 Michael Egorov · StableSwap — efficient mechanism for Stablecoin liquidity (whitepaper) · 10 November 2019
Launch
January 2020 (Ethereum)22 ForkLog · What is Curve?
CRV token
13 August 2020; maximum supply about 3.03 billion3·43 CoinDesk · Newest DAO project was thrown a Curve, but the team is rolling with it anyway · 14 August 20204 Curve Finance · Curve DAO whitepaper · 31 July 2020
veCRV
Lock CRV up to 4 years for votes, fee share and up to 2.5× rewards boost4·54 Curve Finance · Curve DAO whitepaper · 31 July 20205 Curve Finance · veCRV boosting
Stablecoin
crvUSD, launched May 20236·76 Michael Egorov · Curve stablecoin design (crvUSD, LLAMMA) · 9 October 20227 The Block · Curve Finance deploys crvUSD stablecoin on Ethereum mainnet · 4 May 2023
Vyper exploit
30 July 2023; about $70 million taken from four pools8·98 LlamaRisk · Curve Pool Reentrancy Exploit Postmortem · 1 August 20239 Rekt · Curve, Vyper — REKT · 31 July 2023
On-chain, 5 December 2026
CRV issued
2.44 billion1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026
Locked in veCRV
842 million CRV, 34.5% of supply1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026
Convex share of votes
54.9%1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026
Contents

Curve Finance is a decentralised exchange built for assets that should trade at nearly the same price, such as dollar stablecoins or ETH and its staked versions. Its StableSwap formula, published by Michael Egorov in November 2019, lets such pools swap large amounts with little slippage.11 Michael Egorov · StableSwap — efficient mechanism for Stablecoin liquidity (whitepaper) · 10 November 2019 Curve's CRV token and the veCRV voting system turned control of its emissions into a contest among protocols, the "Curve wars". On our on-chain count Convex Finance controlled 54.9% of veCRV voting power on 5 December 2026.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

Who holds Curve’s votesOn-chain data from the CRV and VotingEscrow contracts: locked CRV as a share of supply and the Convex proxy’s share of voting power. Who holds Curve’s votes Share of CRV locked in veCRV and Convex’s share of veCRV votes, 5 June and 5 December 0%20%40%60%80%100%Dec 20Dec 21Dec 22Dec 23Dec 24Dec 25Dec 2654.9%34.5% algosys.terminal CRV lockedConvex share
Share of CRV supply locked in veCRV and Convex's share of veCRV voting power, 5 June and 5 December 2020–2026. Source: CRV and VotingEscrow contracts, our calculation.

StableSwap

A constant-sum pool (x + y = const) would give a fixed price and no slippage, but it can be emptied of one asset completely. Uniswap's constant product (x·y = k) never runs dry, but the price moves with every trade. The StableSwap whitepaper combines the two: an amplification coefficient A makes the curve behave almost like a constant sum while the pool is balanced and like a constant product as it becomes lopsided; the paper's abstract calls it "Uniswap with leverage".11 Michael Egorov · StableSwap — efficient mechanism for Stablecoin liquidity (whitepaper) · 10 November 2019 The higher A, the flatter the price near balance and the sharper the turn when one asset runs low.

Curve opened in January 2020 with stablecoin pools.22 ForkLog · What is Curve? Later pools added ETH and liquid staking tokens. The comparison with Uniswap's design and impermanent loss is covered on the AMM page.

CRV and veCRV

CRV went live on 13 August 2020, after an anonymous developer deployed the DAO contracts from Curve's repository ahead of the team, which then adopted the deployment.33 CoinDesk · Newest DAO project was thrown a Curve, but the team is rolling with it anyway · 14 August 2020 The Curve DAO whitepaper set the eventual supply at about 3.03 billion CRV, with 1.27 billion, or 42%, as the initial allocation and the rest emitted to liquidity providers through "gauges".44 Curve Finance · Curve DAO whitepaper · 31 July 2020 Emissions fall by about 16% every August.1111 Curve Finance · CRV token — supply and emissions

CRV gives no votes on its own. A holder locks it in the VotingEscrow contract for one week to four years and receives veCRV in proportion to the amount and the remaining lock time, so voting power decays to zero at unlock.4·54 Curve Finance · Curve DAO whitepaper · 31 July 20205 Curve Finance · veCRV boosting veCRV does three things: it votes every week on how emissions are split between pools, it raises the holder's own CRV rewards as an LP by up to 2.5 times, and it receives protocol fees.55 Curve Finance · veCRV boosting In most pools the admin fee is 50% of trading fees, and the FeeAllocator guarantees that at least half of fees reach veCRV holders; they are paid in crvUSD.1212 Curve Finance · FeeAllocator (developer documentation)

The Curve wars

A gauge vote decides where CRV emissions go, and emissions attract liquidity. A stablecoin issuer that wants deep Curve pools for its token can pay for liquidity directly, or it can acquire votes. From 2021 protocols competed for veCRV, either by locking CRV themselves or by renting votes from others.1313 GSR · The Curve Wars (research report) · 21 January 2022

Convex Finance, whose voter proxy made its first transaction on 18 May 2021, became the largest player.1414 Etherscan · Convex Finance: Voter Proxy (0x989A…AD80) CRV deposited into Convex is locked as veCRV for good, and the depositor receives cvxCRV one-for-one; the conversion works only one way.1515 Convex Finance · Understanding cvxCRV All of it votes through one voter-proxy address, and the voting rights are passed to holders of vote-locked CVX (vlCVX), whose result the Convex multisig signs.16·1716 Convex Finance · Voting and gauge weights17 Convex Finance · Contract addresses (Voter Proxy) Vote markets such as Votium then let protocols pay CVX lockers to direct the vote. We read the balance of Convex's voter proxy in the VotingEscrow contract twice a year:1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

Date CRV issued CRV locked Share locked Convex share of veCRV
5 Dec 2020 1.38 bn 59 m 4.2% —
5 Jun 2021 1.52 bn 203 m 13.4% 16.3%
5 Dec 2021 1.64 bn 369 m 22.4% 43.1%
5 Dec 2022 1.86 bn 621 m 33.3% 51.0%
5 Dec 2023 2.05 bn 779 m 38.1% 48.5%
5 Dec 2024 2.20 bn 916 m 41.6% 51.0%
5 Dec 2025 2.33 bn 861 m 37.0% 52.7%
5 Dec 2026 2.44 bn 842 m 34.5% 54.9%

Source: CRV totalSupply, VotingEscrow supply, totalSupply and balanceOf(Convex voter proxy) through an archive node; our calculation.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

Convex passed half of all votes within a year of launch and has held about half ever since.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026 The share of CRV locked peaked at 41.6% in December 2024 and has fallen since, while Convex's share kept rising, because Convex's locks never expire and individual locks do. In our view the "war" ended in a standing arrangement: one intermediary holds the majority of votes, and the contest moved to the markets that price those votes.

The Vyper exploit of 30 July 2023

On 30 July 2023 several Curve pools written in Vyper were drained between 13:10 and 22:00 UTC.88 LlamaRisk · Curve Pool Reentrancy Exploit Postmortem · 1 August 2023 The cause was a compiler bug. In Vyper versions 0.2.15, 0.2.16 and 0.3.0 the @nonreentrant decorator ignored its key and gave each function its own lock, so a contract could be re-entered through a different function in the middle of a call.18·1918 Vyper (GitHub security advisory GHSA-5824-cm3x-3c38, CVE-2023-39363) · Incorrectly allocated named re-entrancy locks · 5 August 202319 Vyper team, Omniscia · Vyper Nonreentrancy Lock Vulnerability Technical Post-Mortem Report · 4 August 2023 The bug had been found and fixed for version 0.3.1, but its impact on deployed contracts "was not realized at the time"; the Curve pools were exploitable because they sent out native ETH before updating their state.18·1918 Vyper (GitHub security advisory GHSA-5824-cm3x-3c38, CVE-2023-39363) · Incorrectly allocated named re-entrancy locks · 5 August 202319 Vyper team, Omniscia · Vyper Nonreentrancy Lock Vulnerability Technical Post-Mortem Report · 4 August 2023

Pool Taken (LlamaRisk post-mortem)
pETH/ETH (JPEG'd) 6,106.65 WETH, about $11 million
msETH/ETH (Metronome) 866.55 WETH and 959.71 msETH, about $3.4 million
alETH/ETH (Alchemix) 7,258.70 WETH and 4,821.55 alETH, about $22.6 million
CRV/ETH (Curve) 7.19 million CRV, 7,680.49 WETH and 2,879.65 ETH, about $24.7 million

Source: LlamaRisk, Curve pool reentrancy exploit post-mortem; dollar values at the prices of the day.88 LlamaRisk · Curve Pool Reentrancy Exploit Postmortem · 1 August 2023

Who Total
Rekt about $69 million99 Rekt · Curve, Vyper — REKT · 31 July 2023
Blockworks $71 million2020 Blockworks · Curve suffers $70M exploit · 30 July 2023
PeckShield via Finance Magnates $73.5 million, of which $52.3 million (73%) recovered by 7 August2121 Finance Magnates · Curve Finance Recovers over 70% of Hacked Funds: Report · 7 August 2023
DefiLlama hacks database $61.7 million2222 DefiLlama · Curve Finance — TVL, volume, fees and hacks

The totals differ mainly in prices and in whether the ETH taken by front-running bots is counted.8·98 LlamaRisk · Curve Pool Reentrancy Exploit Postmortem · 1 August 20239 Rekt · Curve, Vyper — REKT · 31 July 2023 We use "about $70 million".

Much of the money came back. The MEV operator c0ffeebabe.eth front-ran part of the CRV/ETH drain and returned 2,879 ETH to Curve's deployer.2323 The Block · MEV bot runner 'c0ffeebabe.eth' returns $5.4 million amid Curve exploit · 31 July 2023 Curve, Metronome and Alchemix offered the attackers a 10% bounty for returning the rest; by 7 August PeckShield counted 73% of the funds returned.2121 Finance Magnates · Curve Finance Recovers over 70% of Hacked Funds: Report · 7 August 2023 For the CRV/ETH funds that stayed out, Curve offered $1.85 million for identifying the exploiter.2424 The Block · Curve offering $1.85 million bounty for exploiter's identity (and conviction) · 6 August 2023 On DefiLlama data, Curve's total value locked fell from $3.13 billion on 29 July to $1.73 billion on 31 July 2023, by 45% in two days.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

The founder's loans

Michael Egorov had borrowed tens of millions of dollars in stablecoins against CRV on several lending protocols, and the CRV price fall after the exploit brought those loans close to liquidation. In early August 2023 he sold 72 million CRV at $0.40 over the counter to a group of buyers and used the proceeds to cut his debt, which on-chain trackers put at about $79 million at the time.2525 The Block · Michael Egorov has so far sold 72 million CRV tokens in OTC deals · 3 August 2023 On 13 June 2024 the positions were liquidated after all; Egorov said their size "caused 10M of bad debt", mostly on Curve's own LlamaLend markets, and that he had already repaid 93% of it.26·2726 The Block · Curve Finance founder gets liquidated amid sharp drop in CRV token price · 13 June 202427 Cointelegraph · Curve founder repays 93% of $10M bad debt stemming from liquidation · 13 June 2024

crvUSD and LlamaLend

crvUSD is Curve's stablecoin, minted against collateral. Its design paper of October 2022 replaces liquidation with a special AMM, LLAMMA, which gradually converts collateral into crvUSD as the price falls and back as it recovers ("soft liquidation").66 Michael Egorov · Curve stablecoin design (crvUSD, LLAMMA) · 9 October 2022 Contracts went live in May 2023 with sfrxETH as the first collateral.77 The Block · Curve Finance deploys crvUSD stablecoin on Ethereum mainnet · 4 May 2023 LlamaLend, launched in March 2024, uses the same mechanism for isolated lending markets in which crvUSD is always one side.2828 Curve Finance · March 12, 2024: LlamaLend UI live · 12 March 2024

Size

Year Volume, $ billion (DefiLlama)
2022 36.5
2023 76.9
2024 95.5
2025 112.2
2026, to 5 December 51.2

Source: DefiLlama, Curve DEX on all chains, our aggregation by calendar year.10·2210 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 202622 DefiLlama · Curve Finance — TVL, volume, fees and hacks

Curve DEX held $24.3 billion at its peak on 5 January 2022 and $0.87 billion on 5 December 2026, a fall of 96%.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026 Volume grew every year until 2025, so liquidity left faster than trading. DefiLlama's fee series implies fees of 0.32% of volume in 2023 and 0.05% in 2024; we could not establish whether that reflects trading or a change in methodology, so we do not use it.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

Other incidents

On 9 August 2022 the curve.fi domain was redirected through its DNS registrar to a copy of the site that asked users to approve token transfers; about $570,000 was lost before the record was fixed the same day.2929 Decrypt · Curve 'Strongly Suggests' Domain Migration to Ethereum Name Service After $570K Frontend Hack · 10 August 2022

Common misreadings

  • "Curve was hacked through its own code." The 2023 exploit came from the Vyper compiler; the pools' source code was correct.18·1918 Vyper (GitHub security advisory GHSA-5824-cm3x-3c38, CVE-2023-39363) · Incorrectly allocated named re-entrancy locks · 5 August 202319 Vyper team, Omniscia · Vyper Nonreentrancy Lock Vulnerability Technical Post-Mortem Report · 4 August 2023
  • "Convex owns Curve." Convex holds most veCRV votes, and vlCVX holders decide how they are cast.10·1610 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 202616 Convex Finance · Voting and gauge weights
  • "Most CRV is locked." On 5 December 2026 it was 34.5% of supply, below the peak of 41.6% in December 2024.1010 AlgoSys · Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) · 6 December 2026

See also

Categories:DeFiExchangesHacks

FAQ · 4

What makes Curve different from Uniswap?

Curve's StableSwap formula keeps prices almost flat while a pool is balanced, so assets that should trade near one price, such as stablecoins or ETH and staked ETH, can be swapped in size with little slippage. Uniswap's x·y=k curve moves the price with every trade.

What were the Curve wars?

Holders of veCRV vote weekly on which pools receive CRV emissions. Protocols that needed deep Curve liquidity competed to control those votes, either by locking CRV themselves or through Convex, which pools CRV from many users and votes with it. On our on-chain count Convex holds 54.9% of veCRV voting power.

What happened in the Curve Vyper exploit?

On 30 July 2023 attackers used a bug in versions 0.2.15–0.3.0 of the Vyper compiler, whose reentrancy lock did not protect across functions, to drain four pools of about $70 million. White-hat bots and some attackers returned most of it.

Why does Curve's founder matter for CRV?

Michael Egorov borrowed large sums against CRV. In August 2023 he sold 72 million CRV over the counter to reduce loans, and in June 2024 his positions were liquidated, leaving about $10 million of bad debt, of which he said he repaid 93% the same day.

Documents · 3

  • StableSwap whitepaperMichael Egorov · 10 November 2019official filearchived copy
  • Curve DAO whitepaperCurve Finance · 31 July 2020official file
  • veCRV, Convex share of votes, TVL and volume of Curve, 2020–2026: method and tablesAlgoSys · 6 December 2026download PDF

Sources · 29

  1. ↑3 Michael Egorov. StableSwap — efficient mechanism for Stablecoin liquidity (whitepaper) PDF. 10 November 2019. accessed 6 December 2026, archived copy.
  2. ↑2 ForkLog. What is Curve?. accessed 6 December 2026, archived copy.
  3. ↑2 CoinDesk. Newest DAO project was thrown a Curve, but the team is rolling with it anyway. 14 August 2020. accessed 6 December 2026, archived copy.
  4. ↑4 Curve Finance. Curve DAO whitepaper PDF. 31 July 2020. accessed 6 December 2026.
  5. ↑3 Curve Finance. veCRV boosting. accessed 6 December 2026, archived copy.
  6. ↑2 Michael Egorov. Curve stablecoin design (crvUSD, LLAMMA) PDF. 9 October 2022. accessed 6 December 2026.
  7. ↑2 The Block. Curve Finance deploys crvUSD stablecoin on Ethereum mainnet. 4 May 2023. accessed 6 December 2026.
  8. ↑4 LlamaRisk. Curve Pool Reentrancy Exploit Postmortem. 1 August 2023. accessed 6 December 2026, archived copy.
  9. ↑3 Rekt. Curve, Vyper — REKT. 31 July 2023. accessed 6 December 2026, archived copy.
  10. ↑13 AlgoSys. Curve: veCRV, Convex share, TVL and volume, 2020–2026 (PDF) PDF. 6 December 2026. accessed 6 December 2026.
  11. ↑ Curve Finance. CRV token — supply and emissions. accessed 6 December 2026, archived copy.
  12. ↑ Curve Finance. FeeAllocator (developer documentation). accessed 6 December 2026, archived copy.
  13. ↑ GSR. The Curve Wars (research report) PDF. 21 January 2022. accessed 6 December 2026, archived copy.
  14. ↑ Etherscan. Convex Finance: Voter Proxy (0x989A…AD80). accessed 6 December 2026, archived copy.
  15. ↑ Convex Finance. Understanding cvxCRV. accessed 6 December 2026, archived copy.
  16. ↑2 Convex Finance. Voting and gauge weights. accessed 6 December 2026, archived copy.
  17. ↑ Convex Finance. Contract addresses (Voter Proxy). accessed 6 December 2026, archived copy.
  18. ↑3 Vyper (GitHub security advisory GHSA-5824-cm3x-3c38, CVE-2023-39363). Incorrectly allocated named re-entrancy locks. 5 August 2023. accessed 6 December 2026, archived copy.
  19. ↑3 Vyper team, Omniscia. Vyper Nonreentrancy Lock Vulnerability Technical Post-Mortem Report. 4 August 2023. accessed 6 December 2026, archived copy.
  20. ↑ Blockworks. Curve suffers $70M exploit. 30 July 2023. accessed 6 December 2026, archived copy.
  21. ↑2 Finance Magnates. Curve Finance Recovers over 70% of Hacked Funds: Report. 7 August 2023. accessed 6 December 2026, archived copy.
  22. ↑2 DefiLlama. Curve Finance — TVL, volume, fees and hacks. accessed 6 December 2026, archived copy.
  23. ↑ The Block. MEV bot runner 'c0ffeebabe.eth' returns $5.4 million amid Curve exploit. 31 July 2023. accessed 6 December 2026.
  24. ↑ The Block. Curve offering $1.85 million bounty for exploiter's identity (and conviction). 6 August 2023. accessed 6 December 2026, archived copy.
  25. ↑ The Block. Michael Egorov has so far sold 72 million CRV tokens in OTC deals. 3 August 2023. accessed 6 December 2026.
  26. ↑ The Block. Curve Finance founder gets liquidated amid sharp drop in CRV token price. 13 June 2024. accessed 6 December 2026, archived copy.
  27. ↑ Cointelegraph. Curve founder repays 93% of $10M bad debt stemming from liquidation. 13 June 2024. accessed 6 December 2026, archived copy.
  28. ↑ Curve Finance. March 12, 2024: LlamaLend UI live. 12 March 2024. accessed 6 December 2026.
  29. ↑ Decrypt. Curve 'Strongly Suggests' Domain Migration to Ethereum Name Service After $570K Frontend Hack. 10 August 2022. accessed 6 December 2026.

How we collected the data and checked the facts → editorial policy · data and method (PDF)

Put this to work in the terminal

Live charts, derivatives, on-chain and macro data, free.

Open terminal →