ERC4626 Vault Patterns

Analyze Solidity smart contracts for ERC4626 vault vulnerabilities.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive set of patterns and checks specifically designed to identify vulnerabilities and ensure the security of ERC4626 tokenized vaults.

Core Features & Use Cases

  • Vulnerability Identification: Detects common and critical issues like inflation attacks, rounding errors, and donation attacks.
  • Best Practice Guidance: Offers mitigation strategies and implementation examples for secure ERC4626 vault design.
  • Audit Checklist: Provides a structured checklist to guide the auditing process for ERC4626 vaults.
  • Use Case: An auditor can use this Skill to quickly reference potential pitfalls and best practices when reviewing a new ERC4626 vault implementation, ensuring all critical aspects are covered.

Quick Start

Use the ERC4626 Vault Patterns skill to review the provided smart contract code for inflation attack vulnerabilities.

Frequently Asked Questions about ERC4626 Vault Patterns

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

FAQPage Schema
How do I audit an ERC4626 vault for inflation attack vulnerabilities?

To audit an ERC4626 vault for inflation attacks, analyze smart contract code for vulnerabilities where early attackers can manipulate asset-to-share ratios. This Skill identifies these critical issues and provides mitigation strategies and secure implementation patterns.

What are the most common security vulnerabilities in ERC4626 tokenized vaults?

Common ERC4626 vault vulnerabilities include inflation attacks, rounding direction errors, and donation attacks. This Skill analyzes Solidity code to detect these critical, high, and medium severity issues specific to the ERC4626 standard.

How do I check my smart contract for ERC4626 rounding errors?

Check your smart contract for ERC4626 rounding errors by analyzing the rounding direction of deposit and withdraw operations. This Skill provides audit checklists and security patterns to identify and resolve these edge cases.

Do I need to understand Solidity to audit ERC4626 vaults?

Yes, you need a solid understanding of Solidity and DeFi vault mechanics to use this Skill effectively. It provides security patterns and audit checklists specifically designed for developers and auditors reviewing ERC4626 implementations.

What is the best way to prevent donation attacks in DeFi vaults?

The best way to prevent donation attacks in DeFi vaults is to implement secure ERC4626 patterns that resist asset manipulation. This Skill offers best practice guidance and mitigation strategies for these specific edge cases.