QUADRIGA INITIATIVE
CRYPTO WATCHDOG & FRAUD RECOVERY PLATFORM
A COMMUNITY-BASED, NOT-FOR-PROFIT
$11 000 000 USD
FEBRUARY 2021
GLOBAL
YEARN FINANCE
DESCRIPTION OF EVENTS

"Yearn Finance is a suite of products in Decentralized Finance (DeFi) that provides lending aggregation, yield generation, and insurance on the Ethereum blockchain. The protocol is maintained by various independent developers and is governed by YFI holders."
"Yearn Finance, the yield aggregation protocol founded by Andre Cronje, has been hacked. One of the platform’s so-called vaults lost $11M, and the attacker got away with $2.8M."
"Yearn v1 yDAI vault was attacked and the attackers stole 2.8 million US dollars. Banteg, the core developer of Yearn finance, subsequently stated that the attacker received 2.8 million US dollars and vault lost 11 million US dollars. During the investigation period, deposits into v1 DAI, TUSD, USDC, USDT vault will be prohibited." "[T]he attack’s nature could be categorized as an arbitrage. The hacker used a flash loan to borrow millions in crypto assets, use those assets as collateral to borrow more crypto, then repeatedly deposited those borrowed assets in a Yearn pool. The exploit consisted in manipulating the Dai rate in the pool, and benefitting from that rate by exchanging the liquidity provider tokens earned for stablecoins."
"The hacker took out a series of flash loans from dYdX and Aave, then used the funds as collateral for another loan on Compound. In doing this, the attacker essentially gamed the exchange rates on Yearn to accumulate CRV tokens to sell for stablecoins."
"At a high level, the exploiter was able to profit through the following steps: (1) Debalance the exchange rate between stablecoins in Curve's 3CRV pool. (2) Make the yDAI vault deposit into the pool at an unfavorable exchange rate. (3) Reverse the imbalance caused in step 1. This pattern was repeated in a series of 11 transactions executed over 38 minutes before being mitigated."
"At 21:45 (UTC), Andre Cronje notices the complex transaction pattern of a contract that is interacting with Yearn vaults. Yearn's security team is called into action, and what eventually is determined to be an active exploit on Yearn's v1 yDAI vault, is mitigated 11 minutes later."
"The fast response leads to 24m DAI out of the vault's total 35m DAI AUM being saved, with 11m DAI being lost as part of the exploit. The profit of the exploiter is estimated to be 2.7m DAI."
"yearn.finance reports that a confluence of three factors led to the vulnerability. “[First], the hacked vault’s slippage protection was set too loose at 1%. [Second], the normal 0.5% withdrawal fee was set to 0%, to encourage migrations to v2 vaults without incurring costs. [And third], this being a v1 vault, the exploiter was able to call earn() and push deposits into the vault’s strategy at will.”"
"The hack brought sarcastic comments hailing DeFi as “the future of finance,” as well as people questioning open finance’s uncensorable nature considering Yearn deposits were disabled, not entirely different from Robinhood’s limiting of GME stock purchases last week."
"Still, others applauded the team’s quick reaction: it took 10 minutes and 14 seconds according to lead developer Banteg to mitigate the issue, a process which needed multiple players due to the multi-sig quorum required to modify the smart contracts." "By applying setMin(0) to the yDAI vault, deposits into the strategy were effectively disabled, preventing further exploits from taking place."
"Not everyone is unhappy either: other liquidity providers who staked on Curve’s 3pool received $3.5M in total. In response, Tether has frozen the 1.7M USDT stolen in the attack, again casting a shadow on just how decentralized crypto really is. All eyes now wait for the Yearn team’s postmortem."
"The team at Yearn.Finance has released a detailed post-mortem report regarding the recent exploit. Tether Ltd, the world’s largest stablecoin issuer, has also frozen $1.7 million in USDT that was allegedly involved in this security breach, Tether CTO Paolo Ardoino confirmed."
"Yearn announced Tuesday that they opened a Maker vault with YFI tokens from the treasury and minted 9.7 million DAI tokens from the vault to keep the yDAI vault intact. Using borrowed money allows the project to reimburse users without taking a hit to the treasury, either due to possible YFI appreciation or by gradually repaying the debt with protocol revenue. The team said that this is a one-off occurrence, as they expect users to hedge their own risks by purchasing coverage from Yearn ecosystem member Cover, which also got hacked recently."
The Yearn Finance project was exploited, and the hacker made off with $2.7m, out of $11m removed from the platform. Had the team not reacted quickly to fix the issue within 10 minutes, the damage could have been far worse.
HOW COULD THIS HAVE BEEN PREVENTED?
In general, it's impossible to know that a decentralized smart contract is secure. We can only know that an exploit either doesn't exist or hasn't been exploited yet.
On the other hand, offline multi-signature wallets have a known security model where multiple trusted individuals must sign for the release of funds. This sets their security to be the combined security of all signatories required to release the funds.
Rekt - Leaderboard (May 13)
Rekt - Yearn - REKT (May 16)
2021's First Major DeFi Hack Explained (May 18)
SlowMist Hacked - SlowMist Zone (May 18)
Hacker Spends $8.3 Million in Fees to Attack Yearn Finance | Crypto Briefing (May 18)
Yearn.Finance puts expanded treasury to use by repaying victims of $11M hack (May 18)
DeFi Platform Yearn.Finance's DAI Vault Suffers Major Exploit, Hack Leads to $11 Million in Value Drained from Platforms (May 18)
yearn-security/2021-02-04.md at master · yearn/yearn-security · GitHub (May 18)
Yearn Finance DAI Vault 'Has Suffered an Exploit'; $11M Drained - CoinDesk (May 18)
Paying Claims For The Yearn Hack (Jun 26)
@NexusMutual Twitter (Jun 26)
blocksec-incidents/2021.md at main · openblocksec/blocksec-incidents · GitHub (Aug 11)
The Ydai Incident Analysis Forced Investment (Aug 11)
Slowmist A Brief Analysis Of Yearn Finance Being Hacked (Aug 11)
Explained: Inside the Yearn v1 yDAI Hack (Feb 2021) - Halborn (Aug 11)
security/2021-02-05-Yearn.md at master · OriginProtocol/security · GitHub (Aug 11)
Ethereum Transaction Hash (Txhash) Details | Etherscan (Aug 11)
Tether Freezes $1.7 Million in Profits From Yearn Finance Hack - Decrypt (Aug 11)
Comprehensive List of DeFi Hacks & Exploits - CryptoSec (Jan 8)
$11 Million Gone in Yearn Finance Exploit - Decrypt (Jan 8)
yearn.finance (Jan 8)
https://docs.yearn.finance/getting-started/intro (Jan 8)
Yearn Finance suffers exploit, says $2.8 million stolen by attacker out of $11 million loss (Feb 8)
Yearn Finance DAI Vault 'Has Suffered an Exploit'; $11M Drained - CoinDesk (Feb 8)
