Downloads · 30 days
0
jb10231/ethereum-address-risk-model-v2
ethereum-address-risk-model-v2 is a tabular classification model from jb10231. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for lightgbm.
This model is a LightGBM classifier trained to identify fraudulent Ethereum addresses based on a pre-existing, labeled dataset.
Downloads · 30 days
0
Access
Public
Updated Sep 10, 2026
Repo size
593 KB
Likes
0
Public
Click a slice to open those files.
.pkl435 KB · 69%
From the Hugging Face model README
This model is a LightGBM classifier trained to identify fraudulent Ethereum addresses based on a pre-existing, labeled dataset.
coin_balance_ethis_contracthas_token_transferstx_count_senttx_count_receivedunique_counterpartiestotal_value_senttotal_value_receivedactivity_span_hoursvelocitycontracts_createdFirst, 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}")
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.
This model is provided under [your desired license, e.g., MIT, Apache 2.0].