selfdestruct
can send ether to the protocol and cause the requirement in withdraw
to fail, leading to denial of service.
Since the contract can receive ether without receive or fallback function if malicious user can selfdestruct their contract and send the ether to victim contract. In this case, the contract balance can exceed the value of totalFees.
This will lead to the denial of service and the user cannot withdraw the ether from the protocol. All the token will be locked in the contract.
manual review
Use require(address(this).balance >= uint256(totalFees))
instead
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.