Liquidations API (coming soon)

What it is

The Mystic Liquidations API gathers DEX liquidity and trading firm bids to find the best possible path to liquidate defaults on Mystic. The API lets you see when a liquidation happens and submit a bid to liquidate it.

The API is custom-built for RWAs, and assumes trading firms advance the liquidity to settle the market and receive the corresponding collateral plus a liquidation premium for doing so. They can then redeem that collateral for stablecoins after waiting the asset's corresponding redemption time. The Mystic Liquidations API is build on the 0x Swap API.

How it works

This is the flow of a regular liquidation and the role trading firms take in it:

  1. Morpho borrower is liquidated;

  2. Mystic detects this and asks trading firms for liquidation bids via API;

  3. Trading firms receive request and send quotes according to their preferences;

  4. The API compares all quotes and identifies the best one;

  5. A solver then calls the Morpho liquidation function;

  6. Solver takes winning order's assets (e.g. stablecoins) and settles Morpho debt;

  7. Morpho releases the position's collateral;

  8. Collateral and liquidation premium are sent to the winning party;

  9. (Optional) Winning party waits the asset's redemption time and redeems it for stablecoins.

A couple of things to note:

  • Since we're effectively asking trading firms to wait the time it takes to redeem the asset and get paid for that wait, this API also works to request bids for instant redemptions for any asset.

  • The API has a smart routing feature, which enables it to liquidate a position across more than one bid (e.g. liquidate 20% on an AMM and 80% with the best trading firm quote).

  • The API has a fallback feature - if the winning bid backs out, the liquidation will go to the second-best bid and so on.

Last updated