Reentrancy Attack

Reentrancy Attack: Exploiting Function Recursion

Reentrancy attacks exploit smart contracts by repeatedly calling functions before previous executions complete. It’s like withdrawing money from an ATM that forgets to update your balance between transactions.

A reentrancy attack is a smart contract exploit where malicious contracts repeatedly call vulnerable functions before state changes are finalized, potentially draining funds or manipulating contract behavior. These attacks exploit the order of operations in smart contract execution.

How Reentrancy Attacks Work

Recursive calling involves malicious contracts that call back into vulnerable functions during the execution of those same functions, before state updates complete.

State manipulation occurs when contracts check balances or conditions that haven’t been updated yet, allowing attackers to perform actions multiple times.

Fund drainage happens when withdrawal functions can be called repeatedly before balance updates, enabling attackers to withdraw more than their actual holdings.

Reentrancy attack flow showing initial call, recursive callback, state inconsistency, and exploit completion

Real-World Examples

  • The DAO hack in 2016 used reentrancy to drain $60 million, leading to Ethereum’s hard fork
  • Various DeFi exploits have used reentrancy to steal millions from poorly secured protocols
  • Cream Finance lost $37 million to a reentrancy attack combined with other vulnerabilities

Why Beginners Should Care

Smart contract risk understanding helps evaluate protocol security and the importance of professional audits before using new platforms.

Prevention awareness shows why established protocols with battle-tested code tend to be safer than new, unaudited projects.

Recovery impossibility since blockchain transactions can’t be reversed, making prevention the only protection against reentrancy exploits.

Related Terms: Smart Contract, Smart Contract Audit, DeFi Security, Exploit

Back to Crypto Glossary

Similar Posts

  • Sybil Attack

    Sybil Attack: Fake Identity Manipulation Sybil attacks involve creating multiple fake identities to gain disproportionate influence in networks that assume one person equals one vote. It’s like stuffing the ballot box with imaginary voters. A Sybil attack is when an individual or entity creates multiple fake identities to gain unfair influence over a network, voting…

  • Omnichain

    Omnichain: Universal Blockchain ConnectivityOmnichain refers to applications and protocols that operate seamlessly across multiple blockchain networks as if they were a single unified system. It's like having apps that work on every phone brand without modification.Omnichain describes systems that can operate across multiple blockchain networks simultaneously, providing unified functionality and user experiences regardless of which…

  • Bitcoin (BTC)

    Bitcoin (BTC): Digital Money That Banks Can’t Control Bitcoin isn’t just another investment – it’s the financial revolution that started it all. When traditional banks failed us in 2008, Bitcoin emerged as the answer. Bitcoin is digital money that operates without banks, governments, or middlemen controlling it. Think of it as cash for the internet…

  • Proof of History

    Proof of History: Solana’s Time Innovation Proof of History creates a cryptographic timestamp that proves events occurred in a specific sequence. It’s like having an unforgeable clock built into the blockchain. Proof of History (PoH) is a consensus mechanism that creates a historical record proving that events occurred at specific moments in time. It uses…

  • Digital Currency

    Digital Currency: Electronic Money SystemsDigital currency refers to money that exists only in electronic form, including both centralized and decentralized varieties. It's like having money that lives entirely in computers and phones instead of physical bills and coins in your wallet.Digital currency encompasses all forms of money that exist exclusively in electronic format, including cryptocurrencies,…

  • Mobile Wallet

    Mobile Wallet: Cryptocurrency on Your PhoneMobile wallets are smartphone applications that store, send, and receive cryptocurrency. They're like having a digital bank in your pocket with global reach.A mobile wallet is a smartphone application that enables users to store, manage, and transact with cryptocurrencies directly from their mobile devices. These wallets prioritize convenience and accessibility for…