Glossary entry
Reentrancy Attack
Wallets & SecurityA reentrancy attack calls back into a contract before it updates balances, letting an attacker withdraw repeatedly in one transaction.
Definition
A reentrancy attack exploits a smart contract that sends funds out before it updates its own internal records. The receiving contract uses that moment to call back into the original function, which still shows the old balance, and repeats the withdrawal several times within a single transaction. It is one of the oldest and best known classes of smart contract vulnerability and helped shape modern Solidity practice. Standard defences are the checks-effects-interactions pattern, where state is written before any external call, and reentrancy guards that lock a function while it is executing. Reentrancy is a reminder that in shared, composable code any external call can hand control to an untrusted party, which is why audits and formal testing focus heavily on call ordering.
Next