ILens
ILens
MAX_BASIS_POINTS
function MAX_BASIS_POINTS() external view returns (uint256)
STORAGE ///
WAD
function WAD() external view returns (uint256)
morpho
function morpho() external view returns (contract IMorpho)
comptroller
function comptroller() external view returns (contract IComptroller)
getTotalSupply
function getTotalSupply() external view returns (uint256 p2pSupplyAmount, uint256 poolSupplyAmount, uint256 totalSupplyAmount)
GENERAL ///
getTotalBorrow
function getTotalBorrow() external view returns (uint256 p2pBorrowAmount, uint256 poolBorrowAmount, uint256 totalBorrowAmount)
isMarketCreated
function isMarketCreated(address _poolToken) external view returns (bool)
MARKETS ///
isMarketCreatedAndNotPaused
function isMarketCreatedAndNotPaused(address _poolToken) external view returns (bool)
isMarketCreatedAndNotPausedNorPartiallyPaused
function isMarketCreatedAndNotPausedNorPartiallyPaused(address _poolToken) external view returns (bool)
getAllMarkets
function getAllMarkets() external view returns (address[] marketsCreated_)
getMainMarketData
function getMainMarketData(address _poolToken) external view returns (uint256 avgSupplyRatePerBlock, uint256 avgBorrowRatePerBlock, uint256 p2pSupplyAmount, uint256 p2pBorrowAmount, uint256 poolSupplyAmount, uint256 poolBorrowAmount)
getAdvancedMarketData
function getAdvancedMarketData(address _poolToken) external view returns (uint256 p2pSupplyIndex, uint256 p2pBorrowIndex, uint256 poolSupplyIndex, uint256 poolBorrowIndex, uint32 lastUpdateBlockNumber, uint256 p2pSupplyDelta, uint256 p2pBorrowDelta)
getMarketConfiguration
function getMarketConfiguration(address _poolToken) external view returns (address underlying, bool isCreated, bool p2pDisabled, bool isPaused, bool isPartiallyPaused, uint16 reserveFactor, uint16 p2pIndexCursor, uint256 collateralFactor)
getTotalMarketSupply
function getTotalMarketSupply(address _poolToken) external view returns (uint256 p2pSupplyAmount, uint256 poolSupplyAmount)
getTotalMarketBorrow
function getTotalMarketBorrow(address _poolToken) external view returns (uint256 p2pBorrowAmount, uint256 poolBorrowAmount)
getCurrentP2PSupplyIndex
function getCurrentP2PSupplyIndex(address _poolToken) external view returns (uint256)
INDEXES ///
getCurrentP2PBorrowIndex
function getCurrentP2PBorrowIndex(address _poolToken) external view returns (uint256)
getCurrentPoolIndexes
function getCurrentPoolIndexes(address _poolToken) external view returns (uint256 currentPoolSupplyIndex, uint256 currentPoolBorrowIndex)
getIndexes
function getIndexes(address _poolToken, bool _computeUpdatedIndexes) external view returns (uint256 p2pSupplyIndex, uint256 p2pBorrowIndex, uint256 poolSupplyIndex, uint256 poolBorrowIndex)
getEnteredMarkets
function getEnteredMarkets(address _user) external view returns (address[] enteredMarkets)
USERS ///
getUserHealthFactor
function getUserHealthFactor(address _user, address[] _updatedMarkets) external view returns (uint256)
getUserBalanceStates
function getUserBalanceStates(address _user, address[] _updatedMarkets) external view returns (uint256 collateralValue, uint256 debtValue, uint256 maxDebtValue)
getCurrentSupplyBalanceInOf
function getCurrentSupplyBalanceInOf(address _poolToken, address _user) external view returns (uint256 balanceOnPool, uint256 balanceInP2P, uint256 totalBalance)
getCurrentBorrowBalanceInOf
function getCurrentBorrowBalanceInOf(address _poolToken, address _user) external view returns (uint256 balanceOnPool, uint256 balanceInP2P, uint256 totalBalance)
getUserMaxCapacitiesForAsset
function getUserMaxCapacitiesForAsset(address _user, address _poolToken) external view returns (uint256 withdrawable, uint256 borrowable)
getUserHypotheticalBalanceStates
function getUserHypotheticalBalanceStates(address _user, address _poolToken, uint256 _withdrawnAmount, uint256 _borrowedAmount) external view returns (uint256 debtValue, uint256 maxDebtValue)
getUserLiquidityDataForAsset
function getUserLiquidityDataForAsset(address _user, address _poolToken, bool _computeUpdatedIndexes, contract ICompoundOracle _oracle) external view returns (struct Types.AssetLiquidityData assetData)
isLiquidatable
function isLiquidatable(address _user, address[] _updatedMarkets) external view returns (bool)
computeLiquidationRepayAmount
function computeLiquidationRepayAmount(address _user, address _poolTokenBorrowed, address _poolTokenCollateral, address[] _updatedMarkets) external view returns (uint256 toRepay)
getAverageSupplyRatePerBlock
function getAverageSupplyRatePerBlock(address _poolToken) external view returns (uint256 avgSupplyRatePerBlock, uint256 p2pSupplyAmount, uint256 poolSupplyAmount)
RATES ///
getAverageBorrowRatePerBlock
function getAverageBorrowRatePerBlock(address _poolToken) external view returns (uint256 avgBorrowRatePerBlock, uint256 p2pBorrowAmount, uint256 poolBorrowAmount)
getNextUserSupplyRatePerBlock
function getNextUserSupplyRatePerBlock(address _poolToken, address _user, uint256 _amount) external view returns (uint256 nextSupplyRatePerBlock, uint256 balanceOnPool, uint256 balanceInP2P, uint256 totalBalance)
getNextUserBorrowRatePerBlock
function getNextUserBorrowRatePerBlock(address _poolToken, address _user, uint256 _amount) external view returns (uint256 nextBorrowRatePerBlock, uint256 balanceOnPool, uint256 balanceInP2P, uint256 totalBalance)
getCurrentUserSupplyRatePerBlock
function getCurrentUserSupplyRatePerBlock(address _poolToken, address _user) external view returns (uint256)
getCurrentUserBorrowRatePerBlock
function getCurrentUserBorrowRatePerBlock(address _poolToken, address _user) external view returns (uint256)
getRatesPerBlock
function getRatesPerBlock(address _poolToken) external view returns (uint256 p2pSupplyRate, uint256 p2pBorrowRate, uint256 poolSupplyRate, uint256 poolBorrowRate)
getUserUnclaimedRewards
function getUserUnclaimedRewards(address[] _poolTokens, address _user) external view returns (uint256 unclaimedRewards)
REWARDS ///
getAccruedSupplierComp
function getAccruedSupplierComp(address _supplier, address _poolToken, uint256 _balance) external view returns (uint256)
getAccruedBorrowerComp
function getAccruedBorrowerComp(address _borrower, address _poolToken, uint256 _balance) external view returns (uint256)
getCurrentCompSupplyIndex
function getCurrentCompSupplyIndex(address _poolToken) external view returns (uint256)
getCurrentCompBorrowIndex
function getCurrentCompBorrowIndex(address _poolToken) external view returns (uint256)