Futureswap Docs
Search…
Liquidation

Liquidate

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)

Inputs:

trader: The trader to liquidate

Events

Liquidate
emit liquidate()

Output:

liquidator: The trader sending liquidation event
trader: trader getting liquidated
amount: amount liquidator is receiving for liquidating

isLiquidatable

Check to see if a trader's position can be liquidated.
function isLiquidatable(address _trader)

Inputs:

trader: The trader to liquidate

Output:

liquidatable: true or false
Last modified 1mo ago