GlossaryAdvanced
Reentrancy Attack
A smart contract exploit where a malicious contract repeatedly re-enters a function before it finishes.
A reentrancy attack exploits a smart contract that calls an external contract before finishing its own internal accounting update, letting the malicious external contract call back into the original function repeatedly before that update completes — potentially draining funds through repeated, improperly-accounted withdrawals.
This was the exploit behind several major, well-documented historical DeFi incidents, and is now a well-known pattern that security-conscious contract development specifically guards against.
Examples
- A reentrancy attack repeatedly calls back into a vulnerable function before its state update completes.
- Well-established coding patterns exist specifically to prevent reentrancy vulnerabilities.