Function prepareBorrowFromLoan

  • Returns a group transaction to borrow using loan escrow.

    Returns

    Transaction[] borrow group transaction

    Parameters

    • loanAppId: number

      loan application to borrow 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 borrow (typically the user)

    • pool: Pool

      pool to borrow from

    • 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)

    • borrowAmount: number | bigint

      amount to borrow of asset

    • maxStableRate: number | bigint

      maximum stable rate of the borrow, if zero then borrow is interpreted as a variable rate borrow

    • params: SuggestedParams

      suggested params for the transactions with the fees overwritten

    Returns Transaction[]

Generated using TypeDoc