Smart contracts frequently fail due to transaction reverts, yet diagnosing the causes of these failures remains challenging. We present an analysis pipeline that automatically extracts and clusters invariants from on-chain reverted transactions, uncovering the underlying conditions that trigger failures. At the core of our approach is ReBERT, a custom embedding model fine-tuned on invariant data, which outperforms existing semantic similarity models in capturing subtle predicate relationships. Our analysis reveals meaningful clusters of failure causes—such as Access Control, Data Flow, and Status Checks—that highlight recurring vulnerabilities in smart contract execution. These findings advance understanding of failure patterns for Ethereum Smart Contracts.
Melissa Mazura (Wed,) studied this question.