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..
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.
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.
Foundry for write uint test case.
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
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.