Lune

S&P2021顶会

On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols

Liyi Zhou, Kaihua Qin, Antoine Cully, Benjamin Livshits, Arthur Gervais

摘要

Decentralized Finance (DeFi) is a blockchain-asset-enabled finance ecosystem with millions of daily USD transaction volume, billions of locked up USD, as well as a plethora of newly emerging protocols (for lending, staking, and exchanges). Because all transactions, user balances, and total value locked in DeFi are publicly readable, a natural question that arises is: how can we automatically craft profitable transactions across the intertwined DeFi platforms?In this paper, we investigate two methods that allow us to automatically create profitable DeFi trades, one well-suited to arbitrage and the other applicable to more complicated settings. We first adopt the Bellman-Ford-Moore algorithm with DeFiPoser-ARB and then create logical DeFi protocol models for a theorem prover in DeFiPoser-SMT. While DeFiPoser-ARB focuses on DeFi transactions that form a cycle and performs very well for arbitrage, DeFiPoser-SMT can detect more complicated profitable transactions. We estimate that DeFiPoser-ARB and DeFiPoser-SMT can generate an average weekly revenue of 191.48 ETH (76,592 USD) and 72.44 ETH (28,976 USD) respectively, with the highest transaction revenue being 81.31 ETH (32,524 USD) and 22.40 ETH (8,960 USD) respectively. We further show that DeFiPoser-SMT finds the known economic bZx attack from February 2020, which yields 0.48M USD. Our forensic investigations show that this opportunity existed for 69 days and could have yielded more revenue if exploited one day earlier. Our evaluation spans 150 days, given 96 DeFi protocol actions, and 25 assets.Looking beyond the financial gains mentioned above, forks deteriorate the blockchain consensus security, as they increase the risks of double-spending and selfish mining. We explore the implications of DeFiPoser-ARB and DeFiPoser-SMT on blockchain consensus. Specifically, we show that the trades identified by our tools exceed the Ethereum block reward by up to 874×. Given optimal adversarial strategies provided by a Markov Decision Process (MDP), we quantify the value threshold at which a profitable transaction qualifies as Miner Extractable Value (MEV) and would incentivize MEV-aware miners to fork the blockchain. For instance, we find that on Ethereum, a miner with a hash rate of 10% would fork the blockchain if an MEV opportunity exceeds 4× the block reward.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 30 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • teEther: Gnawing at Ethereum to Automatically Exploit Smart Contracts 引用了 Making Smart Contracts Smarter
  • Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? 引用了 Making Smart Contracts Smarter
  • Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Understanding Security Issues in the NFT Ecosystem 引用了 Making Smart Contracts Smarter
  • Understanding Security Issues in the NFT Ecosystem 引用了 Quantifying Blockchain Extractable Value: How dark is the forest?
  • Understanding Security Issues in the NFT Ecosystem 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Blockchain Censorship 引用了 Impact and User Perception of Sandwich Attacks in the DeFi Ecosystem
  • Blockchain Censorship 引用了 Quantifying Blockchain Extractable Value: How dark is the forest?
  • Impact and User Perception of Sandwich Attacks in the DeFi Ecosystem 引用了 On the Security and Performance of Proof of Work Blockchains
  • Impact and User Perception of Sandwich Attacks in the DeFi Ecosystem 引用了 Quantifying Blockchain Extractable Value: How dark is the forest?
  • Quantifying Blockchain Extractable Value: How dark is the forest? 引用了 On the Security and Performance of Proof of Work Blockchains
  • Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper30

  1. Quantifying Blockchain Extractable Value: How dark is the forest?Kaihua Qin, Liyi Zhou, Arthur GervaisS&P 2022 · 336 次引用
  2. Understanding Security Issues in the NFT EcosystemDipanjan Das, Priyanka Bose, Nicola Ruaro, Christopher Kruegel 等CCS 2022 · 173 次引用
  3. Blockchain CensorshipAnton Wahrstätter, Jens Ernstberger, Aviv Yaish, Liyi Zhou 等WWW 2024 · 60 次引用
  4. Impact and User Perception of Sandwich Attacks in the DeFi EcosystemYe Wang, Patrick Zuest, Yaxing Yao, Zhicong Lu 等CHI 2022 · 52 次引用
  5. Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners?Stefanos Chaliasos, Marcos Antonios Charalambous, Liyi Zhou, Rafaila Galanopoulou 等ICSE 2024 · 49 次引用

它引用的 Paper9

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
  2. On the Security and Performance of Proof of Work BlockchainsArthur Gervais, Ghassan O. Karame, Karl Wüst, Vasileios Glykantzis 等CCS 2016 · 1,668 次引用
  3. Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 1,108 次引用
  4. Directed Greybox FuzzingMarcel Böhme, Van-Thuan Pham, Manh-Dung Nguyen, Abhik RoychoudhuryCCS 2017 · 836 次引用
  5. teEther: Gnawing at Ethereum to Automatically Exploit Smart ContractsJohannes Krupp, Christian RossowUSENIX Security 2018 · 345 次引用

相关 Paper

  1. Demystifying DeFi MEV Activities in Flashbots BundleZihao Li, Jianfeng Li, Zheyuan He, Xiapu Luo 等CCS 2023 · 29 次引用
  2. Clockwork Finance: Automated Analysis of Economic Security in Smart ContractsKushal Babel, Philip Daian, Mahimna Kelkar, Ari JuelsS&P 2023
  3. FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven ApproximationZhiyang Chen, Sidi Mohamed Beillahi, Fan LongICSE 2024 · 21 次引用
  4. MEVisor: High-Throughput MEV Discovery in DEXs with GPU ParallelismWeimin Chen, Xiapu LuoNDSS 2026 · 1 次引用
  5. Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus InstabilityPhilip Daian, Steven Goldfeder, Tyler Kell, Yunqi Li 等S&P 2020 · 607 次引用
黄昏的海面,两侧是细线勾勒的悬崖