ICredToken::approve, ICredToken::transfer and ICredToken::transferFrom have incorrect ERC20 function interfaces. These ERC20 functions should return a bool value to indicate success or failiure, but the ICredToken interface do not define these return values. A contract compiled with Solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing.
Smart contracts interacting with ICredToken expecting boolean return values from these functions may revert or fail to execute as anticipated, leading to potential integration issues or loss of functionality.
Consider a DeFi platform that offers a staking feature, allowing users to stake ERC20 tokens in return for rewards:
The stakeTokens function uses require to check the success of transferFrom by expecting a boolean return value. However, since ICredToken's transferFrom does not return any value (due to the incorrect interface definition), the contract will revert and fail to execute, preventing users from staking their tokens.
Slither
Update the ICredToken interface to align with the ERC20 standard by ensuring that approve, transfer, and transferFrom return a boolean value:
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.