Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Science for Web3

You're reading from  Data Science for Web3

Product type Book
Published in Dec 2023
Publisher Packt
ISBN-13 9781837637546
Pages 344 pages
Edition 1st Edition
Languages
Author (1):
Gabriela Castillo Areco Gabriela Castillo Areco
Profile icon Gabriela Castillo Areco

Table of Contents (23) Chapters

Preface Part 1 Web3 Data Analysis Basics
Chapter 1: Where Data and Web3 Meet Chapter 2: Working with On-Chain Data Chapter 3: Working with Off-Chain Data Chapter 4: Exploring the Digital Uniqueness of NFTs – Games, Art, and Identity Chapter 5: Exploring Analytics on DeFi Part 2 Web3 Machine Learning Cases
Chapter 6: Preparing and Exploring Our Data Chapter 7: A Primer on Machine Learning and Deep Learning Chapter 8: Sentiment Analysis – NLP and Crypto News Chapter 9: Generative Art for NFTs Chapter 10: A Primer on Security and Fraud Detection Chapter 11: Price Prediction with Time Series Chapter 12: Marketing Discovery with Graphs Part 3 Appendix
Chapter 13: Building Experience with Crypto Data – BUIDL Chapter 14: Interviews with Web3 Data Leaders Index Other Books You May Enjoy Appendix 1
Appendix 2
Appendix 3

A Primer on Security and Fraud Detection

“All warfare is based on deception.” - Sun Tzu

The history of fraud is as old as time. Fraud in the crypto world comes as no surprise, and as crypto gains mainstream adoption, it becomes increasingly necessary to be aware of the different forms of fraud in order to be able to identify it.

Fraud is a significant issue for businesses in general, for governments, and for the blockchain industry in particular. According to the 2022 PwC Global Annual Review on fraud, 46% of surveyed organizations reported experiencing some form of fraud or economic crime within the last 24 months.

Governments are aware of the issue for tax purposes, as well as to combat money laundering and terrorism financing. Relevant agencies have a mandate to enforce the law and combat such illicit activity even if cryptocurrencies are involved. Due diligence is required for all subjects associated with financial activity or money services businesses, a...

Technical requirements

You can find all the data and code files for this chapter in the book’s GitHub repository at https://github.com/PacktPublishing/Data-Science-for-Web3/tree/main/Chapter10. We recommend that you read through the code files in the Chapter10 folder to follow along.

In this chapter, we will use the Ethereum Utilities library (eth-utils), which contains commonly used utility functions for Python developers working with Ethereum. Depending on our environment, we may need to import additional low-level libraries that are utilized by eth-utils.

If you haven’t installed eth-utils yet, you can do so using the following code snippet:

pip install eth-utils

The documentation for eth-utils is available at https://eth-utils.readthedocs.io/en/stable/. If the installation fails due to a lack of supporting libraries, you can find the complete list of required libraries that need to be pre-installed in Chapter10/EDA.ipynb.

A primer on illicit activity on Ethereum

There is a technical difference between fraud and a scam. A scam is an act where we unknowingly pay for a fake item, transfer money, or provide our private keys to a criminal. Conversely, fraud refers to any suspicious activity on our address that we did not authorize. In this book, we will use both terms interchangeably.

The Ethereum Security blog has three key messages for anyone starting in the crypto industry:

  • Always be skeptical
  • No one is going to give you free or discounted ETH
  • No one needs access to your private keys or personal information

As of today, some of the most common scams include the following:

  • Giveaway scams: These basically work by criminals promising that if we send X amount of crypto to an address, it will be returned to us but doubled in amount. These schemes are often psychological, offering the victim only a limited amount of time to participate in this “opportunity,” generating...

Summary

In conclusion, we have identified and discussed one of the key threats in the cryptocurrency space, highlighting the need for effective transaction monitoring and identification. To this end, we have undertaken a machine learning exercise at the Ethereum address level, where we have leveraged Etherscan to complete our dataset.

We have evaluated and compared various machine learning models, optimizing their performance through grid search hyperparameter tuning and cross-validation. By undertaking this project, we have dived into a subject matter where forensics professionals are active and remains a current news topic.

Blockchain forensics is one of the more innovative areas in data science applications, as models need to scale and keep evolving in order to adapt, to be able to spot new types of fraud and scams.

In the next chapter, we will dive into predicting prices.

Further reading

Following is a list of sources for your further reading purposes:

lock icon The rest of the chapter is locked
You have been reading a chapter from
Data Science for Web3
Published in: Dec 2023 Publisher: Packt ISBN-13: 9781837637546
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}