ContraPonzi: Smart Ponzi Scheme Detection for Ethereum via Contrastive Learning
Jiajing Wu, Jieli Liu, J. Chen, Ting Chen, Jingwei Li, Shuwei Song, Jiahao He · 2023
In recent years, blockchain technology has witnessed rapid development and received considerable attention. However, its decentralized and pseudonymous nature has also attracted many criminal activities. Among them, Ponzi schemes, a classic form of financial fraud, also hide their true face in smart contracts, causing huge losses to blockchain users. Although numerous methods have been proposed to detect Ponzi contracts, these methods still have limitations in terms of generalization and feature learning. To address this issue, we conduct research on Ethereum, the currently largest blockchain platform enabling smart contracts, and propose a novel contrastive learning-based smart Ponzi scheme detection method named ContraPonzi. This method first extracts control flow graph information from bytecodes and models it as attribute graphs that preserve both semantic and structural information. Next, by augmenting the bytecode data of multi-version compilers and maximizing the graph representation similarity of multi-version bytecodes of the same contract, a pre-training graph encoder is obtained and then can be used in Ponzi contract detection. Experimental results on real-world data demonstrate that ContraPonzi is significantly superior to the state-of-the-art in Ethereum Ponzi scheme detection.