After creating a contest, the contest manager is expected to add rewards to it. However, due to the token address being wrapped into the IERC20 interface, this action will revert and make it impossible to fund contests with certain tokens that do not conform strictly to the ERC20 standard.
To add reward to the pot manager calls the fundContest
function:
The issue arises because some tokens (e.g., USDT, BNB, OMG) do not return a boolean value on transfer operations. Wrapping these tokens in the IERC20 interface, which expects a boolean return value, will cause the transaction to revert.
The contest manager is not able to add as a reward any of the tokens that do not return boolean on transfer.
Manual code review
Use the SafeERC20 library implementation from OpenZeppelin and call safeTransfer
or safeTransferFrom
when handling ERC20 tokens in both Pot
and ContestManager
contracts.
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.