Within just four years, the blockchain-based Decentralized Finance (DeFi) ecosystem has accumulated a peak total value locked (TVL) of more than 253 billion USD. This surge in DeFi's popularity has, unfortunately, been accompanied by many impactful incidents. According to our data, users, liquidity providers, speculators, and protocol operators suffered a total loss of at least 3.24 billion USD from Apr 30, 2018 to Apr 30, 2022. Given the blockchain's transparency and increasing incident frequency, two questions arise: How can we systematically measure, evaluate, and compare DeFi incidents? How can we learn from past attacks to strengthen DeFi security? In this paper, we introduce a common reference frame to systematically evaluate and compare DeFi incidents, including both attacks and accidents. We investigate 77 academic papers, 30 audit reports, and 181 real-world incidents. Our data reveals several gaps between academia and the practitioners' community. For example, few academic papers address "price oracle attacks" and "permissonless interactions", while our data suggests that they are the two most frequent incident types (15% and 10.5% correspondingly). We also investigate potential defenses, and find that: (i) 103 (56%) of the attacks are not executed atomically, granting a rescue time frame for defenders; (ii) SoTA bytecode similarity analysis can at least detect 31 vulnerable/23 adversarial contracts; and (iii) 33 (15.3%) of the adversaries leak potentially identifiable information by interacting with centralized exchanges.
翻译:在短短四年内,基于区块链的DeFi生态系统累计了超过2530亿美元的最大总锁定价值(TVL)。不幸的是,DeFi的热度伴随着许多重大事件。根据我们的数据,从2018年4月30日到2022年4月30日,用户、流动性提供者、投机者和协议运营商总损失至少32.4亿美元。鉴于区块链的透明度和不断增加的事件频率,我们需要回答两个问题:我们如何系统地衡量、评估和比较DeFi事件?我们如何从过去的攻击中学习以加强DeFi安全性?在本文中,我们介绍一个公共参考框架,以系统地评估和比较DeFi事件,包括攻击和事故。我们调查了77篇学术论文、30份审计报告和181个真实世界的事件。我们的数据揭示了学术界和从业者社区之间的几个差距。例如,很少有学术论文涉及“价格预言机攻击”和“非许可交互”,而我们的数据表明它们是两种最常见的事件类型(分别为15%和10.5%)。我们还调查了潜在的防御措施,并发现:(i)103(56%)的攻击不是原子执行的,为防御者提供了拯救时间窗口;(ii)SoTA字节码相似度分析至少可以检测到31个易受攻击/ 23个敌对合同;以及(iii)33(15.3%)的对手通过与中心化交易所交互泄漏潜在可识别信息。