15,000 USDC
View results
Submission Details
Severity: medium

Balance Values Issues After liquidated

Summary

During the testing of the stable coin liquidation process, I observed discrepancies in balance values between two different contracts after calling the liquidated function. The liquidation process involves a user being liquidated, and another user paying for the liquidated assets and receiving benefits in the form of tokens. However, there are inconsistencies in the balance values after this process..

Vulnerability Details

Let suppose User1 is liquidated and User2 is going to pay his liquidated, When User2 call function liquidated in DSCEngine to liquidate the asset once it finished.

Case #1 (User1)
if you check values of getAccountInformation {totalDscMinted} , User1 -> totalDscMinted = 0 but if you get balance of DSCStableCoin it will show you it coin balance is grater then zero.

Case #2 (User2)
if you check values of getAccountInformation {totalDscMinted} , User2 -> totalDscMinted = it will be greater then Zero but if you get balance of DecentralizedStableCoin it will show you it coin balance is equal to zero.

Impact

Even User1 coin is liquidated but still he have coin DecentralizedStableCoin and he can transfer it to other account or used it, Or User2 show he have certain amount of coin Minted but his balance is zero.

Tools Used

Foundry for write uint test case.

Recommendations

According to my view if we burn coin is their is way we can burn User1 coin or make User2 balance updated he burn the coin so atleast he can show correct amount of token

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.