Main commit: 0300919
- The ID of hourly snapshots has been changed from
{ # of days since Unix epoch time }-{ HH: hour of the day }
to{ # of hours since Unix epoch time }
.
Main PR: #88
Fixes: #109, #111
- Added prefixes to diambiguate quantitative fields:
- cumulative: sum of all historical data from day 1 up to this point. E.g.
cumulativeDepositUSD
means all deposits has ever been made to this protocol/pool. - daily/hourly: this only applies to snapshots and represents the sum of the snapshot interval (i.e. daily aggregate). E.g.
dailyActiveUsers
means all unique active users on a given day, up till now. - All other quantitative field indicates a spot balance. In other words, the value at this point in time. E.g.
totalValueLockedUSD
means the total TVL of the protocol/pool as of now.
- cumulative: sum of all historical data from day 1 up to this point. E.g.
- Updated chain enums to match
dataSource.network()
. - Added
lastPriceUSD
andlastPriceBlockNumber
as optional fields in theToken
entity for tracking prices. - Refactored
RewardToken
to includeToken
as a field. - For snapshots, now saving both
cumulative
values anddaily
aggregates. - Now saving hourly snapshots for usage metrics and pool data.
- Added more detailed usage metrics: deposit/withdraw/swap count.
- Added
inputTokenWeights: [BigDecimal!]!
to track pool composition. - Added per-token volume
dailyVolumeByTokenUSD: [BigDecimal!]!
toLiquidityPoolDailySnapshot
. - Named
PoolDailySnapshot
toLiquidityPoolDailySnapshot
for consistency. - Added
stakedOutputTokenAmount: BigInt
toLiquidityPool
andLiquidityPoolDailySnapshot
.
- Added more detailed usage metrics: deposit/withdraw/repay/liquidate count.
- Now aggregating deposit/borrow/liquidation USD values.
- Added
InterestRate
entity and maderates
into an array. - Added
mintedTokens
andmintedTokenSupplies
to theLendingProtocol
entity. - Added
exchangeRate: BigDecimal
toMarket
andMarketDailySnapshot
entity. - Assume only a single input token (i.e. changed
inputTokens
toinputToken
). - Updated comments to the
Liquidate
event for clarity.
- Added more detailed usage metrics: deposit/withdraw count.
- Assume only a single input token (i.e. changed
inputTokens
toinputToken
).
- Added
stakedOutputTokenAmount: BigInt
. See #87
Main PR: #47
Fixes: #69, #70, #78, #80, #85
- Changed
feesUSD
tototalRevenueUSD
. For DEXes and Lending Protocols, everything stays the same sincefees
=totalRevenue
. For yield aggregator, you now need to include all revenue (including supply side portion). - Added
methodologyVersion
to theProtocol
interface/entity so that we can track which methodology is being used. - Removed
protocolTreasuryUSD
field from theFinanceDailySnapshot
entity - Removed the
Pool
andPoolDailySnapshot
interface for clarity - Added
Account
andDailyActiveAccount
as a part of all schemas, since they are always used to compute usage metrics - Added
totalVolumeUSD
to theProtocol
interface to make aggregator easier - Added a lot of documentation
- Added
totalDepositUSD
andtotalBorrowUSD
to the Lending schema. Note thattotalDepositUSD
should be the same astotalValueLockedUSD
buttotalBorrowUSD
is different fromtotalVolumeUSD
since the former is a point in time and latter is in aggregate. - Made
outputToken
-related fields optional in the DEX schema since Bancor v2 doesn't have LP token (output token) - Updated
LiquidityPoolFeeType
to account for LP fees - Updated
to
/from
fields for DEX deposit/withdraw - Added
pricePerShare
to yield aggregator schema (Yield Aggregator 1.1.1) - Added
inputTokenWeights
to DEX AMM schema (DEX AMM 1.1.1) - Change
stableInterestRate
in the lending schema to optional. See #85