Synthetixio / synthetix-shaula-frontend

UI to interact with the new Synthetix Shaula release containing Multi-Collateral Loans and Shorting features.
http://synthetix.surge.sh
3 stars 2 forks source link

Subgraph #10

Open kelonye opened 3 years ago

dvd-schwrtz commented 3 years ago

FYI - https://github.com/Synthetixio/synthetix-subgraph/pull/68. need to merge. it has all the shorting data and each short has pointers to all the relevant contract data, liquidations, etc that live on other entities

dvd-schwrtz commented 3 years ago

https://thegraph.com/explorer/subgraph/dvd-schwrtz/test -> temporary link with the latest tracking of the data above

kelonye commented 3 years ago

Awesome!

On Wed, Feb 3, 2021, 04:59 David Schwartz notifications@github.com wrote:

https://thegraph.com/explorer/subgraph/dvd-schwrtz/test -> temporary link with the latest tracking of the data above

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vbstreetz/synthetix-shaula-frontend/issues/10#issuecomment-772151349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AON72DNOXZIO75E4JBA2O5DS5CUZZANCNFSM4W5HWRPA .

kelonye commented 3 years ago

Jary:

... loanChanges { id amount isRepayment loanAfter timestamp } }

you can pass an account into the query but that is the shorts query with all of the fields and entities that are currently tied to it

the other entites are the 1) contract data that contains high level data for the short. each contract has a list of shorts attached

2) loanChanges - the repayments and drawdowns over time

3) collateralChanges - deposits and withdrawls over time

4) liquidations - the liquidations history

the fields you will be querying are all on there but might change given its a WIP PR for the graph

kelonye commented 3 years ago

@dvd-schwrtz Working well. Am working on adding subgraphs for CollateralEth and CollateralShort loan contracts as well since I believe the implemented synthetix-loans subgraph for EtherCollateral refers to something else / old loan type?