logic-error

Detect business logic vulnerabilities in smart contract code.

60|18|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/PurpleAILAB/Vigilo --skill logic-error
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logic-error
Source: https://github.com/PurpleAILAB/Vigilo/tree/main/packages/claude/skills/vulnerability-patterns/logic-error
Command: npx skills add https://github.com/PurpleAILAB/Vigilo --skill logic-error

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill identifies critical vulnerabilities in smart contract code stemming from logical errors, such as incorrect arithmetic operations, rounding issues, and improper handling of edge cases, which can lead to significant financial losses.

Core Features & Use Cases

  • Vulnerability Pattern Detection: Identifies common logic flaws like division before multiplication, first depositor attacks, precision loss, and unchecked blocks.
  • Calculation Flow Analysis: Provides a structured map to trace arithmetic operations and their potential risks.
  • Use Case: An auditor can use this Skill to quickly scan a smart contract for known patterns that have historically led to exploits, such as fee bypasses or vault inflation attacks.

Quick Start

Analyze the provided smart contract code for potential logic errors.

Frequently Asked Questions about logic-error

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect logic flaws in smart contracts?

Detecting logic flaws involves tracing arithmetic operations and checking for patterns like division before multiplication, first depositor attacks, precision loss, and unchecked block overflows.

What is a first depositor attack in Solidity and how do I check for it?

A first depositor attack is a vault inflation exploit where an early user manipulates token shares. You check for it by verifying rounding and edge case handling during initial deposits.

How do I audit smart contracts for rounding issues and precision loss?

Auditing smart contracts for rounding issues requires tracing calculation flows to identify risks like division before multiplication, which causes precision loss and incorrect arithmetic results.

Can I use this to scan for unchecked block overflows in smart contract code?

Yes, you can scan for unchecked block overflows by mapping arithmetic operations and applying detection patterns to verify if edge cases are mishandled within the smart contract logic.

Does this Skill identify fee bypass vulnerabilities in smart contracts?

Yes, it identifies fee bypass vulnerabilities by analyzing business logic flaws and improper operation ordering, providing verification questions to help auditors confirm the exploit risks.

What are the limitations of automated logic error detection in Solidity?

Automated logic error detection focuses on known historical exploit patterns like arithmetic errors and rounding issues, but requires manual auditor verification to confirm contextual business logic risks.