Function prepareReduceCollateralFromLoan

  • Returns a transaction to sync collateral of a loan escrow.

    Returns

    Transaction[] reduce collateral group transaction

    Parameters

    • loanAppId: number

      loan application to reduce collateral in

    • poolManagerAppId: number

      pool manager application*

    • userAddr: string

      account address for the user

    • escrowAddr: string

      account address for the loan escrow

    • receiverAddr: string

      account address to receive the collateral (typically the user's deposit escrow)

    • pool: Pool

      pool to reduce collateral of

    • oracle: Oracle

      oracle application to retrieve asset prices from

    • lpAssets: LPToken[]

      list of lp assets in loan

    • baseAssetIds: number[]

      list of base asset ids in loan (non-lp assets)

    • amount: number | bigint

      the amount of asset / f asset to reduce the collateral by

    • isfAssetAmount: boolean

      whether the amount of collateral to reduce by is expressed in terms of f asset or asset

    • params: SuggestedParams

      suggested params for the transactions with the fees overwritten

    Returns Transaction[]

Generated using TypeDoc