Skip to content

Latest commit

 

History

History
231 lines (161 loc) · 3.69 KB

File metadata and controls

231 lines (161 loc) · 3.69 KB

Solidity API

TokenType

The type of the collateral. Options are Invalid, ERC20, ERC721 and ERC1155.

enum TokenType {
  Invalid,
  ERC20,
  ERC721,
  ERC155
}

AccountValue

enum AccountValue {
  Market,
  Loan,
  Liquidation
}

CollateralParams

Holds information about the type of collateral held in vault. ltv + liqPenalty + liqBonus must be < lltv

Parameters

Name Type Description
struct CollateralParams {
  uint256 ltv;
  uint256 lltv;
  uint256 liqPenalty;
  uint256 liqBonus;
}

CollateralInfoInit

struct CollateralInfoInit {
  address token;
  struct CollateralParams info;
}

CollateralDeposit

Information about collateral deposited to the pool.

struct CollateralDeposit {
  address token;
  enum TokenType tokenType;
  uint256 amount;
  uint256[] tokenIds;
}

AccountCollateralValue

The value of a collateral token deposited by an account.

struct AccountCollateralValue {
  address token;
  uint256 amount;
  int256 value;
}

ILendingPool

poolAsset

function poolAsset() external view returns (contract ERC20)

debtToken

function debtToken() external view returns (contract DebtToken)

characterization

function characterization() external view returns (string)

supplyCap

function supplyCap() external view returns (uint256)

supplied

function supplied() external view returns (uint256)

borrowed

function borrowed() external view returns (uint256)

available

function available() external view returns (uint256)

baseSupplyAPY

function baseSupplyAPY() external view returns (uint256)

baseBorrowAPY

function baseBorrowAPY() external view returns (uint256)

utilization

function utilization() external view returns (uint256)

tvl

function tvl(bool) external view returns (uint256)

totalReserveShares

function totalReserveShares() external view returns (uint256)

priceFeed

function priceFeed() external view returns (contract IPriceFeed)

interestRatesModel

function interestRatesModel() external view returns (contract IInterestRateModel)

collaterals

function collaterals() external view returns (address[])

collateralInfo

function collateralInfo(address) external view returns (struct CollateralParams)

tokenCollateralDeposited

function tokenCollateralDeposited(address) external view returns (uint256)

accountHealth

function accountHealth(address account) external view returns (uint256)

assetBalance

function assetBalance(address account) external view returns (uint256)

assetsBorrowed

function assetsBorrowed(address account) external view returns (uint256)

accountCollateralAmount

function accountCollateralAmount(address account, address collateral) external view returns (uint256)

tokenMarketValue

function tokenMarketValue(address token, uint256 amount) external view returns (uint256)

tokenLoanValue

function tokenLoanValue(address token, uint256 amount) external view returns (uint256)

tokenLiquidationValue

function tokenLiquidationValue(address token, uint256 amount) external view returns (uint256)

totalAccountCollateralValue

function totalAccountCollateralValue(address account, enum AccountValue valueType) external view returns (uint256)