Use safeTransfer/safeTransferFrom consistently instead of transfer/transferFrom
Some tokens do not return a bool (e.g. USDT, BNB, OMG) on ERC20 methods.
https://github.com/d-xo/weird-erc20/#no-revert-on-failure
Tranfser/transferfrom is directly used to send tokens in many places in the contract and the return value is not checked.
If the token send fails, it will cause a lot of serious problems.Let's take an example within this contract. The lender can specify any ERC20 token, such as USDT. In the 'addToPool' function, they can increase the balance of the pool. However, even if the token transfer fails, the function will not revert. The 'addToPool' function will continue to execute successfully. The same issue exists in other functions like 'repay' and 'borrow'. This could lead to severe consequences."
If the token send fails, it will cause a lot of serious problems.
vscode
Consider using safeTransfer/safeTransferFrom consistently.
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.