Patch the liquidation bug in the multi-collateral contracts.
A bug in the multi-collateral contracts was identified by the Marqet team. The issue is described in detail on Github. The bug caused some positions to be flagged for total liquidation when they should only be partially liquidated. This SIP implements the required fix and will deploy a new instance of each collateral contract.
The current contracts are vulnerable to a liquidation bug and opening positions has now been disabled on them. New contracts are required before the system can be restarted.
liquidationAmount should return a value that is denominated in the synth that was borrowed.
Previously it returned an
sUSD value which meant that for loans denomianted in other currencies, an incorrect comparison was performed.
Addressed on the Github issue.
A new instance of all 3 collateral contracts will be deployed. Opening positions has been disabled on the old contracts but they will continue to exist. This means that users with open positions can still close them.
Test cases are included with the implementation.
Copyright and related rights waived via CC0.