Skip to main content

What Is a Denial-of-Service (DoS) Attack Related to Fallback Functions?

A DoS attack related to fallback functions occurs when a malicious contract's fallback function is intentionally designed to consume excessive gas or always revert. If a vulnerable contract tries to send Ether to this malicious contract using transfer or send , the transaction will fail.

If the vulnerable contract relies on sending Ether to a list of users, the malicious contract can block the entire function for all other users.

How Have Recent Versions of Solidity Changed the Behavior of Fallback Functions to Mitigate This Risk?
Why Are Fallback Functions Critical in a Reentrancy Scenario?
What Is the Difference between a Receive and a Fallback Function in Solidity?
Can a Reentrancy Attack Be Performed without a Fallback Function?