Skip to main content

Reentrancy

Definition

Reentrancy is a security vulnerability in smart contracts that allows an attacker to repeatedly execute a function before the initial execution has completed. This occurs when a contract makes an external call to another untrusted contract, which then calls back into the original contract before its state has been updated. The attacker can exploit this loop to drain funds or manipulate contract logic. It represents a critical flaw in contract design that necessitates careful coding practices. Preventing reentrancy is a primary concern for secure smart contract development.