Enhancing smart contract security using a code representation and GAN based methodology
Abstract Smart contracts are changing many business areas with blockchain technology, but they still have vulnerabilities that can cause major financial losses. Because deployed smart contracts (SCs) are irreversible once deployed, fixing these vulnerabilities before deployment is critical. This res...
Saved in:
| Main Authors: | , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Nature Portfolio
2025-05-01
|
| Series: | Scientific Reports |
| Subjects: | |
| Online Access: | https://doi.org/10.1038/s41598-025-99267-3 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Summary: | Abstract Smart contracts are changing many business areas with blockchain technology, but they still have vulnerabilities that can cause major financial losses. Because deployed smart contracts (SCs) are irreversible once deployed, fixing these vulnerabilities before deployment is critical. This research introduces a new method that combines code embedding with Generative Adversarial Networks (GANs) to find integer overflow vulnerabilities in smart contracts. Using Abstract Syntax Trees, we can vectorize the source code of smart contracts while keeping all of the important contract characteristics and going beyond what can be achieved with conventional textual or structural analysis. Synthesizing contract vector data using GANs alleviates data scarcity and facilitates source code acquisition for training our detection system. The proposed method is very good at finding vulnerabilities because it uses both GAN discriminator feedback and vector similarity measures based on cosine and correlation coefficients. Experimental results show that our GAN-based proactive analysis method achieves up to 18.1% improvement in accuracy over baseline tools such as Oyente and sFuzz. |
|---|---|
| ISSN: | 2045-2322 |