Bridging Language Barriers in Smart Contract Security: A Reinforcement Learning-Based Translation Approach
Keywords: smart contract, code translation, vulnerability detection
TL;DR: We propose a paradigm to translate smart contracts and employ it to detect vulnerabilities.
Abstract: Smart contracts have transformed decentralized finance, but flaws in their logic still present serious security risks. Most existing vulnerability detection tools are designed for well-supported languages like Solidity, leaving less common languages such as Vyper and Rust with limited protection. To address this issue, we propose RLTransSC, a novel method that utilizes Reinforcement Learning (RL) to guide Large Language Models (LLMs) fine-tuning to translate smart contracts from low-resource languages into a high-resource language (i.e., Solidity). Once translated, we analyze the translated contracts using a vulnerability detection model trained specifically on Solidity. This approach removes the need for labeled datasets or specialized security tools for low-resource languages. We demonstrate the effectiveness of our method across Vyper, Rust, and Solidity, achieving strong translation performance and significantly improving vulnerability detection for low-resourced smart contract languages.
Primary Area: unsupervised, self-supervised, semi-supervised, and supervised representation learning
Submission Number: 4603
Loading