SmartTrans: Advanced Similarity Analysis for Detecting Vulnerabilities in Ethereum Smart Contracts
Abstract
In the ever-evolving landscape of Ethereum smart contracts, the specter of vulnerabilities intensified by code reuse presents a significant challenge to the security of the blockchain. Recent studies employ deep learning for similarity analysis to identify these vulnerabilities, yet their effectiveness wanes as the volume of analyzed code increases. This article introducesSmartTrans, an advanced similarity analysis model designed to efficiently and accurately retrieve similar vulnerabilities within Ethereum bytecodes. Leveraging a novel jump-aware Transformer-based model, our approach captures the semantics and control flow of bytecodes. It not only refines the representation of functions by integrating program analysis with natural language processing techniques but also innovates a contract-level similarity detection scheme tailored for the expansive scale of contracts. Our experiments show thatSmartTransoutperforms state-of-the-art techniques at both function and contract levels, proving its capability to detect n-day vulnerabilities across Ethereum bytecodes accurately. Vulnerabilities recalling experiments show thatSmartTransachieves 95.43% and 99.37% accuracy at two levels. Furthermore, we stand out as the first work to retrieve N-day vulnerabilities across the Ethereum bytecode corpus, unveiling 4,988 vulnerable contracts. Our methodology secures an accuracy of 88.60%, which is 1.30 times higher than the best baseline.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.