Skip to content

optimize the previous repository SolPonzi_transaction

Notifications You must be signed in to change notification settings

resdust/Ponzi_tranc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USAGE

sudo apt-get install postgresql-client
pip install pexpect,pandas,colorama

mkdir sql
mkdir result
python code/main.py

To evaluate, run:

python code/classifier.py

feature

特征名称 含义 类型
ponzi 是否为庞氏合约的标签,庞氏:1,normal:0 nominal{0,1}
nbr_tx_in 向合约转账交易总次数 numerical
nbr_tx_out 合约向外转账总次数 numerical
Tot_in 向合约转账的总金额 numerical
Tot_out 合约向外转账的总金额 numerical
mean_in 向合约转账的平均金额 numerical
mean_out 合约向外转账的平均金额 numerical
sdev_in 向合约转账金额的标准方差 numerical
sdev_out 合约向外转账金额的标准方差 numerical
gini_in 向合约转账金额的基尼系数 numerical
gini_out 合约向外转账金额的基尼系数 numerical
avg_time_btw_tx 平均多长时间有一笔交易 numerical
lifetime 合约生存周期 numerical

result

134ponzi+134dapp

weka.classifiers.trees.RandomForest -P 100 -I 100 -num-slots 1 -K 0 -M 1.0 -V 0.001 -S 1 -depth 6
accuracy precision recall f-score
0.890 0.890 0.890 0.890

![](.\log\weka result.png)

![weka features](.\log\weka features.png)

fortrain

133ponzi + 1262dapp Run classifier python file to get the result.

precision recall f-score
76.7% 57.9% 66.0%

About

optimize the previous repository SolPonzi_transaction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages