
An Attention-based Long Short-Term Memory
Framework for Detection of Bitcoin Scams
Puyang Zhao∗, Wei Tian∗, Lefu Xiao∗, Xinhui Liu∗, Jingjin Wu∗†
∗Department of Statistics and Data Science, BNU-HKBU United International College, Zhuhai, Guangdong, P. R. China
†Guangdong Provincial Key Laboratory of Interdisciplinary Research and Application for Data Science
Email: puyangzhao.27@gmail.com; s230202702@mail.uic.edu.cn; p930005056@mail.uic.edu.cn;
xinhui liu@outlook.com; jj.wu@ieee.org
Abstract—Bitcoin is the most common cryptocurrency involved
in cyber scams. Cybercriminals often utilize pseudonymity and
privacy protection mechanism associated with Bitcoin trans-
actions to make their scams virtually untraceable. The Ponzi
scheme has attracted particularly significant attention among
the Bitcoin fraudulent activities. This paper considers a multi-
class classification problem to determine whether a transaction
is involved in Ponzi schemes or other cyber scams, or is a non-
scam transaction. We design a specifically designed crawler to
collect data and propose a novel Attention-based Long Short-
Term Memory (A-LSTM) method for the classification problem.
The experimental results show that the proposed model has
better efficiency and accuracy than existing approaches, including
Random Forest, Extra Trees, Gradient Boosting, and classical
LSTM. With correctly identified scam features, our proposed A-
LSTM achieves an F1-score over 82%for the original data and
outperforms the existing approaches.
Index Terms—Bitcoin, Blockchain, Data mining, Attention-
based LSTM, Fraud detection, Multi-class classification
I. INTRODUCTION
Bitcoin is the first decentralized cryptocurrency. As of Oc-
tober 2021, Bitcoin had a market share of around 45%, being
the highest among all cryptocurrencies [1], and is expected
to continue dominating the crypto market in the foreseeable
future. This paper will study techniques to detect cyber-crime
activities conducted by Bitcoin.
There are multiple forms of cybercrime involving Bitcoin
transactions, such as Ponzi schemes, cryptojacking, and e-
mail frauds. Among these, Ponzi schemes represent one of
the most prevalent types of cybercrime. Statistics show that
almost $7 billion was generated in cryptocurrency revenue by
Ponzi schemes in 2019, nearly twice the amount generated by
all other cyber fraud categories combined in 2020 [2].
A general trend is that more and more investors are be-
coming victims of cyber scams involving cryptos due to
inadequacies ineffective intervention and prevention measures.
Thus, one of the essential steps is to detect cyber scams in
∗Corresponding author.
This work is partly supported by Zhuhai Basic and Applied Basic Research
Foundation Grant ZH22017003200018PWC, and partly supported by the
Guangdong Provincial Key Laboratory of Interdisciplinary Research and
Application for Data Science, BNU-HKBU United International College,
Project code 2022B1212010006 and in part by Guangdong Higher Education
Upgrading Plan (2021-2025) UIC R0400001-22.
their early stages to ensure the proper functioning of the cyber
society. In this paper, we classify all Bitcoin transactions into
three categories: 1) transactions involved in a Ponzi scheme,
2) transactions involved in other types of scams, or 3) normal
non-scam transactions, for the sake of preventing the scams in
advance or detecting them in the early stage of the fraud.
In this paper, we develop a framework that can accurately
detect Ponzi schemes and other scams conducted by Bit-
coin transactions with a novel deep learning method called
attention-based Long Short-Term Memory (A-LSTM). The
main contributions are summarized as follows.
•We design a crawler which can automatically crawl in-
formation of Bitcoin transactions that potentially involve
scams from known Bitcoin addresses, such that we can
obtain the firsthand information. The crawler automati-
cally parses websites based on a dictionary that contains
Ponzi-related words like “Ponzi”, “profit”, “HYI”, “multi-
plier”, “investment”, “MLM”. With the crawler, we man-
age to collect a number of Bitcoin addresses that initiated
transactions, and then build a dataset considerably larger
than those used in similar existing studies.
•From the transaction information, we study the features
that distinguish normal transactions from those involving
cyber scams. We identify the five most influential features
in Bitcoin scams detection, providing insights into the
detection of such scams. They are (i) active days; (ii)
number of outs; (iii) input number; (iv) the total number
of BTC spent; (v) number of addresses received. The
features would be explained in detail later.
•We adopt the A-LSTM mechanism that suits the features
of our constructed dataset to classify the transactions
in our framework. We compare the performance of our
proposed A-LSTM approach with four popular super-
vised learning models, namely Random Forest [3], Extra
Trees [4], Gradient Boosting [5] and classical LSTM [6].
We also integrate resampling methods with each of these
methods, aiming to solve the imbalance problem in the
dataset. We demonstrate that, while resampling is a
traditional method for solving the imbalance problem, it
is not applicable to the A-LSTM model. This is because
the resampling method would introduce a large amount of
noise into A-LSTM. On the other hand, A-LSTM without978-1-6654-9144-0/22/$31.00 ©2022 IEEE
arXiv:2210.14408v1 [cs.CR] 26 Oct 2022