# SIP 105: Multi-collateral Liquidation Bug Fix Source

Author Michael Spain Implemented 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.