Curve, a stablecoin exchange at the heart of decentralized finance (DeFi) on Ethereum, has been the victim of an exploit according to a tweet from the project.
Curve relies on smart contracts instead of middlemen to offer financial services such as stablecoin borrowing, trading and lending to users. Depositors on Curve earn annual yields of up to 4% from one of the many pools on the platform.
A number of stablepools (alETH/msETH/pETH) using Vyper 0.2.15 have been exploited as a result of a malfunctioning reentrancy lock. We are assessing the situation and will update the community as things develop.
Other pools are safe. https://t.co/eWy2d3cDDj
— Curve Finance (@CurveFinance) July 30, 2023
Upwards of $100 million worth of cryptocurrency are at risk due to a “re-entrancy” bug in Vyper, a programming language used to power parts of the Curve system. Several stablecoin pools on the platform — used for pricing and liquidity on a number of different DeFi services — have been drained by hackers so far.
"As a result of an issue in Vyper compiler in versions 0.2.15-0.3.0, following pools were hacked: crv/eth, aleth/eth, mseth/eth, peth/eth," Curve tweeted Monday.
As a result of an issue in Vyper compiler in versions 0.2.15-0.3.0, following pools were hacked:
Another pool potentially affected is arbitrum’s tricrypto. Auditors and Vyper devs could not find a profitable exploit, but please exit that one
— Curve Finance (@CurveFinance) July 31, 2023
Reentrancy is a common bug that allows attackers to trick a smart contract by making repeated calls to a protocol in order to steal assets. A call is authorization for the smart contract address to interact with a user’s wallet address.
Other projects that use the Vyper programming language could share the same vulnerability.
It was unclear at press time how much had been drained from Curve as a result of the attack. BlockSec, a blockchain auditing firm, estimated the total losses above $42 million in a preliminary analysis posted to Twitter. Tarun Chitra, chief executive officer and founder of crypto risk modeling firm Gauntlet, estimated the exploiter made away with about $20 million of CRV and a version of ether.
Curve operates 232 different pools, according to its website, but only pools using Vyper versions 0.2.15, 0.2.16 and 0.3.0 are at risk, said mimaklas, a member of the team in a Discord announcement.
Mimaklas also said that "all affected pools have been drained or white hacked, and the team is assessing the situation with affected teams."
Elsewhere, lending and borrowing protocol Aave disabled its CRV borrowing function amid the panic. A massive $100 million CRV debt from Curve founder Michael Egorov on Aave is nearing liquidation - and if CRV prices were to continue to rise and reach the liquidation threshold, the protocols will have to liquidate the CRV positions.
Please note that this reentrancy issue is associated with the use of 'use_eth', which could potentially place the WETH-related pools in jeopardy! @CurveFinance , please DM us if you need any help. https://t.co/vjc1RRce7w pic.twitter.com/Wz8DXJZK7Y
— BlockSec (@BlockSecTeam) July 30, 2023
Whitehat Sends Funds; CRV Sinks
Curve Finance has managed to get some money back thanks to bot operator ‘c0ffeebabe.eth’ returning 2,879 ETH, worth nearly $5.5 million at current prices, to the platform. These funds were ethically stolen from the hacker by front-running their malicious transaction.
The heist destabilized trading markets for Curve DAO’s native CRV token, which was down 17% on the day at a price of $0.61 as of press time. That price action threatened to compound the chaos by potentially forcing a liquidation on the founder of Curve’s $70 million borrowing position on Aave.
Meanwhile, the total value of assets locked on Curve nosedived to $1.7 billion on Monday from more than $3 billion on Sunday, according to data provider DeFiLlama, as investor capital likely fled the exchange.
UPDATE (July 30, 2023, 21:25 UTC): Adds additional information.
UPDATE (July 30, 2023, 09:30 UTC): Updates with latest comments from Curve, contagion effects on Aave, drop in Curve DeFi value, and explains reentrancy attack.