Define a “Reentrancy Attack” in Smart Contracts.
A reentrancy attack occurs when an external malicious contract repeatedly calls back into the vulnerable contract before the first function call has completed its state update. This allows the attacker to drain funds by repeatedly withdrawing assets before the contract has registered the change in the attacker's balance.
It is a critical vulnerability, famously exploited in the DAO hack.