Paper 2023/1338
Lanturn: Measuring Economic Security of Smart Contracts Through Adaptive Learning
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)
- Category
- Applications
- Publication info
- Published elsewhere. ACM CCS 2023
- Keywords
- BlockchainSmart ContractsDeFi SecurityMEVMachine Learning
- Contact author(s)
-
babel @ cs cornell edu
mojan @ ucsd edu
yj348 @ cornell edu
mahimna @ cs cornell edu
fkoushanfar @ eng ucsd edu
juels @ cornell edu - History
- 2023-09-08: approved
- 2023-09-07: received
- See all versions
- Short URL
- https://ia.cr/2023/1338
- License
-
CC BY
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} }