In both the borrow()
and repay()
functions in the Lender.sol
contract, the return values of transfer and transferFrom are unchecked.
When a borrower goes to borrow, the transfer may return false
but their debt owed has been set, so they will have posted collateral and owe money on a loan in which they did not receive any tokens.
Similarly in the repay()
function, a borrower can repay a loan, but since the transfer goes unchecked, the may have paid off their loan, but may not receive their collateral back
Borrower can lose all their funds.
manual review and vs code
Check return values on transfer and transferFrom to make sure they are working properly.
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.