AI-Driven Anomaly Analytics for Layer-2 Smart Contracts: Detecting Free-Riding, Copy Attacks, and No-Action Behaviors in Rollup Protocols
Main article
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.
