Re-Entrancy Vulnerability

Vulnerability

Re-entrancy vulnerability is a critical smart contract flaw where an external call to another contract allows the external contract to call back into the original contract before the initial function execution is complete. This creates a loop where the attacker can repeatedly execute a function, such as withdrawing funds, before the protocol’s state variables are updated. The vulnerability arises from improper sequencing of operations, specifically performing external calls before updating internal balances. This flaw was famously exploited in the DAO hack, highlighting the severe risks associated with insecure code design.