Statically Checking Transaction Ordering Dependency in Ethereum Smart Contracts
Abstract
Smart contracts are programs with mutable state. Transactions submitted to these contracts trigger functions that often modify state. Nodes of the Ethereum blockchain schedule such transactions in a nondeterministic order, potentially leading to races between transactions and concurrency issues. When the outcome of a smart contract varies depending on the order in which transactions are processed, we have a Transaction Ordering Dependency (TOD). TOD enables malicious actors to profit from a smart contract, similar to the well-known frontrunning vulnerability. Existing approaches for detecting TOD in Ethereum smart contracts yield a high rate of false positives and false negatives. To help contract developers and testers detect TOD vulnerabilities with enhanced precision, we propose and evaluate an analysis based on information flow in our tool TODChecker1. We evaluate our approach using a benchmark comprising 513 vulnerable transactions involving 235 real-world Ethereum smart contracts susceptible to frontrunning attacks. Our evaluation finds that our approach outperforms existing approaches, including Oyente, Securify, SAILFISH, TODler, and Nyx, in precision, runtime, and in identifying novel TOD vulnerabilities.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.