# Detecting Ponzi Schemes on Ethereum: Towards Healthier Blockchain Technology
## TLDR
> * Blockchain technology becomes increasingly popular. It also attracts scams, for example, Ponzi scheme, a classic fraud, has been found making a notable amount of money on Blockchain, which has a very negative impact
>
> * By verifying smart contracts on Ethereum, we first extract features from user accounts and operation codes of the smart contracts and then build a classification model to detect latent Ponzi schemes implemented as smart contracts.
>
> * The experimental results show that the proposed approach can achieve high accuracy for practical use. More importantly, the approach can be used to detect Ponzi schemes even at the moment of its creation.
## Core Research Question
* Why do we need to detect Ponzi Schemes on Ethereum?
* What is the method we use to detect Ponzi Schemes on Ethereum?
* Why do we use this method to detect Ponzi Schemes on Ethereum?
* How many smart Ponzi schemes exist on Ethereum?
* What types of smart Ponzi schemes are there?
* What are their characteristics?
* How much is the influence of smart Ponzi schemes?
* How to detect smart Ponzi schemes without source codes?
## Background
* EVM: is the runtime environment for EVM bytecode, which is a Turing-complete programming language. Smart contracts based on Ethereum is a series of EVM bytecode. It takes three steps to create a smart contract based on Ethereum:
1) write the smart contract source code in a high-level language, for example, Solidity;
2) compile the source code into bytecode using the EVM compiler;
3) upload the bytecode to the blockchain with an Ethereum client.
* Consensus protocol is employed to maintain a unique state of Ethereum in a certain time period. The consensus protocol of Ethereum is based on Proof of Work (PoW), similar to Bitcoin. This means that the Ethereum system will be safe unless a particular attacker owning 51% computing power of the whole network. Trust is built among Ethereum users for its transparent code execution process.
* Solidity is a contract-oriented, high-level language whose syntax is similar to that of JavaScript. Solidity is an important language in the Ethereum platform which running on EVM.
## Flow
* Section 2: provides a brief introduction of the Etherem platform and some key concepts. A detailed description of the data, the extracted features.
* Section 3: the classification model are presented.
* Section 4: Experimental results and analysis are summarized.
* Section 5: Summarize the related work.
* Section 6: conclude the paper.
## Method

* This result is of great significance because by using the model we can:
1) detect smart Ponzi schemes even the source codes are intentional hidden;
2) detect smart Ponzi schemes before it causing any damage;
3) build a risk warning platform based on it.
## Example of smart contract Ponzi schemes

The codes from line 2 to 11 of Listing 1 are data definition, which are used to describe the current state of the contract. For example, balance records the current balance of the smart contract and the structure Participant records the investor’s address and payment. The function Rubixi in line 14 is the constructor which runs only once when the contract is created.

The function with no name in line 17, which contains only a function call to addPayout, is called fallback function. It is executed when an account sends Ether to the contract without data. Thus, when a participant invests Ether to the contract, the function addPayout, defined in line 19, is triggered. This function is the key of the contract as it implements the main logic of a Ponzi scheme: 1) records the address and payment of the investor (line21–22); 2) calculates fees (line 28); and 3) pays to previous investors when the balance is enough (line 29–34).

The array participants defined in line 12 records all the investors in order, including address (msg.sender) and payment (payout=msg.value *pyramidMultiplier)/100). Note that the propagated high profit (see Fig. 1) is controlled by the variable pyramidMultiplier, which was first set to 300 (line 6), but then reduced to 200 (line 23) from the 10th participant and 150 (line 25) from the 25th participant. Obviously, to attract early participants, the contract owner promised a .to do is to compile the source code into EVM bytecode.
## Contribution
* A key contribution of the paper is an experimental validation of the feasibility of detecting smart Ponzi schemes at the moment of its creation.
## Results
Table 2 summarizes the performances of the three kinds of features in detecting Smart Ponzi schemes

## Data Source
Etherscan.io
## Conclusion
Financial scams based on blockchain and cryptocurrency has become an important research problem. With the development of blockchain technology, Ponzi scheme is now under the veil of smart contracts. In this study, we propose an approach to detect smart Ponzi schemes. Using the manually checked samples and XGBoost, a regression tree model based on extracted account features and code features is build. The experimental results indicate that the proposed model has high accuracy and can be used to detect latent smart Ponzi schemes in practice. The most significance results is that using our extracted code features that are publicly accessible in any running contract, is enough to build a practical model for detecting Ponzi scheme contract at the moment of its creation. In addition, we estimate that there are more than 400 smart Ponzi schemes on Ethereum, which are far more than the previous estimation.