Smart contracts on blockchain platforms have revolutionized digital transactions, but remain vulnerable to security flaws that can result in significant financial losses. Traditional detection tools often rely on single-source analysis, which limits their accuracy and ability to identify emerging vulnerabilities. This study introduces a novel multimodal deep learning approach, TriFortis, for detecting control flow vulnerabilities in smart contracts. TriFortis integrates three distinct information sources, including the control flow graphs (CFGs), abstract syntax trees (ASTs), and code comments. Specifically, CFGs are derived from compiled bytecode to capture program execution paths, ASTs are from source code to preserve structural information, and code comments are used to extract semantic context. These features are processed through specialized neural networks and combined to create comprehensive contract representations. TriFortis is evaluated on multiple datasets containing thousands of smart contracts with various vulnerability types, including reentrancy attacks, access control flaws, and unchecked external calls. Experimental results demonstrate that the multimodal method achieves a 98.45% F1-score in the detection of the erroneous control flow vulnerabilities, significantly outperforming existing tools. Furthermore, TriFortis exhibits superior performance in code clone detection, yielding a 9 percentage point improvement in detection rate while achieving computational efficiency gains of 35.1 seconds on average.
Peng et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: