On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols

03/03/2021
by   Liyi Zhou, et al.
0

In this paper, we investigate two methods that allow us to automatically create profitable DeFi trades, one well-suited to arbitrage and the other applicable to more complicated settings. We first adopt the Bellman-Ford-Moore algorithm with DEFIPOSER-ARB and then create logical DeFi protocol models for a theorem prover in DEFIPOSER-SMT. While DEFIPOSER-ARB focuses on DeFi transactions that form a cycle and performs very well for arbitrage, DEFIPOSER-SMT can detect more complicated profitable transactions. We estimate that DEFIPOSER-ARB and DEFIPOSER-SMT can generate an average weekly revenue of 191.48ETH (76,592USD) and 72.44ETH (28,976USD) respectively, with the highest transaction revenue being 81.31ETH(32,524USD) and22.40ETH (8,960USD) respectively. We further show that DEFIPOSER-SMT finds the known economic bZx attack from February 2020, which yields 0.48M USD. Our forensic investigations show that this opportunity existed for 69 days and could have yielded more revenue if exploited one day earlier. Our evaluation spans 150 days, given 96 DeFi protocol actions, and 25 assets. Looking beyond the financial gains mentioned above, forks deteriorate the blockchain consensus security, as they increase the risks of double-spending and selfish mining. We explore the implications of DEFIPOSER-ARB and DEFIPOSER-SMT on blockchain consensus. Specifically, we show that the trades identified by our tools exceed the Ethereum block reward by up to 874x. Given optimal adversarial strategies provided by a Markov Decision Process (MDP), we quantify the value threshold at which a profitable transaction qualifies as Miner ExtractableValue (MEV) and would incentivize MEV-aware miners to fork the blockchain. For instance, we find that on Ethereum, a miner with a hash rate of 10 reward.

READ FULL TEXT
12/05/2021

Deep-Dive Analysis of Selfish and Stubborn Mining in Bitcoin and Ethereum

Bitcoin and Ethereum are the top two blockchain-based cryptocurrencies w...
01/28/2019

On transaction parallelizability in Ethereum

Ethereum clients execute transactions in a sequential order prescribed b...
04/10/2019

Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges

Blockchains, and specifically smart contracts, have promised to create f...
03/29/2022

Extracting Godl [sic] from the Salt Mines: Ethereum Miners Extracting Value

Cryptocurrency miners have great latitude in deciding which transactions...
06/14/2021

A2MM: Mitigating Frontrunning, Transaction Reordering and Consensus Instability in Decentralized Exchanges

The asset trading volume on blockchain-based exchanges (DEX) increased s...
12/20/2021

Blockchain Mining with Multiple Selfish Miners

This paper studies a fundamental problem regarding the security of block...
03/05/2019

Profitable Double-Spending Attacks

Our aim in this paper is to investigate the profitability of double-spen...