Documentation
    Preparing search index...

    Variable getBorrowFeeConst

    getBorrowFee: (
        options?: Partial<
            EnvOption & CacheOption & BorrowFeeOption & SuiClientOption,
        >,
    ) => Promise<number> = ...

    Fetches the current borrow fee rate

    This function can retrieve borrow fee rates in two ways:

    • If address and asset are provided, it calculates the specific borrow fee rate for a given address and asset by calling the on-chain get_borrow_fee_v2 function
    • Otherwise, it returns the global borrow fee rate from the incentive V3 contract

    Type declaration

      • (
            options?: Partial<
                EnvOption & CacheOption & BorrowFeeOption & SuiClientOption,
            >,
        ): Promise<number>
      • Parameters

        • Optionaloptions: Partial<EnvOption & CacheOption & BorrowFeeOption & SuiClientOption>

          Optional configuration options

          • address - User address to calculate specific borrow fee (requires asset to be set)
          • asset - Asset identifier to calculate specific borrow fee (requires address to be set)
          • env - Environment setting ('dev' or 'prod')
          • client - Sui client instance for on-chain queries
          • cacheTime - Cache expiration time in milliseconds
          • disableCache - Whether to disable caching for this operation

        Returns Promise<number>

        Promise - Borrow fee rate as a decimal number

        • When address and asset are provided: returns the specific fee rate (divided by 10000)
        • Otherwise: returns the global fee rate (divided by 100)