A Distributed Denial of Service (DDoS) attack on a smart contract aims to overwhelm the contract or the blockchain network with excessive transactions, causing delays or making the contract unusable.
Loop in the claimAllRewards function:
Potential scenario:
An attacker can change the protocol’s ownership (due to the changeOwner function lacking an onlyOwner check), set the mysteryBox value to 0 ETH, and then use the openBox function multiple times (e.g., 100 times), effectively blocking the protocol.
Foundry
Insetd of count `totalValue` in loop better is create map
and modifing this map during opening, transferring, or withdrawing funds.
eg.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.