Possible DoS Attack Risk In withdrawFees() Function
The withdrawFees() does not check if the feeAddress is the zero address, which is a valid Ethereum address. If the function is called with the zero address, it will attempt to send the fees to the zero address, which is not possible because the zero address does not have a balance.
Let's say an attacker wants to disrupt the withdrawFees() function. The attacker could call the changeFeeAddress() function with the zero address as the new fee address. The withdrawFees() function will then attempt to send the fees to the zero address, causing the function to fail and consume all the gas available for the transaction.
Remix, Foundry, PhindAI
To mitigate this issue, the withdrawFees() function should check if the feeAddress is the zero address before attempting to send the fees.
This can be done using the require statement with the condition:
This check ensures that the function does not proceed if the feeAddress is the zero address.
Here's how the withdrawFees() function is modified to include this check:
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.