Ethereum Address Risk Model (v2: pre-existing fraud dataset)

This model is a LightGBM classifier trained to identify fraudulent Ethereum addresses based on a pre-existing, labeled dataset.

Model Details

  • Model Type: LightGBM Classifier
  • Training Dataset: Kaggle: Ethereum Fraud Detection Dataset โ€” https://www.kaggle.com/datasets/vagifa/ethereum-frauddetection-dataset
  • Fraud Label Source: Ethereum Fraud Detection Dataset (FLAG=1)
  • Benign Label Source: Ethereum Fraud Detection Dataset (FLAG=0)
  • Features Used:
    • coin_balance_eth
    • is_contract
    • has_token_transfers
    • tx_count_sent
    • tx_count_received
    • unique_counterparties
    • total_value_sent
    • total_value_received
    • activity_span_hours
    • velocity
    • contracts_created

Performance Metrics (on Test Set)

  • Accuracy: 0.9440
  • Precision: 0.9245
  • Recall: 0.8142
  • F1 Score: 0.8659
  • AUC-ROC: 0.9821
  • PR-AUC: 0.9509
  • Tuned Threshold: 0.815

Usage (Example)

First, install the necessary libraries:

%pip install lightgbm pandas huggingface_hub

Then, load the model and make predictions:

from huggingface_hub import hf_hub_download
import lightgbm as lgb
import pandas as pd
import pickle

# Download the model file
model_path = hf_hub_download(repo_id="jb10231/ethereum-address-risk-model-v2", filename="ethereum_address_risk_model.pkl")

# Load the model
with open(model_path, 'rb') as f:
    model = pickle.load(f)

# Example features (replace with actual feature data for a new address)
# Ensure feature names and order match those used during training
feature_names = ['coin_balance_eth', 'is_contract', 'has_token_transfers', 'tx_count_sent', 'tx_count_received', 'unique_counterparties', 'total_value_sent', 'total_value_received', 'activity_span_hours', 'velocity', 'contracts_created']
example_data = pd.DataFrame([{
    'coin_balance_eth': 0.1,
    'is_contract': 0,
    'has_token_transfers': 1,
    'tx_count_sent': 10,
    'tx_count_received': 5,
    'unique_counterparties': 15,
    'total_value_sent': 100.0,
    'total_value_received': 50.0,
    'activity_span_hours': 24.0,
    'velocity': 0.5,
    'contracts_created': 0
}], columns=feature_names)

# Predict fraud probability
fraud_probability = model.predict(example_data)[0]
print(f"Fraud Probability: {fraud_probability:.4f}")

# Apply the tuned threshold
tuned_threshold = 0.815 # from model summary
is_fraud = fraud_probability >= tuned_threshold
print(f"Is Fraud: {is_fraud}")

Limitations and Integration Notes

Feed this model's output as one RiskService signal per address, combined with the case-specific rule-based indicators already defined in the TRD โ€” not as a replacement for them. Note this model is trained on MAINNET data while your app traces Sepolia TESTNET by default; for the live demo either retrain on testnet-observed addresses or treat this model's score as illustrative until the app points at mainnet.

This model was trained on MAINNET data. If your application operates on a different network (e.g., Sepolia TESTNET), the model's performance might vary, and retraining with data from the target network is recommended for optimal results.

Training Environment

  • Date of Training: 2026-09-10T13:22:05.260782

License

This model is provided under [your desired license, e.g., MIT, Apache 2.0].

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support