Schema
Full schema
{
"data": {
"__schema": {
"types": [
{
"name": "Account",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vaultBalances",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "deposits",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "withdrawals",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "sentTransfers",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "receivedTransfers",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "AccountVaultBalance",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "account",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "netDeposits",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalDeposited",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalWithdrawn",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalSent",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalReceived",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "shareBalance",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "AccountVaultBalance_filter",
"fields": null
},
{
"name": "AccountVaultBalance_orderBy",
"fields": null
},
{
"name": "Account_filter",
"fields": null
},
{
"name": "Account_orderBy",
"fields": null
},
{
"name": "Aggregation_interval",
"fields": null
},
{
"name": "BigDecimal",
"fields": null
},
{
"name": "BigInt",
"fields": null
},
{
"name": "BlockChangedFilter",
"fields": null
},
{
"name": "Block_height",
"fields": null
},
{
"name": "Boolean",
"fields": null
},
{
"name": "Bytes",
"fields": null
},
{
"name": "Deposit",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "account",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "amount",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "shares",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Deposit_filter",
"fields": null
},
{
"name": "Deposit_orderBy",
"fields": null
},
{
"name": "Float",
"fields": null
},
{
"name": "Harvest",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "strategy",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "gain",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "loss",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "debt",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "pricePerShare",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vaultTotalSupply",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vaultTotalAssets",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Harvest_filter",
"fields": null
},
{
"name": "Harvest_orderBy",
"fields": null
},
{
"name": "ID",
"fields": null
},
{
"name": "Int",
"fields": null
},
{
"name": "Int8",
"fields": null
},
{
"name": "OrderDirection",
"fields": null
},
{
"name": "Query",
"fields": [
{
"name": "vault",
"type": {
"name": "Vault",
"kind": "OBJECT"
}
},
{
"name": "vaults",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "strategy",
"type": {
"name": "Strategy",
"kind": "OBJECT"
}
},
{
"name": "strategies",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "accountVaultBalance",
"type": {
"name": "AccountVaultBalance",
"kind": "OBJECT"
}
},
{
"name": "accountVaultBalances",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "account",
"type": {
"name": "Account",
"kind": "OBJECT"
}
},
{
"name": "accounts",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "deposit",
"type": {
"name": "Deposit",
"kind": "OBJECT"
}
},
{
"name": "deposits",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "withdraw",
"type": {
"name": "Withdraw",
"kind": "OBJECT"
}
},
{
"name": "withdraws",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transfer",
"type": {
"name": "Transfer",
"kind": "OBJECT"
}
},
{
"name": "transfers",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "harvest",
"type": {
"name": "Harvest",
"kind": "OBJECT"
}
},
{
"name": "harvests",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": "Transaction",
"kind": "OBJECT"
}
},
{
"name": "transactions",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "token",
"type": {
"name": "Token",
"kind": "OBJECT"
}
},
{
"name": "tokens",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "_meta",
"type": {
"name": "_Meta_",
"kind": "OBJECT"
}
}
]
},
{
"name": "Strategy",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "name",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "debtRatio",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "maxDebtPerHarvest",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "minDebtPerHarvest",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "performanceFee",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "isActive",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "firstReport",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "lastReport",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalDebt",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalGain",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalLoss",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "unrealizedGain",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "debtPayment",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "credit",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "loss",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Strategy_filter",
"fields": null
},
{
"name": "Strategy_orderBy",
"fields": null
},
{
"name": "String",
"fields": null
},
{
"name": "Subscription",
"fields": [
{
"name": "vault",
"type": {
"name": "Vault",
"kind": "OBJECT"
}
},
{
"name": "vaults",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "strategy",
"type": {
"name": "Strategy",
"kind": "OBJECT"
}
},
{
"name": "strategies",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "accountVaultBalance",
"type": {
"name": "AccountVaultBalance",
"kind": "OBJECT"
}
},
{
"name": "accountVaultBalances",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "account",
"type": {
"name": "Account",
"kind": "OBJECT"
}
},
{
"name": "accounts",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "deposit",
"type": {
"name": "Deposit",
"kind": "OBJECT"
}
},
{
"name": "deposits",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "withdraw",
"type": {
"name": "Withdraw",
"kind": "OBJECT"
}
},
{
"name": "withdraws",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transfer",
"type": {
"name": "Transfer",
"kind": "OBJECT"
}
},
{
"name": "transfers",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "harvest",
"type": {
"name": "Harvest",
"kind": "OBJECT"
}
},
{
"name": "harvests",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": "Transaction",
"kind": "OBJECT"
}
},
{
"name": "transactions",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "token",
"type": {
"name": "Token",
"kind": "OBJECT"
}
},
{
"name": "tokens",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "_meta",
"type": {
"name": "_Meta_",
"kind": "OBJECT"
}
}
]
},
{
"name": "Timestamp",
"fields": null
},
{
"name": "Token",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "address",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "decimals",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "name",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "symbol",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "isShare",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "isWrapped",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Token_filter",
"fields": null
},
{
"name": "Token_orderBy",
"fields": null
},
{
"name": "Transaction",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "blockNumber",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transactionHash",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Transaction_filter",
"fields": null
},
{
"name": "Transaction_orderBy",
"fields": null
},
{
"name": "Transfer",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "from",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "to",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "amount",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "shares",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Transfer_filter",
"fields": null
},
{
"name": "Transfer_orderBy",
"fields": null
},
{
"name": "Vault",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "underlyingToken",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "shareToken",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "strategies",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "pricePerShare",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalSupply",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "totalAssets",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "idleAssets",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "debtOutstanding",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "creditAvailable",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "depositLimit",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "emergencyShutdown",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "performanceFee",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "managementFee",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "lastReport",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "Treasury",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "withdrawalQueue",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "accountVaultBalances",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "deposits",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "withdrawals",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transfers",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "harvests",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Vault_filter",
"fields": null
},
{
"name": "Vault_orderBy",
"fields": null
},
{
"name": "Withdraw",
"fields": [
{
"name": "id",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "vault",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "account",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "amount",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "shares",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "transaction",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "Withdraw_filter",
"fields": null
},
{
"name": "Withdraw_orderBy",
"fields": null
},
{
"name": "_Block_",
"fields": [
{
"name": "hash",
"type": {
"name": "Bytes",
"kind": "SCALAR"
}
},
{
"name": "number",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "timestamp",
"type": {
"name": "Int",
"kind": "SCALAR"
}
},
{
"name": "parentHash",
"type": {
"name": "Bytes",
"kind": "SCALAR"
}
}
]
},
{
"name": "_Meta_",
"fields": [
{
"name": "block",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "deployment",
"type": {
"name": null,
"kind": "NON_NULL"
}
},
{
"name": "hasIndexingErrors",
"type": {
"name": null,
"kind": "NON_NULL"
}
}
]
},
{
"name": "_SubgraphErrorPolicy_",
"fields": null
}
]
}
}
}
Core Entities
Vault
Represents a maxAPY vault that holds user deposits and manages strategies.
type Vault @entity {
id: ID!
underlyingToken: Token!
shareToken: Token!
strategies: [Strategy!]!
pricePerShare: BigDecimal!
totalSupply: BigDecimal!
totalAssets: BigDecimal!
idleAssets: BigDecimal!
debtOutstanding: BigDecimal!
creditAvailable: BigDecimal!
depositLimit: BigDecimal!
emergencyShutdown: Boolean!
performanceFee: BigInt!
managementFee: BigInt!
lastReport: BigInt!
Treasury: Bytes!
withdrawalQueue: [Bytes!]!
accountVaultBalances: [AccountVaultBalance!]!
deposits: [Deposit!]!
withdrawals: [Withdraw!]!
transfers: [Transfer!]!
harvests: [Harvest!]!
}
Strategy
Tracks individual yield strategies and their performance metrics.
type Strategy @entity {
id: ID!
name: String!
vault: Vault!
debtRatio: BigInt!
maxDebtPerHarvest: BigInt!
minDebtPerHarvest: BigInt!
performanceFee: BigInt!
isActive: Boolean!
firstReport: BigInt!
lastReport: BigInt!
totalDebt: BigInt!
totalGain: BigInt!
totalLoss: BigInt!
unrealizedGain: BigInt!
debtPayment: BigInt!
credit: BigInt!
loss: BigInt!
}
Account
Represents a user account and their interactions with the protocol.
type Account @entity {
id: ID!
vaultBalances: [AccountVaultBalance!]!
deposits: [Deposit!]!
withdrawals: [Withdraw!]!
sentTransfers: [Transfer!]!
receivedTransfers: [Transfer!]!
}
Transaction Entities
Deposit
Records deposit transactions into vaults.
type Deposit @entity {
id: ID!
vault: Vault!
account: Account!
amount: BigDecimal!
shares: BigDecimal!
timestamp: BigInt!
transaction: Transaction!
}
Withdraw
Records withdrawal transactions from vaults.
type Withdraw @entity {
id: ID!
vault: Vault!
account: Account!
amount: BigDecimal!
shares: BigDecimal!
timestamp: BigInt!
transaction: Transaction!
}
Harvest
Records strategy harvest events and performance metrics.
type Harvest @entity {
id: ID!
vault: Vault!
strategy: Strategy!
timestamp: BigInt!
gain: BigDecimal!
loss: BigDecimal!
debt: BigDecimal!
pricePerShare: BigDecimal!
vaultTotalSupply: BigDecimal!
vaultTotalAssets: BigDecimal!
transaction: Transaction!
}
Last updated