Open hats-bug-reporter[bot] opened 5 months ago
@cryptotechmaker Why the issue is labelled invalid?
We added the repay pause option for the case when there are issues with repayment; if that's paused, it would be intended.
@cryptotechmaker i understand the pause requirement on repay function. The issue is about continuous acrueing of interest even when the repay is paused. This should not be intended as the users are enforced to pay higher interest due to this issue.
As it can be seen in Singularity.updatePause()
function,
In case of 'unpause', `lastAccrued` is set to block.timestamp
the last accrued timestamp is reset to current block.timestamp which means the interest generated in repay pause period is not being considered due to reset of accrue timestamp. It means in Singularity
, users are not being to force to pay more interest due to pause of repay function and they would be paying the actual interest which are deemed to pay irrespective of pause or unpause of repay function, However, this is exactly opposite in BigBang
.
A similar approach as done in Singularity.updatePause()
can be implemented to mitigate the above issue to avoid higher payment of interest by users due to pause of repay function.
@cryptotechmaker i understand the pause requirement on repay function. The issue is about continuous acrueing of interest even when the repay is paused. This should not be intended as the users are enforced to pay higher interest due to this issue.
As it can be seen in
Singularity.updatePause()
function,In case of 'unpause', `lastAccrued` is set to block.timestamp
the last accrued timestamp is reset to current block.timestamp which means the interest generated in repay pause period is not being considered due to reset of accrue timestamp. It means in
Singularity
, users are not being to force to pay more interest due to pause of repay function and they would be paying the actual interest which are deemed to pay irrespective of pause or unpause of repay function, However, this is exactly opposite inBigBang
.A similar approach as done in
Singularity.updatePause()
can be implemented to mitigate the above issue to avoid higher payment of interest by users due to pause of repay function.
@maarcweiss Can you please check this issue
Github username: -- Twitter username: -- Submission hash (on-chain): 0x7e95ff9a2fd2ce4f54c50454f4b559cc3921ca80ab9312f483b98e623f3b25d1 Severity: medium
Description: Description\
BBBorrow.repay()
function allows a borrower to repay debt. This function has implemented theoptionNotPaused(PauseType.Repay)
modifier, which will prevent the function from being used if the loan repayment is paused.The problem is that the usage of this function should not be prevented with the use of
optionNotPaused(PauseType.Repay)
modifier onrepay()
because if user is unable to repay their debts, they would need to pay higher debts when loan repayment is paused byConservator
by callingBigBang.updatePause()
repay()
will call the_accrue()
to get the interest over the passed time period. The interest rate depends on the time passed which means higher the time passed, then the higher interest has to be paid by the users.Therefore, when the loan repayment is paused the user interest is still accuring interest and the user has to pay unnecessary high amount than he had to pay earlier. This introduces an unnecesary risk to users by preventing them to repay their debts.
Therefore, it is recommended to not accrue interest when the loan repayment is paused.
Impact\ Interest is still accuring when the loan repayment is paused, it will force user to incur debts and pay higher debts than he had to earlier due to repay pause.
Recommendation to fix\ Recommended to not accrue interest when the loan repayment is paused.
A similar approach as done in
Singularity.updatePause()
can be implemented to mitigate the issue.