军事知识服务平台
DBESN:A novel model for detecting and identifying malicious code in a smart contract
摘要 Smart contracts represent a predefined set of rules invoked when specific conditions are met within blockchain networks,eliminating the need for a centralized authority to validate the transactions.The absence of a central authority can potentially expose smart contracts to fraudulent behavior.Moreover,implementation flaws in smart contracts can be exploited to cause unintended behavior,resulting in security or financial risks.Traditionally,the identification of vulnerabilities in smart contracts has relied on methods such as pattern matching,data flow analysis,and input testing.While these techniques are foundational,they are constrained by human limitations and may not comprehensively address the full spectrum of potential issues.This necessitates more advanced approaches to ensure robust security and reliability.Therefore,in the literature,numerous researchers have leveraged different machine learning(ML)and deep learning(DL)techniques to classify normal and malicious smart contracts.However,the existing literature either grapples with class imbalance issues or relies on conventional methods.Moreover,the existing research often falls short of locating the exact location of malicious code within the smart contracts.Therefore,to address these gaps,this paper proposes a novel model called the dual-branch encoder Siamese network(DBESN)for detecting malicious smart contracts.Furthermore,this model is extended to precisely identify the region of the vulnerable code fragment within the smart contract using the local interpretable model-agnostic explanations(LIME)algorithm.Experimental results demonstrated a performance accuracy of 98.62%and an F1-score of 99.30%with an inference time of 0.296 s.Given the high performance coupled with the low inference time of the proposed DBESN model,it is suitable for deployment within blockchain networks to detect and identify malicious smart contracts effectively and efficiently.
年,卷(期): 2025, 6(4)
机标分类号: H13 TP311.52 P225.1
在线出版日期: 2026年2月5日