If the contract does not have the necessary allowance, the transferFrom call will fail. This can lead to failed transactions.
In the transferErcTokens function, the contract attempts to transfer ERC20 tokens from the caller (msg.sender) to another address (to). However, the function does not validate whether the caller has approved the contract to transfer the specified amount of tokens on their behalf.
If the caller has not provided the necessary allowance for the contract to transfer their tokens, the call to transferFrom will fail
Manual Code Review
Ensure that the contract has sufficient approval to transfer the tokens from the sender
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.