Paper 2023/1338 Original: eprint.iacr.org/2023/1338 ↗

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 contract-specific 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.

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint.
History
2023-09-07: last updated
2023-09-07: published
Short URL
https://ia.cr/2023/1338
License
https://creativecommons.org/licenses/by/4.0/

BibTeX

@misc{cryptoeprint:2023/1338,
      author = {Kushal Babel and Mojan Javaheripi and Yan Ji and Mahimna Kelkar and Farinaz Koushanfar and Ari Juels},
      title = {Lanturn: Measuring Economic Security of Smart Contracts Through Adaptive Learning},
      howpublished = {Cryptology {ePrint} Archive, Paper 2023/1338},
      year = {2023},
      url = {https://eprint.iacr.org/2023/1338}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.