# GasTrace: Detecting Sandwich Attack Malicious Accounts in Ethereum

arXiv: https://arxiv.org/abs/2405.19971 · HTML: https://mlsanity.com/paper/2405.19971/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 9 of its 17 references that are in the map.
- First posted on arXiv 30 May 2024.

## Builds on (most cited first, 9 of 9)

- [High-Frequency Trading on Decentralized On-Chain Exchanges](https://mlsanity.com/paper/2009.14021/) (2020)
- [Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum Blockchain](https://mlsanity.com/paper/2102.03347/) (2021)
- [AuthROS: Secure Data Sharing Among Robot Operating Systems Based on Ethereum](https://mlsanity.com/paper/2208.14269/) (2022)
- [Characterizing Erasable Accounts in Ethereum](https://mlsanity.com/paper/2009.00607/) (2020)
- [CLUE: Towards Discovering Locked Cryptocurrencies in Ethereum](https://mlsanity.com/paper/2012.01370/) (2020)
- [Graph Bayesian Optimization for Multiplex Influence Maximization](https://mlsanity.com/paper/2403.18866/) (2024)
- [Eliminating Sandwich Attacks with the Help of Game Theory](https://mlsanity.com/paper/2202.03762/) (2022)
- [An Overview of AI and Blockchain Integration for Privacy-Preserving](https://mlsanity.com/paper/2305.03928/) (2023)
- [Maximizing Extractable Value from Automated Market Makers](https://mlsanity.com/paper/2106.01870/) (2021)

## Built on by (most cited first, 5 of 5)

- [AI-Based Vulnerability Analysis of NFT Smart Contracts](https://mlsanity.com/paper/2504.16113/) (2025)
- [A Comprehensive Study of Exploitable Patterns in Smart Contracts: From Vulnerability to Defense](https://mlsanity.com/paper/2504.21480/) (2025)
- [Information Security Based on LLM Approaches: A Review](https://mlsanity.com/paper/2507.18215/) (2025)
- [UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysis](https://mlsanity.com/paper/2508.01343/) (2025)
- [Facial Recognition Leveraging Generative Adversarial Networks](https://mlsanity.com/paper/2505.11884/) (2025)

## Abstract (arXiv)

The openness and transparency of Ethereum transaction data make it easy to be exploited by any entities, executing malicious attacks. The sandwich attack manipulates the Automated Market Maker (AMM) mechanism, profiting from manipulating the market price through front or after-running transactions. To identify and prevent sandwich attacks, we propose a cascade classification framework GasTrace. GasTrace analyzes various transaction features to detect malicious accounts, notably through the analysis and modeling of Gas features. In the initial classification, we utilize the Support Vector Machine (SVM) with the Radial Basis Function (RBF) kernel to generate the predicted probabilities of accounts, further constructing a detailed transaction network. Subsequently, the behavior features are captured by the Graph Attention Network (GAT) technique in the second classification. Through cascade classification, GasTrace can analyze and classify the sandwich attacks. Our experimental results demonstrate that GasTrace achieves a remarkable detection and generation capability, performing an accuracy of 96.73% and an F1 score of 95.71% for identifying sandwich attack accounts.
