Gearbox-protocol / core-v3

Other
28 stars 4 forks source link

Borrowing `irm.availableToBorrow` might result in an unintended revert #194

Open lekhovitsky opened 6 months ago

lekhovitsky commented 6 months ago

availableToBorrow returns an amount that would move utilization to exactly $U_2$, but trying to borrow this amount would result in BorrowingMoreThanU2ForbiddenException because of use of incorrect sign in calcBorrowRate.