Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

rvierdiiev - Vault_Lyra will continue calculate interests when contract collateral asset is paused #42

Closed
github-actions bot opened this issue Dec 11, 2022 · 1 comment

Comments

@github-actions
Copy link

github-actions bot commented Dec 11, 2022

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

@kree-dotcom
Copy link

Sponsor confirmed, will fix, duplicate of issue #234. Advise moving to Medium severity as was intended as a feature originally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants