Interest accruing only depends on the time elapsed, but not whether the repayment is paused. This can create debt for user, and make user account unhealthy and eventually user’s position is subject to liquidation.
even when admin unpause the repayment, MEV bot can frontrun user's repayment and liqudiate user.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider not accruing interest when repayment is paused, or not allowing to disable repayment.
Lines of code
https://github.com/code-423n4/2023-12-initcapital/blob/a53e401529451b208095b3af11862984d0b32177/contracts/core/InitCore.sol#L535 https://github.com/code-423n4/2023-12-initcapital/blob/a53e401529451b208095b3af11862984d0b32177/contracts/lending_pool/LendingPool.sol#L161
Vulnerability details
Impact
Interest still accuring when repayment is paused
Proof of Concept
When the admin pause the lending pool repayment,
as timestamp elapses,
interest still accuring
Interest accruing only depends on the time elapsed, but not whether the repayment is paused. This can create debt for user, and make user account unhealthy and eventually user’s position is subject to liquidation.
even when admin unpause the repayment, MEV bot can frontrun user's repayment and liqudiate user.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider not accruing interest when repayment is paused, or not allowing to disable repayment.
Assessed type
Timing