Futureswap Docs
  • Futureswap Docs
  • Protocol
    • Trading
      • Trading Flow
      • Auto-Deleveraging (ADL)
      • Fees
      • Liquidations
    • Liquidity
      • Liquidity Basics
      • Risks
    • Oracles
    • Economic Soundness
    • Incentives Program
    • Developer
      • Trade
      • Trade Estimate
      • Events
      • ADL
      • Liquidation
      • Revert Reasons
      • CLI
      • Addresses, ABI's and Links
        • Arbitrum
          • ETH/USDC
          • WBTC/ETH
        • Avalanche
          • Mainnet
            • JOE/USDC
            • WAVAX/USDC
          • Testnet
            • AVAX/FRAX
            • JOE/AVAX
            • FXS/FRAX
            • WAVAX/USDC
      • Code Examples
  • Other
    • FAQ
    • Audits
    • Community Discord
Powered by GitBook
On this page
  • Liquidate
  • Events
  • isLiquidatable

Was this helpful?

  1. Protocol
  2. Developer

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

PreviousADLNextRevert Reasons

Last updated 3 years ago

Was this helpful?