What Is a Reentrancy Attack in Smart Contracts?
A reentrancy attack occurs when an external call from a smart contract to an untrusted contract "re-enters" the original contract before the first execution is complete. This typically happens in withdrawal functions where the balance is updated after the external call to send Ether.
The malicious contract can call the withdrawal function again and again, draining the contract's funds. It is a critical vulnerability in blockchain security.
Glossar
Reentrancy Risk
Exploitation ⎊ Reentrancy risk within cryptocurrency and decentralized finance arises from recursive external calls in smart contracts, enabling a malicious actor to repeatedly withdraw funds before the contract’s state is updated, effectively draining available balances.
Reentrancy Attack
Exploit ⎊ The reentrancy attack, a critical vulnerability in smart contracts and financial systems, leverages recursive function calls to circumvent intended security protocols.