transferRoyalties
function includes three calls to the transferFrom and transfer functions of an ERC20 token, but it does not check whether these calls return true. In the ERC20 standard, transfer and transferFrom return a boolean indicating whether the operation was successful. Failure to check these return values can lead to unexpected behavior if any of these transfers fail silently.
The following code lines contain unchecked return values:
If any of these transfers fail:
Funds might not be properly distributed, leaving some parties without their expected funds.
The contract might continue with invalid state assumptions, potentially leading to accounting inconsistencies.
Users expecting funds may be financially impacted, reducing the reliability of the contract.
Manual code reading
Check the return value of each transferFrom and transfer call and handle any failures appropriately.
OR
Medium – This issue does not directly impact security but can lead to significant financial inconsistencies and operational issues if left unaddressed.
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.