SIP-105: Multi-collateral Liquidation Bug Fix
Author | |
---|---|
Status | Implemented |
Type | Governance |
Network | Ethereum |
Implementor | TBD |
Release | TBD |
Created | 2021-01-13 |
Simple Summary
Patch the liquidation bug in the multi-collateral contracts.
Abstract
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.
Motivation
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.
Specification
Overview
The function 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.
Rationale
Addressed on the Github issue.
Technical Specification
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
Test cases are included with the implementation.