Liquidation
For a position to be liquidatable it needs to either have less collateral (stable) left than ExchangeConfig.minCollateral(currently set to 100 USDC) or exceed a leverage higher than ExchangeConfig.maxLeverage.If this is the case anyone can liquidate the position and receive a reward.
function liquidate(address _trader)
trader: The trader to liquidate
Liquidate
emit liquidate()
liquidator: The trader sending liquidation event
trader: trader getting liquidated
amount: amount liquidator is receiving for liquidating
Check to see if a trader's position can be liquidated.
function isLiquidatable(address _trader)
trader: The trader to liquidate
liquidatable: true or false
Last modified 1yr ago