MakerDAO

Maker Resolver fetch Vault Position of user, Collateral-Type Details, DSR Position and etc. You can view details like source code, ABIs on Etherscan.

  • Different Collateral-Types: ETH-A, USDC-A, BAT-A

Get Vaults

Fetch all of the Vaults detail owned by an address.Copy

dsa.maker.getVaults(address);

Parameter

Type

Description

address

address

The user address.

Returns: Object with all the Vaults details. Object key is Vault ID.Copy

{
"3245": {
  "owner": "0x981C549A74Dc36Bd82fEd9097Bc13904E8db14f9",
  "colName": "ETH-A",
  "token": "ETH",
  "col": 0.4,
  "debt": 41,
  "liquidatedCol": 0,
  "rate": 0,
  "price": 216.54,
  "status": 0.4733536529047751,
  "liquidation": 0.6666666666666667,
  "urn": "0xcC0e5E76eC81aD472D6Df9fC83eaE22E1000Fe53"
},
"971": {...}
}

Return Parameter

Type

Description

owner

address

The user address.

colName

string

Collateral name. Eg - ETH-A, USDC-A, etc.

token

string

Collateral token. Eg - ETH, USDC, etc.

col

number

Amount of collateral deposited.

debt

number

Amount of debt borrowed.

liquidatedCol

number

Unlocked collateral when the vault gets liquidated.

rate

number

Borrow APY.

price

number

Collateral price of Maker's oracle.

status

number

Vault status. Mulitply by 100 to convert it into %.

liquidation

number

Position breakage limit. Mulitply by 100 to convert it into %.

urn

address

The Vault address

Get Collateral Info

Fetch the collateral type details

dsa.maker.getCollateralInfo();

Returns: Object with all the Collateral Types. Object key is Collateral Type

{
"ETH-A" : {
  "price": 215.56044374049998,
  "rate": 0,
  "ratio": 0.6666666666666667,
  "token": "ETH"
},
"BAT-A" : {...},
...
}

Return Parameter

Type

Description

price

number

Collateral price w.r.t USD from Maker's Oracle.

rate

number

Borrow rate.

ratio

number

Liquidation ratio.

token

number

Collateral token.

Get DAI Position

Fetch the DAI DSR position of an address

dsa.maker.getDaiPosition(address);

Parameter

Type

Description

address

address

User address

Returns:

{
  "balance": 5.068008860190327,
  "rate": 0
}

Return Parameter

Type

Description

balance

number

DAI balance in DSR.

rate

number

DAI saving rate.

Get DSR

Fetch the DAI saving rate

dsa.maker.getDaiRate();

Returns:

{
  "rate" : 2
}

Return Parameter

Type

Description

rate

number

DAI Saving Rate in %.

Last updated