🤖 AI Summary
This study addresses the challenges in detecting "rug pull" scams in decentralized finance (DeFi), including limited detection features, severe class imbalance, and insufficient model generalizability and interpretability. To this end, we propose a multidimensional framework that jointly analyzes on-chain behavior and smart contract characteristics, integrating signals from malicious contract design, anomalous transaction patterns, liquidity manipulation, and social media activity into a comprehensive feature set. Using the BOBU token as a case study, we reconstruct the attack sequence and employ a multilayer perceptron (MLP) model enhanced with SMOTE oversampling and Focal Loss to mitigate class imbalance, alongside a dynamic thresholding strategy to balance precision and recall. We also develop an interpretable, web-based visualization system enabling batch risk assessment and result export. Experimental results demonstrate superior performance over baseline methods, achieving 0.927 accuracy, 0.787 F1-score, and 0.952 AUC-ROC on the test set, while offering high practical utility and interpretability.
📝 Abstract
As the blockchain and decentralized finance (DeFi) ecosystems continue to expand and mature, rug pull scams involving meme coins are occurring with increasing frequency, posing a threat to the security of investors' assets and the healthy development of the industry. Rug Pull scams are characterized by extremely low deployment costs, covert execution, rapid fund transfers, and high detection difficulty. Traditional manual reviews or fixed rules struggle to meet real-time early warning requirements, and existing detection methods generally suffer from issues such as a single feature dimension, inadequate handling of class imbalance, and weak model generalization and interpretability. To address these shortcomings, this paper focuses on the detection of Ethereum-based rug pull scams. First, we clarify their definitions, types, and harm mechanisms, and construct a multi-dimensional feature system based on dimensions such as malicious smart contract design, on-chain transaction anomalies, liquidity manipulation, and social media disclosures. Next, using the "Second Uncle Coin"(token symbol: BOBU) case as an example, we reconstruct the attack process and derive quantitative detection metrics. Subsequently, a risk detection model based on a Multi-Layer Perceptron (MLP) is designed. We employ a combined strategy of SMOTE oversampling and Focal Loss to address the issue of sample imbalance, dynamically search for optimal thresholds to balance precision and recall, and incorporate gradient pruning and early stopping to enhance training stability. Experiments show that the model achieves an accuracy of 0.927, an F1 score of 0.787, and an AUC-ROC of 0.952 on the test set, outperforming traditional methods. Finally, a visualizable web-based detection system is developed using the Flask framework, enabling batch risk assessment, high-risk ranking display, and result export functions.