利用闪付贷款攻击DeFi生态系统,获取乐趣和利润
Attacking the DeFi Ecosystem with Flash Loans for Fun and Profit
摘要:
信贷允许贷方将剩余资本贷给借方。在传统经济中,信贷承担着借款人可能拖欠债务的风险,因此贷款人要求借款人提供预付抵押品,外加利息费用。由于区块链交易的原子性,贷方可以提供闪电贷款,即,仅在一笔交易内有效的贷款,必须在交易结束时偿还。这一概念导致了许多有趣的攻击可能性,其中一些在2020年2月被利用。本文首次探讨了交易原子性和闪贷对新生的去中心化金融(DeFi)生态系统的影响。我们定量地展示了交易原子性如何增加套利收益。此外,我们分析了两个现有的攻击ROI超过500k%。我们将寻找攻击参数作为底层以太坊区块链状态和DeFi生态系统状态的优化问题。我们展示了恶意攻击者如何有效地最大化攻击利润,从而进一步破坏DeFi生态系统。具体来说,我们介绍了两个先前执行的攻击如何“提升”,分别获得829.5k美元和110万美元的利润,分别是2.37倍和1.73倍。
英文摘要:
Credit allows a lender to loan out surplus capital to a borrower. In the traditional economy, credit bears the risk that the borrower may default on its debt, the lender hence requires upfront collateral from the borrower, plus interest fee payments. Due to the atomicity of blockchain transactions, lenders can offer flash loans, i.e., loans that are only valid within one transaction and must be repaid by the end of that transaction. This concept has lead to a number of interesting attack possibilities, some of which were exploited in February 2020. This paper is the first to explore the implication of transaction atomicity and flash loans for the nascent decentralized finance (DeFi) ecosystem. We show quantitatively how transaction atomicity increases the arbitrage revenue. We moreover analyze two existing attacks with ROIs beyond 500k%. We formulate finding the attack parameters as an optimization problem over the state of the underlying Ethereum blockchain and the state of the DeFi ecosystem. We show how malicious adversaries can efficiently maximize an attack profit and hence damage the DeFi ecosystem further. Specifically, we present how two previously executed attacks can be "boosted" to result in a profit of 829.5k USD and 1.1M USD, respectively, which is a boost of 2.37x and 1.73x, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。