Subgraph for baoUSD Vault.
This is a fork of the Compound V2 Subgraph with updated addresses and ABIs.
Network | URL |
---|---|
Mainnet | https://thegraph.com/hosted-service/subgraph/baofinance/baousd-vault-subgraph |
You can also run this subgraph locally, if you wish. Instructions for that can be found in The Graph Documentation.
The following subgraph query will return all users that have interacted with the protocol as well as the markets that the users have interacted with.
{
accounts{
id
tokens{
id
enteredMarket
cTokenBalance
storedBorrowBalance
}
}
markets{
id
underlyingAddress
underlyingDecimals
}
}
A bot can utilize the resulting list to query the accounts health with the comptroller method getAccountLiquidity()
.
For those interested in creating their own App/Bot, using the Bao Markets subgraph, we recommend the following resources:
An examplary implementation of a liquidation Bot.
TheGraph documentation Querying from an Application.