Mars Protocol
Search…
Fields Liquidation Mechanics

Contract-to-Contract (C2C) Borrowing

Smart contracts that wish to utilize C2C borrowing must have liquidation logic implemented that ensures their ability to repay regardless of market conditions. Developers are free to choose their preferred liquidation logic, but these must be approved by the Martian Council in order for C2C credit line to be extended.
As an example of how liquidation logic might work, we will explore the MIR-UST leveraged yield farming strategy. In this case, a user’s asset is in the form of staked MIR-UST LP tokens. If the value of these LP tokens falls below the liquidation threshold, defined as a percentage of the user’s debt, anyone can close the position. The assets are removed from the liquidity pool, and the UST portion is immediately used to pay back the debt. An appropriate amount of MIR is sold for UST to cover any outstanding debt. Among the remaining assets, a portion is awarded to the liquidator, and the rest is refunded to the user.
Copy link