Lending Protocol Patterns

Detects vulnerabilities in DeFi lending protocols covering liquidations, interest rates, and collateral.

66|17|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/BitterSecurity/Vigilo --skill lending-protocol-patterns-bittersecurity
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Lending Protocol Patterns
Source: https://github.com/BitterSecurity/Vigilo/tree/main/packages/claude/skills/protocol-patterns/lending
Command: npx skills add https://github.com/BitterSecurity/Vigilo --skill lending-protocol-patterns-bittersecurity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Auditing DeFi lending protocols requires deep knowledge of recurring vulnerability classes like self-liquidation exploits, interest precision loss, and oracle manipulation, which are easy to miss without a structured reference. ## Core Features & Use Cases - Liquidation Analysis: Identifies profitable self-liquidation, liquidation cascades, and unhandled bad debt in Solidity lending contracts. - Interest Rate Model Review: Checks jump rate models for manipulation via flash loans and precision loss on small amounts. - Collateral & Health Factor Checks: Verifies collateral factor timelocks, oracle resistance, and correct health factor rounding direction. - Use Case: When auditing an Aave- or Compound-style lending protocol, load this skill to walk through a severity-classified checklist covering liquidation, interest, collateral, and access control risks. ## Quick Start Ask the auditor agent to review this lending protocol's liquidation and interest rate logic using the lending patterns checklist.

Frequently Asked Questions about Lending Protocol Patterns

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

FAQPage Schema
How do I audit a DeFi lending protocol for vulnerabilities?▼

Audit a lending protocol by systematically checking liquidation logic, interest rate models, collateral handling, and health factor calculations against known vulnerable patterns. This skill provides Solidity code examples of each vulnerability class plus a severity-classified checklist.

What are common liquidation vulnerabilities in lending protocols?▼

Common issues include profitable self-liquidation when the bonus exceeds (100% - max LTV), liquidation cascades from large positions, and unhandled bad debt when collateral value falls below debt. Mitigations include partial liquidation, circuit breakers, and insurance funds.

How can interest rate models be manipulated in DeFi?▼

Attackers use flash loans to temporarily shift utilization rates and borrow at artificially low rates. Precision loss also occurs when small principal amounts round interest to zero, which is mitigated by accumulating interest at high precision such as Ray (1e27).

Does this skill cover Aave and Compound fork audits?▼

Yes, it documents common Aave/Compound patterns including reserve factors, supply indices, and jump rate interest models. The checklist applies directly to forks of these protocols and similar lending designs.

When is this lending patterns skill loaded during an audit?▼

It is auto-loaded by the defi-auditor agent during Phase 2 when the target is identified as a lending protocol. It is not user-invocable and serves as reference knowledge for the specialist auditor.