Skip to main content
QUICK REVIEW

[Paper Review] SoK: Decentralized Finance (DeFi) Attacks

Liyi Zhou, Xihan Xiong|arXiv (Cornell University)|Aug 27, 2022
Blockchain Technology Applications and SecurityComputer Science4 citations
TL;DR

This paper introduces a comprehensive reference frame to systemically analyze and compare DeFi incidents, identifying key attack patterns and defense mechanisms. It reveals that 56% of attacks are non-atomic, enabling rescue windows, and shows that bytecode similarity can detect 31 vulnerable and 23 adversarial contracts, while 15.3% of attackers leak identifiable traces via centralized exchanges.

ABSTRACT

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.

Motivation & Objective

  • To establish a standardized framework for classifying and comparing DeFi incidents across protocols, smart contracts, and attack vectors.
  • To identify critical gaps between academic research and real-world attack patterns, especially in under-researched areas like price oracle attacks and permissionless interactions.
  • To evaluate practical defense mechanisms, including contract similarity analysis and pre-attack fund tracing, to improve incident response and mitigation.
  • To quantify the financial impact of DeFi incidents, showing a total loss of $3.24B from 2018 to 2022, and assess the feasibility of proactive detection.

Proposed method

  • Develops a five-layer DeFi reference frame encompassing network, consensus, smart contract, protocol, and auxiliary services (e.g., oracles, bridges) to standardize incident classification.
  • Collects and analyzes 181 real-world DeFi incidents from Ethereum and BNB Smart Chain between April 2018 and April 2022, cross-referenced with 77 academic papers and 30 audit reports.
  • Applies bytecode similarity analysis to detect known malicious or vulnerable contracts by comparing transaction-level bytecode with previously observed attack patterns.
  • Traces adversarial fund flows using pre-incident transaction footprints, identifying connections to centralized exchanges and sanctioned mixers like Tornado Cash.
  • Quantifies attack time frames by determining whether attacks are atomic or non-atomic, enabling identification of potential rescue opportunities.
  • Uses cumulative abnormal return (CAR) analysis to assess market impact, with CAR calculated via regression-based expected returns and abnormal return computation.

Experimental results

Research questions

  • RQ1How can DeFi incidents be systematically categorized and compared across different system layers and threat models?
  • RQ2What are the most frequent attack types in practice, and how do they differ from those emphasized in academic literature?
  • RQ3To what extent can existing defense mechanisms—such as bytecode similarity analysis and fund tracing—detect or mitigate real-world DeFi attacks?
  • RQ4What proportion of attacks are non-atomic, and can this enable timely defensive interventions?
  • RQ5How do adversarial actors source and launder funds, and can their identities be linked through on-chain analysis?

Key findings

  • Of the 181 incidents analyzed, 103 (56%) were not executed atomically, creating a potential window for defenders to intervene before final settlement.
  • Bytecode similarity analysis successfully identified 31 previously known vulnerable contracts and 23 adversarial contracts with 100% similarity scores, indicating strong potential for automated detection.
  • 15.3% of attackers leaked identifiable information by interacting with centralized exchanges, with 12 and 21 attackers directly withdrawing funds from exchange wallets on Ethereum and BNB Smart Chain, respectively.
  • 33 attackers (15.3%) were linked to the US-sanctioned Tornado Cash mixer, with 55 and 12 attack funds originating from Tornado Cash on Ethereum and BNB Smart Chain.
  • Price oracle attacks and permissionless interactions were the two most frequent incident types (15% and 10.5%), yet they were underrepresented in academic literature.
  • The total financial loss from DeFi incidents between April 2018 and April 2022 reached at least $3.24 billion USD, highlighting the scale of the security challenge.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.