🎼Force Matching
This feature is a risk management measure that allows the off-chain engine to close positions on a sub-account's behalf in order to protect the protocol and limit loss to unhealthy sub-accounts. It can only be invoked if one of the two following invariants are true:
Sub-account Core Collateral Debt < 0
Sub-account Maintenance Health < 0
In the event that one of these invariants is true for a given sub-account the off-chain engine will create a market order on a certain position (the position selection criteria are provided in the sections below). This will then be matched on the Order book and settled on-chain as a regular swap, this allows the user to avoid costly liquidation fees.
Sub-account Core Collateral Debt
This will occur if the sub-account being force matched has accrued a negative core collateral debt but are still healthy from a margin perspective. If this is the case then the offchain engine will swap one of their other positions into core collateral in order to reduce their core collateral debt to 0 or a threshold above 0. The position that are force matched to retrieve core collateral are selected based on the liquidation order described in Liquidations
Sub-account Maintenance Health
This will occur if the sub-account is below maintenance health and are deemed unhealthy. If this is the case then the offchain engine will swap one of their positions to improve their health so that it is above maintenance but below initial margin. The position that are force matched to improve health are selected based on the liquidation order described in Liquidations
Last updated