Lune

CCS2023Top-tier venue

Lanturn: Measuring Economic Security of Smart Contracts Through Adaptive Learning

Kushal Babel, Mojan Javaheripi, Yan Ji, Mahimna Kelkar, Farinaz Koushanfar, Ari Juels

Abstract

We introduce Lanturn: a general purpose adaptive learning-based framework for measuring the cryptoeconomic security of composed decentralized-finance (DeFi) smart contracts. Lanturn discovers strategies comprising of concrete transactions for extracting economic value from smart contracts interacting with a particular transaction environment. We formulate the strategy discovery as a black-box optimization problem and leverage a novel adaptive learning-based algorithm to address it. Lanturn features three key properties. First, it needs no contractspecific heuristics or reasoning, due to our black-box formulation of cryptoeconomic security. Second, it utilizes a simulation framework that operates natively on blockchain state and smart contract machine code, such that transactions returned by Lanturn's learning-based optimization engine can be executed on-chain without modification. Finally, Lanturn is scalable in that it can explore strategies comprising a large number of transactions that can be reordered or subject to insertion of new transactions. We evaluate Lanturn on the historical data of the biggest and most active DeFi Applications: Sushiswap, UniswapV2, UniswapV3, and AaveV2. Our results show that Lanturn not only rediscovers existing, well-known strategies for extracting value from smart contracts, but also discovers new strategies that are previously undocumented. Lanturn also consistently discovers higher value than evidenced in the wild, surpassing a natural baseline computed using value extracted by bots and other strategic agents.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Decentralization of Ethereum's Builder Market cites Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability
  • Decentralization of Ethereum's Builder Market cites High-Frequency Trading on Decentralized On-Chain Exchanges
  • Rolling in the Shadows: Analyzing the Extraction of MEV Across Layer-2 Rollups cites Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability
  • Rolling in the Shadows: Analyzing the Extraction of MEV Across Layer-2 Rollups cites Quantifying Blockchain Extractable Value: How dark is the forest?
  • On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols cites High-Frequency Trading on Decentralized On-Chain Exchanges
  • Stealing Trust: Unraveling Blind Message Attacks in Web3 Authentication cites Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability
  • Stealing Trust: Unraveling Blind Message Attacks in Web3 Authentication cites On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols
  • Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum Blockchain cites High-Frequency Trading on Decentralized On-Chain Exchanges
  • MEVisor: High-Throughput MEV Discovery in DEXs with GPU Parallelism cites Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability
  • MEVisor: High-Throughput MEV Discovery in DEXs with GPU Parallelism cites Rolling in the Shadows: Analyzing the Extraction of MEV Across Layer-2 Rollups
  • MEVisor: High-Throughput MEV Discovery in DEXs with GPU Parallelism cites On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols
  • MEVisor: High-Throughput MEV Discovery in DEXs with GPU Parallelism cites Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum Blockchain
  • MEVisor: High-Throughput MEV Discovery in DEXs with GPU Parallelism cites Quantifying Blockchain Extractable Value: How dark is the forest?
  • Quantifying Blockchain Extractable Value: How dark is the forest? cites Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability
  • Quantifying Blockchain Extractable Value: How dark is the forest? cites On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols
  • Quantifying Blockchain Extractable Value: How dark is the forest? cites High-Frequency Trading on Decentralized On-Chain Exchanges
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Rolling in the Shadows: Analyzing the Extraction of MEV Across Layer-2 RollupsChristof Ferreira Torres, Albin Mamuti, Ben Weintraub, Cristina Nita-Rotaru et al.CCS 2024 · 12 citations
  2. Stealing Trust: Unraveling Blind Message Attacks in Web3 AuthenticationKailun Yan, Xiaokuan Zhang, Wenrui DiaoCCS 2024 · 5 citations
  3. MEVisor: High-Throughput MEV Discovery in DEXs with GPU ParallelismWeimin Chen, Xiapu LuoNDSS 2026 · 1 citation
  4. Decentralization of Ethereum's Builder MarketSen Yang, Kartik Nayak, Fan ZhangS&P 2025
  5. Elastic Restaking Networks: United we fall, (partially) divided we standRoi Bar Zur, Ittay EyalCCS 2025

Builds on7

  1. Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus InstabilityPhilip Daian, Steven Goldfeder, Tyler Kell, Yunqi Li et al.S&P 2020 · 607 citations
  2. Quantifying Blockchain Extractable Value: How dark is the forest?Kaihua Qin, Liyi Zhou, Arthur GervaisS&P 2022 · 336 citations
  3. High-Frequency Trading on Decentralized On-Chain ExchangesLiyi Zhou, Kaihua Qin, Christof Ferreira Torres, Duc Viet Le et al.S&P 2021 · 243 citations
  4. Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum BlockchainChristof Ferreira Torres, Ramiro Camino, Radu StateUSENIX Security 2021 · 179 citations
  5. On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi ProtocolsLiyi Zhou, Kaihua Qin, Antoine Cully, Benjamin Livshits et al.S&P 2021 · 148 citations

Related papers

  1. Clockwork Finance: Automated Analysis of Economic Security in Smart ContractsKushal Babel, Philip Daian, Mahimna Kelkar, Ari JuelsS&P 2023
  2. Verifying Economic Security of Smart Contracts via Unintended ReturnYi Rong, Xupeng Li, Ronghui GuOOPSLA 2026
  3. FlashSyn: Flash Loan Attack Synthesis via Counter Example Driven ApproximationZhiyang Chen, Sidi Mohamed Beillahi, Fan LongICSE 2024 · 21 citations
  4. HOUSTON: Real-Time Anomaly Detection of Attacks against Ethereum DeFi ProtocolsDongyu Meng, Fabio Gritti, Robert McLaughlin, Nicola Ruaro et al.NDSS 2026 · 2 citations
  5. FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi ProtocolsHongbo Wen, Hanzhi Liu, Jiaxin Song, Yanju Chen et al.CCS 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines