Main article

Daniel Osei
Department of Computer Science, University of Ghana, Accra, Ghana
Miriam Mensah
Department of Information Technology, Ghana Communication Technology University, Accra, Ghana
Kwame Boateng *
Department of Computer Engineering, Accra Technical University, Accra, Ghana
kboateng@atu.edu.gh

DOI: https://doi.org/10.63646/jaiaa.2026.040103

Abstract

Layer-2 rollup protocols reduce the cost of smart-contract execution by moving computation away from the base chain while retaining a dispute or proof mechanism that restores verifiability. This article develops an AI-driven anomaly analytics framework for detecting free-riding, copy attacks, and no-action behaviors in replicated rollup computation. The study is inspired by formal security work showing that optimistic replicated-computation protocols may still produce correct outputs while failing to identify managers who avoid performing the required computation. Instead of replacing formal verification, the proposed framework adds a telemetry oriented analytics layer that learns behavioral signatures from assertion timing, vote behavior, commitment consistency, Merkle-proof availability, gas-use traces, and manager interaction graphs. A simulated benchmark of 180,000 protocol events is used to compare rule thresholds, isolation forests, supervised gradient boosting, graph-enhanced learning, and hybrid ensembles. The hybrid model achieves the strongest overall performance, with an F1 score of 0.91 and the highest recall for copy and no-action behaviors. The paper contributes a layered architecture, anomaly taxonomy, feature-engineering design, experimental evaluation, and governance roadmap for trustworthy Layer-2 smart-contract operations.

Article details

How to Cite

Osei, D., Mensah, M., & Boateng, K. (2026). AI-Driven Anomaly Analytics for Layer-2 Smart Contracts: Detecting Free-Riding, Copy Attacks, and No-Action Behaviors in Rollup Protocols. Journal of AI Analytics and Applications, 4(1), 27-39. https://doi.org/10.63646/jaiaa.2026.040103