🔮Subgraphs

The August Digital subgraphs provide an easy way to query our resources' blockchain events.

These subgraphs are created using The Graph Protocol's subgraph service. There are currently 2 subgraphs deployed which are the Lending Pools subgraph on Ethereum and Arbitrum One. These display all events emitted when signers interact with August Digital smart contracts.

Querying

You can query the subgraph using many different approaches depending on your use-case. In browser environments, we recommend using the Apollo Client together with GraphQL. To learn more about how to query the graph, read The Graph Protocol's official documentation.

Lending Pools

Ethereum

Arbitrum

Entities

Lending Pools

Deposit

type Deposit @entity(immutable: true) {
  id: ID!
  sender: String!                       # sender address
  owner: String!                        # owner address
  assets: BigInt! 
  shares: BigInt!
  timestamp: Int!
  transactionHash: String!
  gasPrice: BigInt!
  gasLimit: BigInt!
  asset: String!                         # asset address
  pool: String!                          # pool address
  block: Int!
}

Withdrawal Request

type WithdrawalRequest @entity(immutable: true) {
  id: ID!
  receiver: String!                               # receiver address
  owner: String!                                  # owner address
  assets: BigInt! 
  shares: BigInt!
  timestamp: Int!
  transactionHash: String!
  gasPrice: BigInt!
  gasLimit: BigInt!
  asset: String!                                   # underlying token address
  pool: String!                                    # pool address
  block: Int!
  day: Int!
  month: Int!
  year: Int!
}

Withdraw

type Withdraw @entity(immutable: true) {
  id: ID!
  sender: String!                        # sender address
  owner: String!                         # owner address
  assets: BigInt! 
  shares: BigInt!
  timestamp: Int!
  transactionHash: String!
  gasPrice: BigInt!
  gasLimit: BigInt!
  asset: String!                         # underlying token address
  pool: String!                          # pool address
  block: Int!
}

Loans

Loan

type Loan @entity(immutable: true) {
  id: ID!                             # loan address
  gasPrice: BigInt!
  gasLimit: BigInt!
  transactionHash: String!
  timestamp: Int!
  collateral: String!                 # collateral token address
  asset: String!                      # underlying token address
  pool: String!                       # pool address
  block: Int!
  apr: BigInt!
  matured: Boolean!
  closed: Boolean!
  funded: Boolean!
}

Last updated