Closed c4-bot-7 closed 2 months ago
hansfriese marked the issue as primary issue
The impact seems negligible because a healthy liquidation is fine for the system. The resulting SR would have CR > 1 because the returning ercDebt/collateral is equal to 1 and gets averaged with a CR > 1. Also not planning to fix because this situation only happens from user error:
Agree with the sponsor. QA at best as it pertains to the user's abnormal behavior.
hansfriese marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-07-dittoeth/blob/ca3c5bf8e13d0df6a2c1f8a9c66ad95bbad35bce/contracts/facets/DisputeRedemptionFacet.sol#L93-L101
Vulnerability details
Description
When a proposal is disputed, the Short Records (SRs) from the disputed proposal can each be merged with their former SR or they get added to the TAPP.
They will get merged with their former SR in the
else
block below if the SR is not closed.DisputeRedemptionFacet.sol#L83-L118
SRs can be reused and if the disputed SR is merged with a reused SR it may produce a liquidatable SR. Consider the following scenario:
Impact
Proposal disputes can create liquidatable positions.
Proof of Concept
The test can be run in Redemption.t.sol file.
Tools Used
Manual Analysis
Recommended Mitigation Steps
Consider simulating the merge and adding a collateral ratio check on that simulation before merging with the old SR. If the collateral ratio is not high enough, merge with TAPP.
Assessed type
Other