The transferFromcall was used in the sellErc20and transferErcTokensto transfer tokens without first prompting the sender to approve the transaction.
The sellErc20 and transferErcTokens functions are expressly using the transferFromcall without requiring or prompting the sender to approve the contract to carry out the transaction on their behalf.
Bad actors and malicious users bearing tokens could return falsewithout reverting which can lead to unexpected behaviour.
Transactions will either fail if approvals are missing or a sender's funds could be stolen should bad actors capitalize on the absence of approval.
Manual Code Review and Analysis
Use and implement the SafeERC20 library from OpenZeppelin to:
ensure the safe and secure transfer of ERC-20 tokens, and
ensure that the senders approve the contract for token transfer before the sellErc20 and transferErcTokens functions invoke the transferFrom call
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.