Skip to main content

Entities


SCHEMA GUIDELINES

Naming Conventions

Certain prefixes may be used to indicate a particular type of value.

* total - indicates this is a cumulative value (e.g. totalSharesMinted, totalGrossReturns)

* balance - indicates this is a spot balance (e.g. balanceTokensIdle)

* delta - indicates this value is the difference between the prior state and the current state (e.g. deltaPricePerShare)

* current - used exclusively in Update entities. Similar to balance, current indicates the state of a field or value at the time of the update. These values are populated in every update whether they changed or not.

* new - used exclusively in Update entities. Fields with this prefix will only be populated if they have changed since the last Update. If there has been no change, the value will be null.

Use plurals when referring to Tokens or Shares (e.g. totalShares, balanceTokens)



Transaction

Description: get specific details of the transaction

FieldTypeDescription
idID!Transaction hash + Log Index
logIndexBigInt!Log index related to the event. A Transaction might contain multiple events
eventString!The event name / call stacktrace
fromBytes!The transaction sender
gasPriceBigInt!Gas price used in the transaction
gasLimitBigInt!Gas limit used in the transaction
hashBytes!Transaction hash
indexBigInt!The transaction index
toBytes!Address that received the transaction
valueBigInt!Ether value sent in the transaction
timestampBigInt!Timestamp when the transaction was executed
blockGasLimitBigInt!Gas limit used in the current block
blockNumberBigInt!Block number

Token

Description: get specific details of the token

FieldTypeDescription
idID!Token address
decimalsInt!Number of decimals for this Token
nameString!Name of the Token
symbolString!Symbol of the Token

TokenFee

Description: get specific details of the token fee

FieldTypeDescription
idID!Token address
vaultVault!Vault this fee is for
tokenToken!The token which the fees are denominated in. Equivalent to vault.token.
totalTreasuryFeesBigInt!All time fees paid using this token to the treasury. Denominated in the vault's want token.
totalStrategyFeesBigInt!All time fees paid using this token to strategists. Denominated in the vault's want token.
totalFeesBigInt!All time fees paid using this token to strategists and the treasury. Denominated in the vault's want token.
unrecognizedTreasuryFeesBigInt!Internal field used by VaultUpdate. The amount of treasury fees paid using this token that has yet to be recognized by the subgraph's accounting logic.
unrecognizedStrategyFeesBigInt!Internal field used by VaultUpdate. The amount of strategist fees paid using this token that has yet to be recognized by the subgraph's accounting logic.

VaultRelease

Description: get specific details of the Vault Release

FieldTypeDescription
idID!Release index in Registry contract
versionString!Version string
contractBytes!Contract address
vaultsVault!Vault deployments of this release version
timestampBigInt!Timestamp of Release
blockNumberBigInt!Block number of Release
transactionTransaction!Ethereum Transaction

Registry

Description: get specific details of the Registry

FieldTypeDescription
idID!Registry address
timestampBigInt!Transaction timestamp
blockNumberBigInt!Transaction/Block Block number
transactionTransaction!Ethereum Transaction
vaultsVault!Vaults registered in the registry

Vault

Description: get specific details of the Vault

FieldTypeDescription
idID!Vault address
transactionTransaction!Ethereum Transaction
registryRegistry!The registry address
tokenToken!Token this Vault will accrue
shareTokenToken!Token representing Shares in the Vault
statusVaultStatus!Vault status
classificationVaultClassification!Vault classification
releaseVaultRelease!Release Information
latestUpdateVaultUpdateLatest Vault Update
vaultDayDataVaultDayData!All Vault Updates
historicalUpdatesVaultUpdate!All Vault Updates
strategiesStrategy!Strategies for this Vault
strategyIds[Strategy!]!Strategy Ids for this vault
depositsDeposit!Token deposits into the Vault
withdrawalsWithdrawal!Token withdrawals from the Vault
withdrawalQueue[Strategy!]!withdrawl queue of strategies
transfersTransfer!Transfers of Vault Shares
tags[String!]!Tags attached to the Vault
balanceTokensBigInt!Balance of Tokens in the Vault and its Strategies
balanceTokensIdleBigInt!Current idle Token balance
sharesSupplyBigInt!Current supply of Shares
managementFeeBpsInt!Management fee in basis points
performanceFeeBpsInt!Performance fee in basis points
rewardsBytes!The address where management fees are paid to
isTemplateListeningBoolean!This technical field defines whether this vault is a custom item (created by a custom handler) or not (created by the registry dynamically)
activationBigInt!Creation timestamp
apiVersionString!The API version
healthCheckHealthCheckThe vault's health check contract
guardianBytes!The address authorized for guardian interactions in the new Vault
managementBytes!The management address of the Vault to assert privileged functions that can only be called by management
governanceBytes!The governance address of the Vault to assert privileged functions that can only be called by governance
availableDepositLimitBigInt!The maximum amount of underlying that can be deposited
depositLimitBigInt!The maximum amount of tokens that can be deposited in this Vault
emergencyShutdownBoolean!Is vault in emergency shutdown
activationBlockNumberBigInt!Block.timestamp of contract deployment

VaultUpdate

Description: get specific details of Vault Update

FieldTypeDescription
idID!Vault-Transaction-Log
timestampBigInt!Timestamp of update
blockNumberBigInt!Block number of update
transactionTransaction!Ethereum Transaction
vaultVault!Vault this update is for
tokensDepositedBigInt!Sum of tokens deposited
tokensWithdrawnBigInt!Sum of tokens withdrawn
sharesMintedBigInt!Sum of Shares minted over all time
sharesBurntBigInt!Sum of Shares burnt over all time
balancePositionBigInt!The current balance position defined as: (vault.totalAssets() * (vault.pricePerShare() / 10**vault.decimals())).
returnsGeneratedBigInt!Returns generated in Tokens
totalFeesBigInt!Total fees accrued over the lifetime of the vault. Denominated in want tokens.
pricePerShareBigInt!Price per full share at the time of the update. Denominated in want tokens.
currentBalanceTokensBigInt!Balance of Tokens in the Vault and its Strategies at the time of update.
newManagementFeeBigIntManagement fee at time of update, in basis points. If this value has not been changed since the last VaultEvent, it will be null.
newPerformanceFeeBigIntNew Performance fee at time of update, in basis points. If this value has not been changed since the last VaultEvent, it will be null.
newRewardsBytesThe new Rewards address that management fees will be paid to. If this value has not been changed since the last VaultEvent, it will be null.
newHealthCheckHealthCheckThe vault's new health check contract. If this value has not been changed since the last VaultEvent, it will be null.
availableDepositLimitBigInt!The maximum amount of underlying that can be deposited
depositLimitBigInt!The maximum amount of tokens that can be deposited in this Vault
guardianBytes!The address authorized for guardian interactions in the new Vault
managementBytes!The management address of the Vault to assert privileged functions that can only be called by management
governanceBytes!The governance address of the Vault to assert privileged functions that can only be called by governance

Healthcheck

Description: get healthcheck

FieldTypeDescription
idID!Health check address
vaultsVault!Vaults that use this health check contract

Account

Description: get specific details of the Account

FieldTypeDescription
idID!Account address
depositsDeposit!Vault deposits
withdrawalsWithdrawal!Vault withdrawals
vaultPositionsAccountVaultPosition!Vault positions
sharesReceivedTransfer!Incoming share transfers
sharesSentTransfer!Outgoing share transfers

Deposit

Description: get specific details of the Deposit

FieldTypeDescription
idID!Transaction-Log
timestampBigInt!Timestamp of update
blockNumberBigInt!Block number of update
accountAccount!Account making Deposit
vaultVault!Vault deposited into
tokenAmountBigInt!Number of Tokens deposited into Vault
sharesMintedBigInt!Number of new Vault Shares minted
transactionTransaction!Ethereum Transaction
vaultUpdateVaultUpdate!Vault Update

Withdrawal

Description: get specific details of the Withdrawal

FieldTypeDescription
idID!Transaction-Log
timestampBigInt!Timestamp of update
blockNumberBigInt!Block number of update
accountAccount!Account making withdraw
vaultVault!Vault withdrawn from
tokenAmountBigInt!Number of Tokens withdrawn from Vault
sharesBurntBigInt!Number of Vault Shares burnt
transactionTransaction!Ethereum Transaction
vaultUpdateVaultUpdate!Vault Update

Transfer

Description: get specific details of the Transfer

FieldTypeDescription
idID!Transaction-Log
vaultVault!Vault
fromAccount!Sender
toAccount!Receiver
shareTokenToken!Vault Share Token
shareAmountBigInt!Number of Vault Shares transferred
tokenToken!Vault Token
tokenAmountBigInt!Number of Tokens redeemable for shares transferred
tokenAmountUsdcBigInt!Token Amount in USDC, 0 if the transaction was before the oracle was deployed at 12198044
timestampBigInt!Timestamp of Transfer
blockNumberBigInt!Block number of Transfer
transactionTransaction!Ethereum Transaction
isFeeToTreasuryBoolean!Whether the transfer was used to pay a fee to the vault's rewards address
isFeeToStrategyBoolean!Whether the transfer was used to pay a fee to a strategy

AccountVaultPosition

Description: get specific details of the Account Vault positions

FieldTypeDescription
idID!Account-Vault
vaultVault!Vault
accountAccount!Account
tokenToken!Vault token
shareTokenToken!Vault share token
transactionTransaction!Created in transaction
latestUpdateAccountVaultPositionUpdate!Latest account update for this Vault
updatesAccountVaultPositionUpdate!Account updates over time
balanceSharesBigInt!Share balance
balanceTokensBigInt!The current balance of tokens defined as: sum(deposits) - sum(withdrawals) + sum(received transfers) - sum(sent transfers).
balancePositionBigInt!The current balance position defined as: (vault.balanceOf(account) * (vault.pricePerShare() / 10**vault.decimals())).
balanceProfitBigInt!The accumulated profit balance for the account/vault. It is only calculated when the user withdraws all the shares.

AccountVaultPositionUpdate

Description: get specific details of the Account Vault positions

FieldTypeDescription
idID!Account-Vault-Order
orderBigInt!Incremental value for the same account/vault.
timestampBigInt!Timestamp
blockNumberBigInt!Block number
accountAccount!Account that owns position update
accountVaultPositionAccountVaultPosition!The account vault position that this update applies to
transactionTransaction!Ethereum Transaction
depositsBigInt!Sum of token deposits
withdrawalsBigInt!Sum of token withdrawals
sharesMintedBigInt!Sum of share tokens minted
sharesBurntBigInt!Sum of share tokens burnt
tokensSentBigInt!Tokens sent
tokensReceivedBigInt!Tokens received
sharesSentBigInt!Share tokens sent
sharesReceivedBigInt!Share tokens received
balanceSharesBigInt!The balance of shares
balancePositionBigInt!The balance position.
vaultUpdateVaultUpdate!Vault Update

Strategy

Description: get specific details of the Strategy

FieldTypeDescription
idID!Strategy address
nameString!Strategy name.
timestampBigInt!Timestamp the vault information was most recently updated.
blockNumberBigInt!Blocknumber the vault information was most recently updated.
transactionTransaction!Ethereum Transaction
addressBytes!The Strategy address.
healthCheckBytesThe health check contract address.
doHealthCheckBoolean!Defines whether the strategy will call the health check or not.
inQueueBoolean!Defines whether this strategy is within the vault queue
vaultVault!The Vault
clonedFromStrategyStrategy reference used to clone this strategy.
debtLimitBigInt!Defines the maximum borrow amount. In strategies <v0.3.5 it is debtRatio.
minDebtPerHarvestBigInt!Lower limit on the increase of debt since last harvest.
maxDebtPerHarvestBigInt!Upper limit on the increase of debt since last harvest.
rateLimitBigInt!It is the current rate limit. It increases/decreases per block. This field is currently only populated on strategy create
performanceFeeBpsBigInt!Defines the strategist's fee (basis points).
latestReportStrategyReportThe latest report for this Strategy
reportsStrategyReport!The reports created by this strategy
harvestsHarvest!harvest() calls
apiVersionString!Used to track the deployed version of this contract
emergencyExitBoolean!Determines if strategy is in emergency exit
keeperBytes!keeper is the only address that may call tend() or harvest(), other than governance() or strategist
strategistBytes!The address of the strategist
rewardsBytes!The address for rewards
delegatedAssetsBigInt!The amount of assets this strategy manages that should not be included in Yearn's Total Value Locked (TVL) calculation across it's ecosystem.
isActiveBoolean!Provide an indication of whether this strategy is currently active
estimatedTotalAssetsBigInt!#Provide an accurate estimate for the total amount of assets (principle + return) that this Strategy is currently managing, denominated in terms of want tokens.

StrategyMigration

Description: get specific details of the Strategy Migration

FieldTypeDescription
idID!The Strategy Migration ID
oldStrategyStrategy!Old Strategy
newStrategyStrategy!New Strategy
blockNumberBigInt!Blocknumber the migration was created.
timestampBigInt!Timestamp the migration was created.
transactionTransaction!Ethereum Transaction

StrategyReport

Description: get specific details of the Strategy Report

FieldTypeDescription
idID!The Strategy Report ID
timestampBigInt!Timestamp the strategy report was most recently updated.
blockNumberBigInt!Blocknumber the strategy report was most recently updated.
transactionTransaction!Ethereum Transaction
strategyStrategy!The Strategy reference.
gainBigInt!The reported gain amount for the strategy.
lossBigInt!The reported loss amount for the strategy.
totalGainBigInt!The reported total gain amount for the strategy.
totalLossBigInt!The reported total loss amount for the strategy.
totalDebtBigInt!The reported total debt amount for the strategy.
debtAddedBigInt!The reported debt added amount for the strategy.
debtLimitBigInt!The reported debt limit amount for the strategy.
debtPaidBigInt!The reported debt paid for the strategy. This field is 0 for v0.3.0 or v0.3.1.
vaultUpdateVaultUpdate!Vault state
resultsStrategyReportResult!The results created by this report. They are generated comparing the previous report and the current one
apy12dEMAInt!12-day EMA of Vault APY as reported by built-in Yield Oracle
apy50dEMAInt!50-day EMA of Vault APY as reported by built-in Yield Oracle

StrategyReportResult

Description: get specific details of the Strategy Report Results

FieldTypeDescription
idID!The Strategy Report Result ID
timestampBigInt!Timestamp the strategy report was most recently updated.
blockNumberBigInt!Blocknumber the strategy report was most recently updated.
currentReportStrategyReport!The current strategy report.
previousReportStrategyReport!The previous strategy report.
startTimestampBigInt!Start time of report
endTimestampBigInt!End time of report
durationBigDecimal!The duration (in days) from the previous report.
durationPrBigDecimal!Duration percentage rate.
aprBigDecimal!Annual Percentage Rate.
transactionTransaction!Ethereum Transaction

Harvest

Description: get specific details of the Harvest

FieldTypeDescription
idID!Stratedy-Transaction-Log
timestampBigInt!Timestamp the strategy report was most recently updated
blockNumberBigInt!Blocknumber the strategy report was most recently updated
transactionTransaction!Ethereum Transaction
vaultVault!Vault that owns the strategy
strategyStrategy!Strategy that harvested
harvesterBytes!Function caller
profitBigInt!The reported profit amount for the strategy at the time of the harvest
lossBigInt!The reported loss amount for the strategy at the time of the harvest
debtPaymentBigInt!The reported debt paid from strategy at the time of the harvest
debtOutstandingBigInt!The reported outstanding debt from strategy at the time of the harvest

VaultDayData

Description: get specific details of Vault Day Data

FieldTypeDescription
idID!vault ID
timestampBigInt!time in UTC
vaultVault!specific vault
pricePerShareBigInt!price per share of vault
depositedBigInt!The amount of tokens deposited to this vault this day
withdrawnBigInt!The amount of tokens withdrawn from this vault this day
totalReturnsGeneratedBigInt!The total earnings generated for this vault up to and including this day
totalReturnsGeneratedUSDCBigInt!The total earnings generated in USDC for this vault up to and including this day. These returns are priced using the token's USDC-denominated price at the time each harvest was performed.
dayReturnsGeneratedBigInt!The earnings generated for this vault this day
dayReturnsGeneratedUSDCBigInt!The earnings generated in USDC for this vault this day. These returns are priced using the token's USDC-denominated price at the time each harvest was performed.
tokenPriceUSDCBigInt!The price of one of the vault's underlying token
blockNumberBigInt!Block number the day data aggregation occured on

Yearn

Description: get specific details of Yearn

FieldTypeDescription
idID!
treasuryFeesUsdcBigInt!Only valid after the oracle was deployed at 12242339
strategyFeesUsdcBigInt!Only valid after the oracle was deployed at 12242339
totalFeesUsdcBigInt!Only valid after the oracle was deployed at 12242339