Platform: Code4rena
Start Date: 08/05/2023
Pot Size: $90,500 USDC
Total HM: 17
Participants: 102
Period: 7 days
Judge: 0xean
Total Solo HM: 4
Id: 236
League: ETH
Rank: 26/102
Findings: 1
Award: $732.00
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: xuwinnie
Also found by: BoltzmannBrain, Udsen, mussucal
731.996 USDC - $732.00
https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/VToken.sol#L1026-L1032 https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/Comptroller.sol#L449-L454 https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/Comptroller.sol#L469-L472
In preLiquidateHook(), TooMuchRepay() reverts when it should not and may cause DoS.
File: VToken.sol Functions: liquidateBorrow(), _liquidateBorrow(), _liquidateBorrowFresh() It is not possible to know the exact repayAmount to be passed at the start in liquidateBorrow(). Hence, to completely liquidate an amount sufficiently greater than borrow amount is desired. Down the line, preLiquidateHook() is called with repayAmount as parameter. Inside the hook checks are there like (repayAmount > borrows) and (repayAmount > maxClose) which reverts with TooMuchRepay() each time.
Manual review.
Other
#0 - c4-judge
2023-05-18T02:35:01Z
0xean marked the issue as duplicate of #365
#1 - c4-judge
2023-06-05T14:11:57Z
0xean marked the issue as satisfactory