Compound

Resolver to get Compound positions

The Compound Resolver fetchs information about Compound position. You can view details like source code, ABIs on Etherscan.

Get Position

Fetch compound position of a user with just a single call.Copy

dsa.compound.getPosition(address, key);

Returns: Object with all the Compound details.Copy

{
"eth": {
  "priceInEth": 1,
  "exchangeRate": 200118987.03198305,
  "supply": 0.020001941382760555,
  "borrow": 0,
  "supplyRate": 0.01053365240736,
  "supplyYield": 0.010534205695367227,
  "borrowRate": 2.05689983754528,
  "borrowYield": 2.078140652407834,
},
"dai": {},
"usdc": {},
....
"totalSupplyInEth": 0.043728986801881906,
"totalBorrowInEth": 0.0023955855814168704,
"maxBorrowLimitInEth": 0.032796740101411426,
"status": 0.05478255401320606,
"liquidation": 0.7499999999999999
}

Last updated