This function retrieves the maximum Loan-to-Value (LTV) ratios for a specific plan type across all supported NFT collections on a current chain.

The Loan-to-Value (LTV) percentages are based on the specified financial plan type, such as Buy Now, Pay Later (BNPL) or Pawn. This data helps determine the maximum borrowing capacity relative to the value of NFT collateral, grouped by currency address.

Parameters

  • planType ('bnpl' | 'pawn'):
    The type of financial plan for which you want to fetch the maximum LTV values:
    • 'bnpl': Buy Now, Pay Later plan
    • 'pawn': Pawn plan

Returns

A Promise resolving to an object of type ICollectionsWithMaxLtvs which contains the maximum LTV values by currency address for the selected plan type.

Example Usage

const maxLtvs = await getMaxLtvs('bnpl');
console.log(maxLtvs);

Example Return

An example of returned data from the above usage is shown below. The maxLtv shows the maximum percentage of Loan-to-Value allowed on the particular collection, identified with the address variable. In the example below, maxLtv: 6700 represents 67%. Some collections have support for multiple currencies, which can be identified with the currencyAddress variable within the array in maxLtv.

[
  {
    "address": "0xedf6d3c3664606fe9ee3a9796d5cc75e3b16e682",
    "maxLtvs": [
      {
        "currencyAddress": "0x0000000000000000000000000000000000000000",
        "maxLtv": 6700
      }
    ]
  },
  {
    "address": "0xcbd38d10511f0274e040085c0bc1f85cc96fff82",
    "maxLtvs": [
      {
        "currencyAddress": "0x0000000000000000000000000000000000000000",
        "maxLtv": 6700
      },
      {
        "currencyAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "maxLtv": 7500
      }
    ]
  }
]