-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Get Markets data
curl --request POST \
--url https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2 \
--header 'content-type: application/json' \
--data '{"query":"{\n \n markets {\n name,\n underlyingSymbol,\n underlyingPrice \n }\n \n}\n\n\n"}'
{
"name": "Compound Ether",
"underlyingSymbol": "ETH",
"underlyingPrice": "0"
}
cEth "underlyingPrice": "0" 1 ETH is always = 1 ETH and main calculation unit is Ether in compound.
underlyingPrice participates in function totalCollateralValueInEth in compound-subgraph-wrapper https://github.com/graphprotocol/compound-subgraph-wrapper/blob/master/src/index.ts#L136
tokenInEth = collateralFactor * exchangeRate * underlyingPrice; // always returns 0 when collateral is cEth.
totalCollateralValueInEth = tokenInEth * cTokenBalance;
Metadata
Metadata
Assignees
Labels
No labels