Contrastive learning framework can detect blockchain-based smart Ponzi schemes

The overall framework: Step 1: Train the model’s feature extractor with a preset self-supervised representation learning framework using unlabeled data. Step 2: The classifier is trained jointly using labeled and unlabeled data by extracting features through a feature extractor. Step 3: Input the unknown smart contract into the trained feature encoder to extract the features and input them into the trained classifier to complete the classification task. Credit: arXiv (2025). DOI: 10.48550/arxiv.2507.16840

Blockchain technologies are digital systems that work by distributing copies of information across several computers, also referred to as nodes, all of which are connected to a common network. These technologies underpin the trading of cryptocurrencies, as well as the functioning of other emerging digital services.

While blockchain technology opens new opportunities for the trading of cryptocurrencies, digital arts and other digital assets, they are also often used for fraudulent activities. Perhaps most notably, they are now widely used for fraudulent investment schemes known as smart Ponzi schemes.

In a smart Ponzi scheme, individuals are asked to invest in specific digital currencies or assets and sign a so-called smart contract that automatically draws money from them on a regular basis. Their investments might initially seem fruitful, yet the early investors are in fact being paid with the money invested by new individuals. After some time, the whole system collapses, as there are no longer enough resources to pay all investors.

In recent years, computer scientists and financial security experts have been trying to devise strategies to automatically detect these fraudulent schemes. Most solutions developed so far rely on deep learning algorithms trained to identify patterns associated with smart Ponzi schemes in blockchain transactions.

Despite their promise, to perform well, these deep learning-based techniques must be trained on large datasets containing blockchain transactions labeled by human experts. As labeling this data requires extensive time and resources, existing solutions might not be ideal for the reliable detection of smart Ponzi schemes in real-world settings.

The University of Electronic Science and Technology of China, City University of Macau and Swinburne University of Technology recently developed CASPER (Contrastive Approach for Smart Ponzi detectER), a deep-learning-based framework that can detect smart Ponzi schemes with good accuracy without requiring labeled training data.

This new technique, introduced in a paper published on the arXiv preprint server, relies on models that can learn to detect these fraudulent activities by comparing the similarities and differences between different blockchain transactions.

“Traditional Ponzi scheme detection methods based on deep learning typically rely on fully supervised models, which require large amounts of labeled data,” wrote Weija Yang, Tian Lan and their colleagues in their paper. “However, such data is often scarce, hindering effective model training. To address this challenge, we propose a novel contrastive learning framework, CASPER (Contrastive Approach for Smart Ponzi detectER with more negative samples), designed to enhance smart Ponzi scheme detection in blockchain transactions.”

To pick up signs of smart Ponzi schemes in blockchain transactions, Yang, Lan and their colleagues employed an approach known as contrastive learning. This is a machine learning technique through which a computational model learns to tell different things apart by comparing them.

“By leveraging contrastive learning techniques, CASPER can learn more effective representations of smart contract source code using unlabeled datasets, significantly reducing both operational costs and system complexity,” wrote the researchers.

The team assessed the new Ponzi scheme detection technique in a series of tests, in which it was fed blockchain transactions from a publicly available dataset. Their framework performed remarkably well, despite being trained on a limited amount of labeled data.

“We evaluate CASPER on the XBlock dataset, where it outperforms the baseline by 2.3% in F1 score when trained with 100% labeled data,” the team wrote. “More impressively, with only 25% labeled data, CASPER achieves an F1 score nearly 20% higher than the baseline under identical experimental conditions. These results highlight CASPER’s potential for effective and cost-efficient detection of smart Ponzi schemes, paving the way for scalable fraud detection solutions in the future.”

In the future, the CASPER framework could be improved and tested on more real-world data, to further assess its potential for detecting and mitigating smart Ponzi schemes. Eventually, it could make its way into real-world settings, where it could help to protect digital currency investors against malicious activities.

Written for you by our author Ingrid Fadelli,
edited by Stephanie Baum, and fact-checked and reviewed by Robert Egan—this article is the result of careful human work. We rely on readers like you to keep independent science journalism alive.
If this reporting matters to you,
please consider a donation (especially monthly).
You’ll get an ad-free account as a thank-you.

More information:
Weijia Yang et al, CASPER: Contrastive Approach for Smart Ponzi Scheme Detecter with More Negative Samples, arXiv (2025). DOI: 10.48550/arxiv.2507.16840

Journal information:
arXiv


© 2025 Science X Network

Citation:
Contrastive learning framework can detect blockchain-based smart Ponzi schemes (2025, August 24)
retrieved 24 August 2025
from https://techxplore.com/news/2025-08-contrastive-framework-blockchain-based-smart.html

This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no
part may be reproduced without the written permission. The content is provided for information purposes only.