Dynamic Hack
Incident Overview
Dynamic Finance suffered a reentrancy bug attack on February 22, 2023, resulting in a loss of 73 BNB, approximately $22,400.
The attacker used a reentrancy bug that tricked the deposit tracking system of the StakingDYNA contract. By taking out a large flash loan to borrow $DYNA and depositing it before redeeming the deposit, the attacker was able to earn rewards and pay back the flash loan, resulting in a profit. After withdrawing funds from one address, the attacker transferred the funds to the next address for the same operation, allowing them to profit multiple times.
Incident Report
Protocol Information
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to Dynamic, these are the critical security checks that could have prevented this incident (February 2023).
- Verify all logic paths related to Reentrancy are guarded by proper access controls and input validation - see the Reentrancy attack class for patterns
- Check that all state-changing functions follow the Checks-Effects-Interactions (CEI) pattern to prevent reentrancy and logic ordering bugs
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialRelated Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Sources & References
- 01
- 02
- 03
-
04
Web Archive https://archive.ph/GhJdx
Learn to Prevent the Next Dynamic
The Dynamic hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.