Unchecked return values in distributeRewards()
function
In the distributeRewards()
function, the return value of ISDLPoolPrimary(sdlPool).withdrawRewards(tokens);
is not checked.
In the distributeRewards()
function, the function ISDLPoolPrimary(sdlPool).withdrawRewards(tokens);
is called without checking its return value. If this function call fails for any reason (e.g., due to a bug in the external contract or because of an error condition), the distributeRewards()
function would continue executing as if nothing went wrong, potentially leading to incorrect state updates or other issues.
Always check the return value of external calls. If the function returns a boolean, you can use a require
statement to ensure that the call was successful. If the function returns an error code, you can decode the returned data and handle different error codes appropriately.
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.