Here are three specific DeFi smart contract vulnerabilities commonly identified in professional audit reports. Each entry includes the vulnerability class, a specific technical description, potential impact, and recommended mitigation.
1. Reentrancy in Combined Deposit/Interest Functions
Vulnerability Class: Reentrancy
CWE: CWE-841 (Improper Enforcement of Behavioral Workflow)
Severity: High / Critical
Description
A common pattern in lending or savings protocols is a function that allows users to deposit assets and, in the same transaction, claim accumulated interest or rewards. If this combined function does not enforce the Checks-Effects-Interactions (CEI) pattern, an attacker can re-enter the function before the protocol’s internal state (e.g., user balance or reward accrual data) is updated.
Example Scenario:
Top comments (0)