Securing Smart Contracts: A New Approach to Preventing Manipulation Attacks

Thursday 27 March 2025


Smart contracts, those self-executing pieces of code that govern digital transactions on blockchain networks, have long been plagued by security vulnerabilities. A recent study highlights a particularly insidious type of attack: manipulation attacks that exploit sensitive information leakage in smart contract code.


The researchers behind the study, from Singapore Management University and Nanyang Technological University, developed an innovative approach to detect and prevent these attacks. Their method, called PARTITIONGPT, leverages large language models (LLMs) to analyze smart contract code and identify sensitive data variables that could be exploited by attackers.


Smart contracts are designed to be transparent, which means that all transactions and data are publicly visible on the blockchain. However, this transparency also makes them vulnerable to manipulation attacks. Attackers can exploit these vulnerabilities by manipulating internal states or modifying transaction inputs to alter the behavior of the contract. This can lead to significant financial losses, as seen in several high-profile cases.


PARTITIONGPT addresses this issue by dividing smart contract code into two parts: a privileged part that handles sensitive data and a normal part that performs the actual logic of the contract. The LLM-driven approach ensures that only authorized parties have access to the privileged part, effectively reducing the attack surface.


The researchers evaluated PARTITIONGPT on 18 annotated smart contracts containing 99 sensitive functions. They found that their method successfully generated compilable and verified partitions for 78% of these functions, while also reducing code size by approximately 30% compared to traditional function-level partitioning approaches.


In addition to its technical merits, PARTITIONGPT has significant practical implications. It provides a robust defense against manipulation attacks, which are becoming increasingly common in the rapidly growing decentralized finance (DeFi) sector. DeFi platforms rely heavily on smart contracts to facilitate transactions and manage assets, making them particularly vulnerable to these types of attacks.


The study’s findings demonstrate the importance of securing smart contract code to prevent manipulation attacks. PARTITIONGPT offers a promising solution that can be applied to a wide range of blockchain-based applications, from cryptocurrency exchanges to DeFi platforms. As the use of blockchain technology continues to expand, it is essential to address security vulnerabilities like those highlighted in this study to ensure the integrity and trustworthiness of these systems.


The researchers’ approach has significant implications for the development of secure smart contracts. By identifying sensitive data variables and restricting access to privileged parts of the code, PARTITIONGPT provides a powerful tool for preventing manipulation attacks.


Cite this article: “Securing Smart Contracts: A New Approach to Preventing Manipulation Attacks”, The Science Archive, 2025.


Smart Contracts, Blockchain, Security Vulnerabilities, Manipulation Attacks, Sensitive Information Leakage, Large Language Models, Partitiongpt, Decentralized Finance, Defi, Cryptocurrency Exchanges.


Reference: Ye Liu, Yuqing Niu, Chengyan Ma, Ruidong Han, Wei Ma, Yi Li, Debin Gao, David Lo, “Towards Secure Program Partitioning for Smart Contracts with LLM’s In-Context Learning” (2025).


Leave a Reply