# Vault Data Interface _**notice: In the absence of special instructions, the data is scaled by 1e18.**_ <hr> ## Contract VaultData Interface Document ### Introduction Welcome to Contract VaultData's Interface Documentation! We provide some interfaces to query infomation about dForce Lending mini pool, you can get information about. ## Asset Data Interface ### getPoolInfo **Parameters** | type | description | | ------- | ------------ | | address | iMSD address | **Return value** | type | description | detail | | ------- | ------------------------- | ---------------- | | uint256 | Market total supply value | decimal($)(1e18) | | uint256 | Market total borrow value | decimal($)(1e18) | --- ### getPoolsInfo **Parameters** | type | description | | --------- | ------------------ | | address[] | iMSD address array | **Return value** | type | description | detail | | ------- | --------------------------------------------- | ---------------- | | uint256 | Total value of all market supplies | decimal($)(1e18) | | uint256 | Total value of all market borrowings | decimal($)(1e18) | | uint256 | Mortgage rate of the total value of all pools | decimal(%)(1e18) | --- ### getCollateralData **Parameters** | type | description | | ------- | ------------ | | address | iMSD address | **Return value** | type | description | detail | | ------- | ---------------------------- | ---------------- | | uint256 | Total supply value of assets | decimal($)(1e18) | | uint256 | Loan to Value | decimal(%)(1e18) | | uint256 | Asset USD price | decimal($)(1e18) | | uint256 | Liquidation incentive | decimal(%)(1e18) | --- ### getBorrowData **Parameters** | type | description | | ------- | ------------ | | address | iMSD address | **Return value** | type | description | detail | | ------- | ----------------- | --------------------------- | | uint256 | Total borrow | decimal(scaled by decimals) | | uint256 | Borrow capacity | decimal(scaled by decimals) | | uint256 | Borrowable amount | decimal(scaled by decimals) | | uint256 | Borrow APY | decimal(%)(1e18) | | uint256 | Borrow fee ratio | decimal(%)(1e18) | --- ### getDistributionSupplyApy **Parameters** | type | description | | ------- | ------------- | | address | asset address | **Return value** | type | description | detail | | ------- | --------------------------- | ---------------- | | uint256 | Deposit asset incentive APR | decimal(%)(1e18) | --- ### getDistributionBorrowApy **Parameters** | type | description | | ------- | ------------- | | address | asset address | **Return value** | type | description | detail | | ------- | -------------------------- | ---------------- | | uint256 | Borrow asset incentive APR | decimal(%)(1e18) | --- ### rewardTokenSymbol **Parameters** | type | description | | ------- | ------------- | | address | asset address | **Return value** | type | description | detail | | ------- | -------------------------- | ---------------- | | string | reward token symbol | | <hr> ## User Data Interface ### getAccountInfo **Parameters** | type | description | | ------- | --------------------- | | address | iMSD address | | address | User Ethereum address | **Return value** | type | description | detail | | ------- | --------------------------------- | ------------- | | uint256 | User collateral amount | ($)(1e18) | | uint256 | User collateral value | ($)(1e18) | | uint256 | User borrow value | ($)(1e18) | | uint256 | User collateral liquidation price | ($)(1e18) -1: | | uint256 | User collateralization ratio | (%)(1e18) | --- ### getAccountSupplyAndBorrowData **Parameters** | type | description | detail | | ------- | ---------------------------- | ---------------------------------------- | | address | iMSD address | | | address | User Ethereum address | | | uint256 | Supply amount (%)(1e18) | decimal(scaled by collateral's decimals) | | uint256 | Safe borrow factor (%)(1e18) | decimal(%)(1e18) | | uint256 | Safe supply factor (%)(1e18) | decimal(%)(1e18) | **Return value** | type | description | detail | | ------- | ------------------------------ | --------------------------------- | | uint256 | User wallet collateral balance | (scaled by collateral's decimals) | | uint256 | User max deposit amount | (scaled by collateral's decimals) | | uint256 | User max safe borrow amount | (scaled by borrow's decimals) | | uint256 | Assets can be borrowed | (scaled by borrow's decimals) | --- ### getAccountRepayAndRedeemData **Parameters** | type | description | detail | | ------- | ----------------------- | ------------------------------------ | | address | iMSD address | | | address | User Ethereum address | | | uint256 | Repay amount (%)(1e18) | decimal(scaled by borrow's decimals) | | uint256 | Safe factor (%)(1e18) | decimal(%)(1e18) | **Return value** | type | description | detail | | ------- | --------------------------------- | ---------------------------------------------- | | uint256 | User wallet msd balance | (scaled by borrow's decimals) | | uint256 | User borrowed amount | (scaled by borrow's decimals) | | uint256 | User repay amount | (scaled by borrow's decimals) | | uint256 | User collateral amount | iToken amount(scaled by collateral's decimals) | | uint256 | User collateral underlying amount | (scaled by collateral's decimals) | | uint256 | User current withdrawal amount | (scaled by collateral's decimals) | | uint256 | User safe withdrawal amount | (scaled by collateral's decimals) | --- <!-- ### getLiquidationInfo **Parameters** | type | description | | ------- | ------------------------ | | address | Borrower address | | address | Liquidator address | | address | Borrowed asset address | | address | Collateral asset address | **Return value** | type | description | detail | | ------- | ------------------------- | ------------------------------------------------- | | uint256 | max repay amount | (scaled by borrowed asset decimals) | | uint256 | actual liquidation amount | (scaled by borrowed asset decimals) | | uint256 | liquidator balance | (scaled by borrowed asset decimals) | | bool | available | (Whether the user's asset price status is normal) | --- --> ### getAvailableBalance **Parameters** | type | description | | ------- | --------------------- | | address | iToken address | | address | User Ethereum address | | uint256 | safeMaxFactor | **Return value** | type | description | detail | | ------- | ----------------------- | --------------------------------- | | uint256 | available balance | (scaled by iToken decimals) | ### getAccountRewardAmount **Parameters** | type | description | | ------- | --------------------- | | address | iMSD address | | address | User Ethereum address | **Return value** | type | description | detail | | ------- | ----------------------- | --------------------------------- | | uint256 | available reward amount | (scaled by reward token decimals) | <hr> ## Contract rewardDistributor ### claimRewards *Used to withdraw mining rewards* **Parameters** | type | description | detail | | --------- | ------------------------------------------ | -------------------------------------------------- | | address[] | User Ethereum address array | List of addresses that can withdraw mining rewards | | address[] | Supplied iTokens(or iMToken) address array | When there is no supply, pass in `[]` | | address[] | Borrowed iTokens(or iMToken) address array | When there is no borrowing, pass in `[]` |
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up