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.

What Is a Reentrancy Attack in Smart Contract Security?
What Is a Reentrancy Attack in the Context of Smart Contract Vulnerabilities?
How Does a Reentrancy Attack Relate to the DAO Hack?
Why Must State Updates Occur before External Calls?
What Happens to My Investment If a Rebase Token’s Smart Contract Is Exploited?
How Does a Reentrancy Attack Specifically Exploit Smart Contract Logic?
How Did the DAO Hack Use a Reentrancy Vulnerability?
What Is a ‘Front-Running’ Attack in the Context of an Oracle Price Update?

Glossar