Function prepareReduceCollateralFromLoan
- prepareReduceCollateralFromLoan(
loanAppId: number,
poolManagerAppId: number,
userAddr: string,
escrowAddr: string,
receiverAddr: string,
pool: Pool,
oracle: Oracle,
lpAssets: LPToken[],
baseAssetIds: number[],
amount: number | bigint,
isfAssetAmount: boolean,
params: SuggestedParams,
): 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[]
Transaction[] reduce collateral group transaction
- loanAppId: number
Returns a transaction to sync collateral of a loan escrow.