Pre-auditThree days of senior audit time for $1,500, credited in full toward your Zealynx audit.3 audit days, credited toward your auditSee how →
Checklists/EVM/Lending & Borrowing Security

Lending & Borrowing Security Checklist

30 security checks for DeFi lending, CDP, and borrowing protocols. Covering oracle manipulation, liquidation mechanics, interest rate precision, collateral management, flash loan exploits, and debt accounting. Derived from real audit findings across Aave, Compound, MakerDAO, and 40+ lending protocols.

Threat Analysis

Key statistics from analyzing lending protocol audit findings:

• 2,800+ findings analyzed from real smart contract audits across major lending protocols

• 30 vulnerability patterns identified and categorized across 6 security domains

• 19 Critical/High items require immediate attention in any lending protocol audit

📄
Want this as a PDF? DM me on Telegram →
⚡

Automate with Krait CLI

16/30 checks

53% of these checks can be automated against your codebase. 14 checks require manual review.

/krait:scan --deepInstall Krait →
Showing 30 of 30 vulnerabilities
#1

Oracle Price Manipulation via Flash Loans

CriticalKrait
▼

Collateral/debt pricing uses spot AMM price or stale oracle, enabling flash loan price manipulation to trigger false liquidations

#2

Chainlink Stale Price Acceptance

CriticalKrait
▼

Missing staleness checks on Chainlink oracle responses allows use of outdated prices

#3

Zero or Negative Price Handling

High
▼

Oracle returns zero or negative price without the protocol reverting, leading to incorrect valuations

#4

Debt Token Decimal Mismatch

HighKrait
▼

Debt tracking uses different decimals than borrowed asset, causing scaling errors in interest and liquidation

#5

Cross-Asset Price Correlation Assumptions

Medium
▼

Protocol assumes price correlation between assets that can diverge (e.g., WBTC/BTC, stETH/ETH)

#6

Liquidation Profitability Threshold

CriticalKrait
▼

At extreme collateral ratios, liquidation becomes unprofitable — nobody liquidates, bad debt accumulates

#7

Missing Liquidation Path for All Collateral Types

HighKrait
▼

Some collateral types cannot be practically liquidated, leading to permanently stuck bad debt

#8

Health Factor Stale During Callback

HighKrait
▼

Health factor checked before transfer callback completes, allowing excess borrowing during reentrancy

#9

Incorrect Liquidation Price Calculations

High
▼

Flawed liquidation price formulas allow positions to survive below threshold or trigger premature liquidation

#10

Liquidation Cascades and Cliff Effects

Medium
▼

Multiple positions liquidating simultaneously cause price impact that triggers more liquidations

#11

Interest Rate Calculation Precision Loss

CriticalKrait
▼

Per-second interest compounding with truncation causes systematic underpayment, leading to protocol insolvency

#12

Interest Accrual Skip on Zero Utilization

HighKrait
▼

Interest only accrues when explicitly triggered, pausing during idle periods

#13

Reserve Factor Inconsistency Across Paths

HighKrait
▼

Reserve cut from interest applied differently between deposit, withdraw, and liquidate code paths

#14

Compound Interest Overflow at Extremes

High
▼

Compound interest formula overflows at high rates or long durations, generating incorrect debt values

#15

Bad Debt Accounting Drift

Medium
▼

Protocol does not track or socialize bad debt, allowing it to accumulate silently

#16

Collateral Factor Misconfiguration by Volatility

HighKrait
▼

Same collateral factor for assets with different volatilities leads to under-collateralization

#17

Circular Collateral Valuation (Reflexive Risk)

HighKrait
▼

Protocol's own token used as collateral while its value depends on TVL that includes itself

#18

First Depositor Share Inflation (Vault-Based Lending)

CriticalKrait
▼

ERC4626-style lending vaults without virtual offset allow first depositor to inflate share price

#19

Collateral Value Manipulation via Donation

High
▼

Direct token transfers to the lending pool inflate collateral valuations without going through deposit logic

#20

Frozen/Paused Market Still Accruing Debt

Medium
▼

When a market is frozen, existing positions continue accruing interest but users cannot repay or add collateral

#21

Borrow-Repay Same Transaction (Zero-Duration Borrow)

CriticalKrait
▼

Flash loan allows borrow and repay in same transaction, bypassing interest and gaining protocol benefits

#22

Borrow Cap Bypass via Flash Loan

HighKrait
▼

Flash loan temporarily reduces totalBorrowed, allowing excess borrowing past the cap

#23

Flash Loan Liquidation Front-Running

High
▼

Attacker uses flash loan to push position underwater, liquidate, and profit in one transaction

#24

Reward Claim Front-Running via Permissionless Function

HighKrait
▼

Anyone can call claimRewards on behalf of any user, breaking assumed state or stealing rewards

#25

External Protocol Dependency Shutdown

HighKrait
▼

Protocol integrates with external protocols for yield — if they pause or deprecate, users cannot withdraw

#26

Admin Can Modify Critical Parameters Without Timelock

High
▼

Admin can instantly change interest rates, collateral factors, or oracle sources without delay

#27

Uncontrolled Ownership Transfer

High
▼

Ownership can be transferred to arbitrary address without confirmation, enabling protocol takeover

#28

Emergency Withdrawal Bypass of Accounting

High
▼

Emergency withdrawal functions skip normal accounting, leaving protocol state inconsistent

#29

Missing Pause/Circuit Breaker Mechanism

Medium
▼

Protocol has no way to pause operations during an active exploit or extreme market conditions

#30

Token Recovery Function Drains Active Deposits

Medium
▼

RecoverERC20 or similar rescue functions can withdraw tokens that are actively used as deposits

Need a Professional Lending Protocol Audit?

Lending protocols hold billions in TVL and represent the highest-risk category in DeFi. Get your protocol audited by a team that understands liquidation mechanics, oracle integration, and interest rate edge cases.