ASE2025

Faultseeker: LLM-Empowered Framework for Blockchain Transaction Fault Localization

Kairan Sun, Zhengzi Xu, Kaixuan Li, Lyuye Zhang, Yuqiang Sun, Liwei Tan, Yang Liu

Abstract

Web3 applications, particularly decentralized finance (DeFi) protocols, have grown rapidly with over 100billionlockedinsmartcontracts,attractingsophisticatedattackscausingbillionsinlosses.Whenattackoccur,securityanalystsneedtoperformfaultlocalizationtoidentifyvulnerablefunctionsandunderstandattackvectors.Thiscriticalprocesscurrentlyrequiresanaverageof16.7analysthoursperincidentduetocomplexblockchainexecutionmodels,rapidlyevolvingprotocolinteractions,andmulticontractattackpatternsthatexceedexistinganalyticalcapabilities.Despiteitscriticalimportance,blockchainfaultlocalizationhasreceivedlimitedattentionduetofundamentalchallengesrequiringsemanticunderstandingofeconomicmodelsandprotocolspecificlogic.Existingblockchainspecifictoolstargetonlysinglevulnerabilitytypes,whiletheonlycomprehensivesolution,DAppFL,reliesonmachinelearningmodelthatmaymisssophisticatedexploitsandlacksinterpretabilityinresults.Recentadvancesinlargelanguagemodels(LLMs)demonstrateremarkablecodecomprehensioncapabilities,butexistingapplicationsfocusonproactivevulnerabilitydetectionwithminimalexplorationofpostincidentfaultlocalization.WepresentFaultSeeker,anLLMempoweredframeworkforblockchaintransactionfaultlocalization.Ourtwostagearchitecturecombinestransactionlevelforensicsforstrategicscopingwithcoordinatedspecialistagentsforsustainedreasoning.Thisdesignprovideslongtermmemorymanagementviaorchestratoragentsandspecializedattentionallocationthroughcoordinatedworkers,enablingcomprehensiveanalysisacrosscomplexmulticontracttransactionswithoutcontextloss.WeevaluateFaultSeekeronacompileddatasetof115realworldmalicioustransactionswithexpertvalidatedannotationsspanningdiverseattackpatternsandcomplexitylevels.ResultsdemonstratethatFaultSeekersignificantlyoutperformsexistingapproaches,includingDAppFLandleadingnativeLLMs(GPT4o,Claude3.7Sonnet,DeepSeekR1),whilemaintainingpracticalefficiency(4.48.6minutes)andcosteffectiveness(100 billion locked in smart contracts, attracting sophisticated attacks causing billions in losses. When attack occur, security analysts need to perform fault localization to identify vulnerable functions and understand attack vectors. This critical process currently requires an average of 16.7 analyst hours per incident due to complex blockchain execution models, rapidly evolving protocol interactions, and multi-contract attack patterns that exceed existing analytical capabilities. Despite its critical importance, blockchain fault localization has received limited attention due to fundamental challenges requiring semantic understanding of economic models and protocol-specific logic. Existing blockchain-specific tools target only single vulnerability types, while the only comprehensive solution, DAppFL, relies on machine learning model that may miss sophisticated exploits and lacks interpretability in results. Recent advances in large language models (LLMs) demonstrate remarkable code comprehension capabilities, but existing applications focus on proactive vulnerability detection with minimal exploration of post-incident fault localization.We present FaultSeeker, an LLM-empowered framework for blockchain transaction fault localization. Our two-stage architecture combines transaction-level forensics for strategic scoping with coordinated specialist agents for sustained reasoning. This design provides long-term memory management via orchestrator agents and specialized attention allocation through coordinated workers, enabling comprehensive analysis across complex multi-contract transactions without context loss. We evaluate Fault-Seeker on a compiled dataset of 115 real-world malicious transactions with expert-validated annotations spanning diverse attack patterns and complexity levels. Results demonstrate that FaultSeeker significantly outperforms existing approaches, including DAppFL and leading native LLMs (GPT-4o, Claude 3.7 Sonnet, DeepSeek R1), while maintaining practical efficiency (4.4- 8.6 minutes) and cost-effectiveness (1.55-$4.53 per transaction).