0.1.0 • Published 2 years ago

@soda-pro/layout v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@soda-protocol/soda-layout

Getting Started

npm install

npm run test
# or
yarn test

Obligation

obligation:  {
  wallet: 'HDRL6fpRmYSn36YWaWJaR6zhU6BYqjaWcybGTeABQQkz',
  collaterals: [
    {
      reserve: '77DiqgiVTh5bw4KLX63UJ5xRYqKhrAiNpjaayanmwjZr',
      depositAmount: '137.65' // depositAmount
    },
    {
      reserve: 'DpHSScW5Q7DhfvDHeCLg6jMZuuQfv8y4sqZKpRAoQ4xN',
      depositAmount: '14.25' // depositAmount
    }
  ],
  loans: [
    {
      reserve: '5cY7qV7Pb28xJdiCkwt28r6qUhV2gbvsvhk8cpUuwDwZ',
      borrowAmount: '0.10' // borrowAmount
    },
    {
      reserve: 'GmP9qCoekpdAVVLWdurwwAHGqsXsPrWwLDr2Q8gi5Pdm',
      borrowAmount: '1.00' // borrowAmount
    },
    {
      reserve: '9BpSWydxoGVvkaWYzd7sucmVNkDXcaQZtPyvknZH1tkP',
      borrowAmount: '1.20' // borrowAmount
    }
  ]
}

Reserves

'8ToWR4dEWvEop6kMPAQYBi6t7UquDb27M7W11BKeyM9J' => {
    version: 1,
    lastUpdate: { slot: 112732747n, stale: false },
    manager: PublicKey {
      _bn: <BN: fe57c05ced879807a924132ba4a429b6d355754942acda9c9752af2d770f0779>
    },
    tokenConfig: { mintPubkey: [PublicKey], supplyAccount: [PublicKey], decimal: 8 },
    oracleInfo: { price: [BigNumber], oracleConfig: [Object] },
    collateralInfo: {
      sotokenMintPubkey: [PublicKey],
      totalMint: 3201362673n,
      collateralConfig: [Object]
    },
    liquidityInfo: {
      enable: true,
      available: 1477585497n,
      flashLoanFee: 0n,
      accBorrowRateWads: [BigNumber],
      borrowedAmountWads: [BigNumber],
      insuranceWads: [BigNumber],
      config: [Object]
    },
    rateModel: {
      offset: 0n,
      optimal: 200000000000000000n,
      kink: 75,
      max: 1000000000000000000n
    },
    padding: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 206 more bytes>,
    depositRate: '6.20', // depositRate
    borrowRate: '14.37' // borrowRate
  }