Because the user can input an amount equal to 0, lock owners can potentially spam the withdraw()
function to keep updateNeeded
always equal to 1. This can result in unnecessary gas consumption for the system when calling CCIP to update the system.
Consider adding a requirement for the withdrawal amount to always be greater than 0:
Similarly to the withdraw function in the SDLPoolPrimary
contract, it would be clearer to check if the entered amount is different from 0.
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.