Skip to Content
Stacks Market V1

liquidation-manager

  1. calculate-user-global-data: Calculates the global data of a user across all assets.
  2. liquidation-call: Performs a liquidation call on an undercollateralized position.
  3. calculate-available-collateral-to-liquidate: Calculates the available collateral that can be liquidated.

calculate-user-global-data

Calculates the global data of a user across all assets.

ParameterTypeDescription
userprincipalThe user for whom the data is being calculated.
assetslistA list of assets to include in the calculation.

liquidation-call

Performs a liquidation call on an undercollateralized position.

ParameterTypeDescription
assetslistA list of assets involved in the liquidation.
lp-token<a-token>The LP token associated with the collateral.
collateral<ft>The collateral asset to be liquidated.
debt-asset<ft>The debt asset to be repaid.
collateral-oracle<oracle>The oracle for the collateral asset.
debt-asset-oracle<oracle>The oracle for the debt asset.
userprincipalThe borrower’s address.
debt-purchase-amountuintThe amount of debt the liquidator wants to repay.
to-receive-atokenboolWhether the liquidator wants to receive aTokens.

calculate-available-collateral-to-liquidate

Calculates the available collateral that can be liquidated.

ParameterTypeDescription
collateral<ft>The collateral asset.
principal-asset<ft>The principal asset for which the debt is owed.
collateral-oracle<oracle>The oracle for the collateral asset.
principal-oracle<oracle>The oracle for the principal asset.
debt-to-liquidateuintThe amount of debt to liquidate.
user-collateral-balanceuintThe user’s balance of the collateral asset.
Last updated on