You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Summary
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Vulnerability Detail
If collateral asset will be paused in CollateralBook that means that no one will be able to call closeLoan function and close his loan, because of collateral check.
That would be fine if no interests were accrued in that period. But interests accruing is not stopping.
So when the collateral asset will be unpaused and users will be allowed to close their loans they might pay more interests that they were expected.
Example.
1.User wants to close his loan were 100$ of interests are accrued at the moment.
2.Owner pauses collateral asset that user used for loan in CollateralBook.
3.User couldn't close loan and should wait.
4.After some long time collateral asset is unpaused and now user have 150$ of interests that he should pay.
5.As a result user lost 50$.
Impact
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Code Snippet
Tool used
Manual Review
Recommendation
Stop accruing interests or allow to close loans with pause collateral asset.
rvierdiiev
high
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Summary
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Vulnerability Detail
If collateral asset will be paused in CollateralBook that means that no one will be able to call closeLoan function and close his loan, because of collateral check.
That would be fine if no interests were accrued in that period. But interests accruing is not stopping.
So when the collateral asset will be unpaused and users will be allowed to close their loans they might pay more interests that they were expected.
Example.
1.User wants to close his loan were 100$ of interests are accrued at the moment.
2.Owner pauses collateral asset that user used for loan in CollateralBook.
3.User couldn't close loan and should wait.
4.After some long time collateral asset is unpaused and now user have 150$ of interests that he should pay.
5.As a result user lost 50$.
Impact
Vault_Lyra will continue calculate interests when contract collateral asset is paused
Code Snippet
Tool used
Manual Review
Recommendation
Stop accruing interests or allow to close loans with pause collateral asset.
Duplicate of #234
The text was updated successfully, but these errors were encountered: