DeFi Fraud Analytics from On-Chain Transaction Databases

DOI:

https://doi.org/10.63646/OTZL9881

Keywords:

DeFi fraud detection, blockchain transaction database, on-chain analytics, graph neural networks, smart contract security, money laundering

Abstract

Decentralized finance (DeFi) has expanded rapidly since 2020, but the pseudonymous and permissionless character of blockchain networks has simultaneously created conditions that favour financial fraud at an unprecedented scale. This article presents DATAMIND-OnChain, a structured on-chain transaction database purpose-built to support reproducible fraud analytics across five categories: money laundering through layered wallets, pump-and-dump token manipulation, rug-pull contract abandonment, flash loan-enabled arbitrage attacks, and smart contract exploits. The database integrates six core relational tables covering transactions, wallets, smart contracts, token transfers, blacklisted entities, and fraud alerts, complemented by a graph database layer for wallet- network analysis and a vector store for contract-embedding search. Data are collected from Ethereum mainnet and Binance Smart Chain over a 36-month period spanning January 2020 to December 2022, yielding 214 million transaction records, 8.9 million unique wallet addresses, and 1.3 million smart-contract deployments. A three- stage analytical pipeline combining graph embedding, community detection, and temporal pattern mining is applied, and a DATAMIND-GNN model is benchmarked against Isolation Forest and GraphSAGE baselines across all five fraud categories. DATAMIND-GNN achieves a macro-averaged F1 score of 0.86, outperforming baselines by 6 to 19 percentage points. Early-warning lead times range from 0.3 days for flash loan events to 6.8 days for pump-and-dump schemes. Fund-flow tracing coverage reaches 91 percent at five transaction hops. The database schema, indexing strategy, data-quality statistics, and open-access protocols are documented to support reproducible experimentation and automated fraud-intelligence pipelines.

How to Cite

Wei, Y., & Zhang, M. (2026). DeFi Fraud Analytics from On-Chain Transaction Databases. DATAMIND, 4(3), 40-53. https://doi.org/10.63646/OTZL9881

References

Bartoletti, M., Carta, S., Cimoli, T., & Saia, R. (2020). Dissecting Ponzi schemes on Ethereum: identification, analysis, and impact. Future Generation Computer Systems, 102, 259–277. https://doi.org/10.1016/j.future.2020.01.020

Chen, W., Zheng, Z., Cui, J., Ngai, E., Zheng, P., & Zhou, Y. (2018). Detecting Ponzi schemes on Ethereum: Towards healthier blockchain technology. In Proceedings of the 2018 World Wide Web Conference (pp. 1409–1418). ACM. https://doi.org/10.1145/3178876.3186046

Conti, M., Kumar, E. S., Lal, C., & Ruj, S. (2018). A survey on security and privacy issues of Bitcoin. IEEE Communications Surveys & Tutorials, 20(4), 3416–3452. https://doi.org/10.1109/COMST.2018.2842460

Di Angelo, M., & Salzer, G. (2020). A survey of tools for analyzing Ethereum smart contracts. In Proceedings of the 2020 IEEE International Conference on Decentralized Applications and Infrastructures (pp. 69–78). IEEE. https://doi.org/10.1109/DAPPS49028.2020.00018

Gervais, A., Karame, G. O., Wüst, K., Glykantzis, V., Ritzdorf, H., & Capkun, S. (2016). On the security and performance of proof of work blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (pp. 3–16). ACM. https://doi.org/10.1145/2976749.2978341

Grover, A., & Leskovec, J. (2016). node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 855–864). ACM. https://doi.org/10.1145/2939672.2939754

Gudgeon, L., Werner, S., Perez, D., & Knottenbelt, W. J. (2020). DeFi protocols for loanable funds: Interest rates, liquidity and market efficiency. In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies (pp. 92–112). ACM. https://doi.org/10.1145/3419614.3423254

Guo, D., Ren, J., Zheng, Z., & Gao, B. (2021). Combining graph neural networks with expert knowledge for smart contract vulnerability detection. IEEE Transactions on Knowledge and Data Engineering, 35(2), 1296– 1310. https://doi.org/10.1109/TKDE.2021.3095843

Hamrick, J., Rouhi, F., Mukherjee, A., Feder, A., Dodd, N., Cao, J., & Moore, T. (2021). An examination of the cryptocurrency pump-and-dump ecosystem. Information Processing & Management, 58(4), 102506. https://doi.org/10.1016/j.ipm.2021.102506

He, N., Wu, L., Wang, H., Guo, Y., & Jiang, X. (2020). Characterizing code clones in the Ethereum smart contract ecosystem. In Proceedings of the 24th International Conference on Financial Cryptography and Data Security (pp. 654–675). Springer. https://doi.org/10.1007/978-3-030-51280-4_35

He, N., Wu, L., Wang, H., Guo, Y., & Jiang, X. (2020). Smart contract vulnerability analysis and security audit. IEEE Network, 34(5), 276–282. https://doi.org/10.1109/MNET.001.1900530

Huang, Y., Wang, H., Wu, L., Tyson, G., Luo, X., Zhang, R., Liu, X., Huang, G., & Jiang, X. (2020). Understanding (mis)behavior on the EOSIO blockchain. Proceedings of the ACM on Measurement and Analysis of Computing Systems, 4(2), 1–28. https://doi.org/10.1145/3376930

Jiang, W., Li, C., Wang, P., Luo, X., & Gu, Z. (2023). Detecting and quantifying wash trading on decentralized cryptocurrency exchanges. In Proceedings of the ACM Web Conference 2023 (pp. 1–11). ACM. https://doi.org/10.1145/3543507.3583317

Jourdan, M., Blandin, S., Wynter, L., & Deshpande, P. (2018). Characterizing entities in the Bitcoin blockchain. In Proceedings of the 2018 IEEE International Conference on Data Mining Workshops (pp. 55–62). IEEE. https://doi.org/10.1109/ICDMW.2018.00072

Kiffer, L., Levin, D., & Mislove, A. (2018). Analyzing Ethereum's contract topology. In Proceedings of the 2018 Internet Measurement Conference (pp. 494–500). ACM. https://doi.org/10.1145/3278532.3278575

Lin, D., Wu, J., Yuan, Q., & Zheng, Z. (2020). Modeling and understanding Ethereum transaction records via a complex network approach. IEEE Transactions on Circuits and Systems II: Express Briefs, 67(11), 2737– 2741. https://doi.org/10.1109/TCSII.2020.2968376

Lorenz, J., Ali, M. S., Correia, M., & Casimiro, A. (2021). Machine learning methods to detect money laundering in the Bitcoin blockchain in the presence of label scarcity. In Proceedings of the 1st ACM International Conference on AI in Finance (pp. 1–9). ACM. https://doi.org/10.1145/3490354.3494418

Meiklejohn, S., Pomarole, M., Jordan, G., Levchenko, K., McCoy, D., Voelker, G. M., & Savage, S. (2013). A fistful of bitcoins: Characterizing payments among men with no names. In Proceedings of the 2013 Internet Measurement Conference (pp. 127–140). ACM. https://doi.org/10.1145/2504730.2504747

Perez, D., & Livshits, B. (2021). Smart contract vulnerabilities: Vulnerable does not imply exploited. In Proceedings of the 30th USENIX Security Symposium (pp. 1325–1341). USENIX. https://doi.org/10.5555/3489212.3489257

Phillips, R., & Wilder, H. (2020). Tracing cryptocurrency scams: Clustering replicated advance-fee fraud bitcoin addresses. In Proceedings of the 2020 IEEE International Conference on Big Data (pp. 1211–1218). IEEE. https://doi.org/10.1109/BigData50022.2020.9378281

Qin, K., Zhou, L., Livshits, B., & Gervais, A. (2021). Attacking the DeFi ecosystem with flash loans for fun and profit. In Proceedings of the 25th International Conference on Financial Cryptography and Data Security (pp. 3–30). Springer. https://doi.org/10.1007/978-3-662-64322-8_1

Schär, F. (2021). Decentralized finance: On blockchain- and smart contract-based financial markets. Federal Reserve Bank of St. Louis Review, 103(2), 153–174. https://doi.org/10.20955/r.103.153-74

Torres, C. F., Baden, M., Steichen, M., & State, R. (2019). The art of the scam: Demystifying honeypots in Ethereum smart contracts. In Proceedings of the 28th USENIX Security Symposium (pp. 1591–1607). USENIX. https://doi.org/10.5555/3361338.3361419

Victor, F. (2020). Address clustering heuristics for Ethereum. In Proceedings of the 24th International Conference on Financial Cryptography and Data Security (pp. 617–633). Springer. https://doi.org/10.1007/978-3-030-51280-4_33

Wang, D., Wu, P., Lin, Z., & Zhou, A. (2022). Understanding token-based ecosystem in cryptocurrency: A transaction-network perspective. IEEE Transactions on Network and Service Management, 19(1), 563– 576. https://doi.org/10.1109/TNSM.2021.3130840

Wang, L., Xu, M., & Cheng, H. (2023). Phishing scams detection via temporal graph attention network in Ethereum. Information Processing & Management, 60(4), 103412. https://doi.org/10.1016/j.ipm.2023.103412

Werner, S., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., & Knottenbelt, W. J. (2022). SoK: Decentralized finance (DeFi). In Proceedings of the 4th ACM Conference on Advances in Financial Technologies (pp. 30–46). ACM. https://doi.org/10.1145/3558535.3559780

Xu, J., Paruch, K., Cousaert, S., & Feng, Y. (2023). SoK: Decentralized exchanges (DEX) with automated market maker (AMM) protocols. ACM Computing Surveys, 55(11), 1–50. https://doi.org/10.1145/3570639

Zhang, Y., Yu, W., Li, Z., Raza, S., & Cao, H. (2022). Detecting Ethereum Ponzi Schemes Based on Improved LightGBM Algorithm. IEEE Transactions on Computational Social Systems, 9(2), 624–637. https://doi.org/10.1109/tcss.2021.3088145

Zhou, L., Qin, K., Cully, A., Livshits, B., & Gervais, A. (2021). On the Just-In-Time Discovery of Profit-Generating Transactions in DeFi Protocols. 2021 IEEE Symposium on Security and Privacy (SP), 919–936. https://doi.org/10.1109/sp40001.2021.00113