βͺExternal Call Reverts DoS
External calls can cause the contract to be vulnerable to DoS attacks. To better explain how can this be possible, consider the following simplified Auction contract:
For anyone to be a new owner of the Auction, he needs to send an amount of ether greater than the current price (which is set by the currentOwner
).
To prevent someone else from being a new owner (even if he has more ether than the current price), we can perform a DS attack into the contract by creating a malicious contract that we register as the currentOwner
(by sending ether greater than the current price of course) and reverts the transaction whenever it receives ether. So, when a new address attempts to be a new owner (the currentOwner
is our malicious contract), the transaction will revert, hence the newOwner
will not be set anymore.
Below is an example of a Malicious contract that can perform a DoS attack on the Auction contract:
Last updated