LibScan detects smart contract library misuse with 85.15% accuracy
LibScan achieves 85.15% detection accuracy on library misuse in smart contracts, surpassing prior tools by over 16 percentage points
Software arXiv 1 Apr 2026 Method Prototype evidence
Published as “LibScan: Smart Contract Library Misuse Detection with Iterative Feedback and Static Verification”
Why it matters
Deploying LibScan can improve automated auditing of smart contracts, helping developers avoid costly library misuse bugs.
Summary
LibScan achieves 85.15% accuracy detecting eight smart-contract library misuse patterns on a test set of 662 real-world contracts, outperforming Slither (62.39% accuracy) and GPTScan (68.91%). The tool combines large-language-model semantic reasoning with static analysis and an iterative feedback loop to lower false positives. Evidence is limited to the reported evaluation; no external replication is provided.
What they found 1
- LibScan attains 85.15% accuracy on 662 real-world contracts, surpassing existing tools
“Evaluations on 662 real-world contracts show its superior accuracy of 85.15% and robustness, surpassing existing tools like Slither and GPTScan.”
Caveats 2
- For DeepSeek V3 and GPT-4 Turbo, improvements plateaued after the third iteration, with an increase in erroneous predictions.
- Limitations include its ability to handle highly complex code semantics, which will be addressed in future work through enhanced model training and expanded pattern coverage.
What’s new here 4
- First tool that fuses LLM semantic analysis with deterministic static analysis for library misuse detection
- Introduces an iterative feedback mechanism to reduce LLM hallucinations and false positives
- Uses a pattern-aware knowledge base and TF-IDF structural matching to guide LLM prompts
- Integrates LLM and static analysis outputs via a Random Forest ensemble