FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven Approximation
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 21 Jun 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025PoCo: Agentic Proof-of-Concept Exploit Generation for Smart Contractscited by 7
- 2025Detecting Various DeFi Price Manipulations with LLM Reasoningcited by 4
- 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Modelscited by 2
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysiscited by 1
- 2026DeFiFusion: Combining Transaction Events with Smart Contracts to Detect Price Manipulation Attackscited by 0
- 2026DeFiFusion: Combining Transaction Events with Smart Contracts to Detect Price Manipulation Attacks10 Sep 2026
- 2025PoCo: Agentic Proof-of-Concept Exploit Generation for Smart Contracts4 Nov 2025
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysis2 Aug 2025
- 2025Detecting Various DeFi Price Manipulations with LLM Reasoning17 Feb 2025
- 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models11 Feb 2025