Here are three of the most common and dangerous DeFi smart contract vulnerabilities, along with specific methods to detect them during auditing or development.
1. Reentrancy Attacks
Description:
Reentrancy occurs when an external call is made to an untrusted contract before the state variables of the calling contract are updated. This allows the external contract to re-enter the vulnerable function before the first execution completes, potentially draining funds or corrupting state.
Common Scenario:
A withdrawal function that sends ETH to a user via call or transfer before updating the user’s balance in the mapping.
How to Detect It:
Top comments (0)