compound-v2-subgraph's People
Forkers
graphprotocol mostarz93 chaoweichiu smfang mleoanbarasan kp2r-network surbhiaudichya jjz box-finance based-loans tercel-compound token-terminal lao959 amxx serenitysource stoxxx3 dukedaily hoangthanhlamm yankev thenextblock naouflex remiomosowon ggichuru kunalalite frankd6eaf lakeofcolors stevegyutyan steven4354 mohaiminuleraj macharry89 nemani siyushin vl123 hogletdev neobase-one himanshupal annultra shubham-rathod1 lodestarfinance magicquanta unitedx-finance memoriaxii equinox-markets cone-finance decentst ionicprotocolcompound-v2-subgraph's Issues
404 page on TheGraph
When following the provided link https://thegraph.com/hosted-service/subgraph/compound-finance/compound, it leads to a 404 page.
Same issue when trying to read the documentation about how to run it locally instead.
cETH underlyingPrice is 0 must be always 1
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;
Querying with a block number throws an error
Trying out the following query:
{
markets(block:{number: 10452217}, first: 7) {
borrowRate
cash
collateralFactor
exchangeRate
interestRateModelAddress
name
reserves
supplyRate
symbol
id
totalBorrows
totalSupply
underlyingAddress
underlyingName
underlyingPrice
underlyingSymbol
reserveFactor
underlyingPriceUSD
}
}
gives the following error:
{
"errors": [
{
"message": "Invalid value provided for argument `block`: Variable(\"_v2_block\")",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"markets"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"errors": [
{
"message": "Invalid value provided for argument `block`: Variable(\"_v2_block\")",
"locations": [],
"path": [
"markets"
]
}
]
}
}
}
],
"data": null
}
Tried this out with other subgraphs and block querying seems to work with them.
USDC underlyingPriceUSD
It fills as 0 when it should be 1
.
compound-v2-subgraph/schema.graphql
Line 88 in 19f5d8c
USDT Tether Support
There is no Tether support - is there a way to manually add in the token address maybe?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.