IMPROVED DETECTION AND PATCHING OF BLOCKCHAIN SMART CONTRACT VULNERABILITIES USING ELECTRA-BASED TECHNIQUE - Ahmed, Baba Sale; Usman, Usman Bukar; Kadai, Saleh Isa (FUDMA JOURNAL OF SCIENCES, 2025)
Blockchain smart contracts, increasingly integral to digital assets and decentralized applications, face growing threats from security vulnerabilities. Traditional detection techniques, such as static and dynamic analysis, often struggle with complex contracts and may overlook logic-based vulnerabilities. While machine learning approaches show promise, existing methods like ASSBERT suffer from inefficiency and limited coverage due to their reliance on direct masked token training applied to Solidity source code. To address these limitations, this study proposes an ELECTRA-based approach using context-aware masking to improve vulnerability detection and patch generation for blockchain smart contracts. Preliminary experiments demonstrate consistent convergence, with validation losses declining from 0.689 to 0.684 over four epochs. However, initial accuracy (50%) and F1 scores (0.333) indicate room for improvement, likely due to the model’s early-stage training or dataset constraints. By refining the masking strategy and leveraging ELECTRA’s bidirectional context understanding, our approach aims to enhance detection accuracy and generate more effective patches. This work offers a potential solution to the ongoing challenge of securing smart contracts, with future iterations targeting optimized performance metrics.
Keywords: Context-aware masking; Blockchain Smart contracts; Deep learning; Transformer