Lune

ICSE2024顶会

FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven Approximation

Zhiyang Chen, Sidi Mohamed Beillahi, Fan Long

摘要

In decentralized finance (DeFi), lenders can offer flash loans to borrowers, i.e., loans that are only valid within a blockchain transaction and must be repaid with fees by the end of that transaction. Unlike normal loans, flash loans allow borrowers to borrow large assets without upfront collaterals deposits. Malicious adversaries use flash loans to gather large assets to exploit vulnerable DeFi protocols. In this paper, we introduce a new framework for automated synthesis of adversarial transactions that exploit DeFi protocols using flash loans. To bypass the complexity of a DeFi protocol, we propose a new technique to approximate the DeFi protocol functional behaviors using numerical methods (polynomial linear regression and nearest-neighbor interpolation). We then construct an optimization query using the approximated functions of the DeFi protocol to find an adversarial attack constituted of a sequence of functions invocations with optimal parameters that gives the maximum profit. To improve the accuracy of the approximation, we propose a novel counterexample driven approximation refinement technique. We implement our framework in a tool named FlashSyn. We evaluate FlashSyn on 16 DeFi protocols that were victims to flash loan attacks and 2 DeFi protocols from Damn Vulnerable DeFi challenges. FlashSyn automatically synthesizes an adversarial attack for 16 of the 18 benchmarks. Among the 16 successful cases, FlashSyn identifies attack vectors yielding higher profits than those employed by historical hackers in 3 cases, and also discovers multiple distinct attack vectors in 10 cases, demonstrating its effectiveness in finding possible flash loan attacks.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • DeFort: Automatic Detection and Analysis of Price Manipulation Attacks in DeFi Applications 引用了 ZEUS: Analyzing Safety of Smart Contracts
  • DeFort: Automatic Detection and Analysis of Price Manipulation Attacks in DeFi Applications 引用了 Making Smart Contracts Smarter
  • DeFort: Automatic Detection and Analysis of Price Manipulation Attacks in DeFi Applications 引用了 Securify: Practical Security Analysis of Smart Contracts
  • ZEUS: Analyzing Safety of Smart Contracts 引用了 Making Smart Contracts Smarter
  • Detecting Various DeFi Price Manipulations with LLM Reasoning 引用了 DeFort: Automatic Detection and Analysis of Price Manipulation Attacks in DeFi Applications
  • Detecting Various DeFi Price Manipulations with LLM Reasoning 引用了 Demystifying Invariant Effectiveness for Securing Smart Contracts
  • sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
  • sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 Making Smart Contracts Smarter
  • Safeguarding DeFi Smart Contracts against Oracle Deviations 引用了 ZEUS: Analyzing Safety of Smart Contracts
  • Safeguarding DeFi Smart Contracts against Oracle Deviations 引用了 Making Smart Contracts Smarter
  • Safeguarding DeFi Smart Contracts against Oracle Deviations 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • Safeguarding DeFi Smart Contracts against Oracle Deviations 引用了 SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
  • Safeguarding DeFi Smart Contracts against Oracle Deviations 引用了 Securify: Practical Security Analysis of Smart Contracts
  • FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi Protocols 引用了 Making Smart Contracts Smarter
  • FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi Protocols 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi Protocols 引用了 SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
  • FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi Protocols 引用了 Securify: Practical Security Analysis of Smart Contracts
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 ZEUS: Analyzing Safety of Smart Contracts
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 Making Smart Contracts Smarter
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Demystifying Invariant Effectiveness for Securing Smart Contracts 引用了 Making Smart Contracts Smarter
  • Demystifying Invariant Effectiveness for Securing Smart Contracts 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • Demystifying Invariant Effectiveness for Securing Smart Contracts 引用了 Safeguarding DeFi Smart Contracts against Oracle Deviations
  • Demystifying Invariant Effectiveness for Securing Smart Contracts 引用了 SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
  • Securify: Practical Security Analysis of Smart Contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
  • Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Demystifying Invariant Effectiveness for Securing Smart ContractsZhiyang Chen, Ye Liu, Sidi Mohamed Beillahi, Yi Li 等FSE 2024 · 15 次引用
  2. Safeguarding DeFi Smart Contracts against Oracle DeviationsXun Deng, Sidi Mohamed Beillahi, Cyrus Minwalla, Han Du 等ICSE 2024 · 12 次引用
  3. DeFort: Automatic Detection and Analysis of Price Manipulation Attacks in DeFi ApplicationsMaoyi Xie, Ming Hu, Ziqiao Kong, Cen Zhang 等ISSTA 2024 · 9 次引用
  4. FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi ProtocolsHongbo Wen, Hanzhi Liu, Jiaxin Song, Yanju Chen 等CCS 2024 · 6 次引用
  5. Detecting Various DeFi Price Manipulations with LLM ReasoningJuantao Zhong, Daoyuan Wu, Ye Liu, Maoyi Xie 等ASE 2025 · 3 次引用

它引用的 Paper12

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
  2. Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 1,108 次引用
  3. ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 次引用
  4. sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin 等ICSE 2020 · 260 次引用
  5. SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow AnalysesJaeseung Choi, Doyeon Kim, Soomin Kim, Gustavo Grieco 等ASE 2021 · 164 次引用

相关 Paper

  1. The Blockchain Imitation GameKaihua Qin, Stefanos Chaliasos, Liyi Zhou, Benjamin Livshits 等USENIX Security 2023
  2. On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi ProtocolsLiyi Zhou, Kaihua Qin, Antoine Cully, Benjamin Livshits 等S&P 2021 · 148 次引用
  3. HOUSTON: Real-Time Anomaly Detection of Attacks against Ethereum DeFi ProtocolsDongyu Meng, Fabio Gritti, Robert McLaughlin, Nicola Ruaro 等NDSS 2026 · 2 次引用
  4. Summary-Based Symbolic Evaluation for Smart ContractsYu Feng, Emina Torlak, Rastislav BodíkASE 2020 · 15 次引用
  5. FairChecker: Detecting Fund-Stealing Bugs in DeFi Protocols via Fairness ValidationYi Sun, Zhuo Zhang, Xiangyu ZhangICSE 2025
黄昏的海面,两侧是细线勾勒的悬崖