Make contract unusable by exploiting push external calls 😈
packages/hardhat/contractsfolder and check out what contracts we have there.
highestBidderyou have to send ETH greater than the previous
DoS with (Unexpected) revert. So how does it work?
bid()function, and stay the leader forever.
fallback()was commented in our
scaffold-ethto make sure our assumption works fine.
attackmethod as an attacker and disable our
highestBiddereven though he puts more ETH that we did.
favor pull over push for external calls.
GoodAuction.sol. Note how we added a new method
withdrawRefund. Now we do not depend on any push external calls like sending money back to someone.