Smart Contract Reentrancy

Mechanism

Reentrancy occurs when an external call to an untrusted contract allows the calling contract to interrupt execution and re-enter the logic flow before the initial transaction completes. Within decentralized finance, this often manifests as a recursive withdrawal where the attacker repeatedly triggers balance transfers before the accounting state updates to reflect the depletion of funds. Traders and developers must recognize this as a failure in state management during asynchronous operations.