The borrow function attempts to withdraw assets from a Curve vault to the LendingPool
if the reserve lacks sufficient liquidity. However, after transferring assets amount - availableLiquidity
to the user, the borrow function directly calls IRToken(reserve.reserveRTokenAddress).transferAsset(msg.sender, amount)
. This creates a mismatch.
The borrow function attempts to replenish liquidity by withdrawing assets from a Curve vault to the borrower when the reserve is depleted. However, the borrowed assets are not credited to the reserve’s RToken
contract. Instead, the function tries to transfer assets from the reserve via IRToken(reserve.reserveRTokenAddress).transferAsset(msg.sender, amount). Since will try to transfer the whole amount (not amount -requiredAmount), the transfer fails, causing transactions to revert and resulting in a DOS for borrowers.
this issue will lead to DOS for borrowers
the same issue in withdraw function.
Manual audit
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.