Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions schema-oeth.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ type OETHRebase @entity {
rebasingCredits: BigInt!
rebasingCreditsPerToken: BigInt!
apy: OETHAPY!
fee: BigInt!
yield: BigInt!
feeETH: BigInt!
feeUSD: BigInt!
yieldETH: BigInt!
yieldUSD: BigInt!
}

"""
Expand Down Expand Up @@ -178,12 +180,18 @@ type OETHDailyStat @entity {
dripperWETH: BigInt!
wrappedSupply: BigInt!

yield: BigInt!
fees: BigInt!
revenue: BigInt!
revenue7DayAvg: BigInt!
revenue7DayTotal: BigInt!
revenueAllTime: BigInt!
yieldETH: BigInt!
yieldETHAllTime: BigInt!
yieldUSD: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
feesETH7Day: BigInt!
feesETHAllTime: BigInt!

feesUSD: BigInt!
feesUSD7Day: BigInt!
feesUSDAllTime: BigInt!

pegPrice: BigInt!
"""
Expand All @@ -206,7 +214,7 @@ type OETHStrategyDailyStat @entity {
Total ETH value
"""
holdings: [OETHStrategyHoldingDailyStat]
@derivedFrom(field: "strategyDailyStatId")
@derivedFrom(field: "strategyDailyStatId")
}

type OETHStrategyHoldingDailyStat @entity {
Expand Down Expand Up @@ -279,4 +287,3 @@ type OETHActivity @entity {
toSymbol: String
amount: BigInt
}

69 changes: 67 additions & 2 deletions schema-ousd.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ type OUSDRebase @entity {
rebasingCredits: BigInt!
rebasingCreditsPerToken: BigInt!
apy: OUSDAPY!
fee: BigInt!
yield: BigInt!
feeETH: BigInt!
feeUSD: BigInt!
yieldETH: BigInt!
yieldUSD: BigInt!
}

"""
Expand Down Expand Up @@ -192,3 +194,66 @@ type OUSDActivity @entity {
toSymbol: String
amount: BigInt
}

type OUSDDailyStat @entity {
id: ID!
blockNumber: Int! @index
timestamp: DateTime! @index
apr: Float!
apy: Float!
apy7DayAvg: Float!
apy14DayAvg: Float!
apy30DayAvg: Float!

totalSupply: BigInt!
totalSupplyUSD: Float!
rebasingSupply: BigInt!
nonRebasingSupply: BigInt!
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!

yieldETH: BigInt!
yieldETHAllTime: BigInt!
yieldUSD: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
feesETH7Day: BigInt!
feesETHAllTime: BigInt!

feesUSD: BigInt!
feesUSD7Day: BigInt!
feesUSDAllTime: BigInt!

pegPrice: BigInt!
strategies: [OUSDStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OUSDCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}

type OUSDStrategyDailyStat @entity {
id: ID!
dailyStatId: OUSDDailyStat!
name: String!
total: BigInt!
tvl: BigInt!
holdings: [OUSDStrategyHoldingDailyStat]
@derivedFrom(field: "strategyDailyStatId")
}

type OUSDStrategyHoldingDailyStat @entity {
id: ID!
strategyDailyStatId: OUSDStrategyDailyStat!
symbol: String!
amount: BigInt!
value: BigInt!
}

type OUSDCollateralDailyStat @entity {
id: ID!
dailyStatId: OUSDDailyStat! @index
symbol: String!
amount: BigInt!
price: BigInt!
value: BigInt!
}
96 changes: 84 additions & 12 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ type OETHRebase @entity {
rebasingCredits: BigInt!
rebasingCreditsPerToken: BigInt!
apy: OETHAPY!
fee: BigInt!
yield: BigInt!
feeETH: BigInt!
feeUSD: BigInt!
yieldETH: BigInt!
yieldUSD: BigInt!
}

"""
Expand Down Expand Up @@ -329,12 +331,18 @@ type OETHDailyStat @entity {
dripperWETH: BigInt!
wrappedSupply: BigInt!

yield: BigInt!
fees: BigInt!
revenue: BigInt!
revenue7DayAvg: BigInt!
revenue7DayTotal: BigInt!
revenueAllTime: BigInt!
yieldETH: BigInt!
yieldETHAllTime: BigInt!
yieldUSD: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
feesETH7Day: BigInt!
feesETHAllTime: BigInt!

feesUSD: BigInt!
feesUSD7Day: BigInt!
feesUSDAllTime: BigInt!

pegPrice: BigInt!
"""
Expand All @@ -357,7 +365,7 @@ type OETHStrategyDailyStat @entity {
Total ETH value
"""
holdings: [OETHStrategyHoldingDailyStat]
@derivedFrom(field: "strategyDailyStatId")
@derivedFrom(field: "strategyDailyStatId")
}

type OETHStrategyHoldingDailyStat @entity {
Expand Down Expand Up @@ -430,7 +438,6 @@ type OETHActivity @entity {
toSymbol: String
amount: BigInt
}

type OGV @entity {
id: ID!
timestamp: DateTime! @index
Expand Down Expand Up @@ -582,8 +589,10 @@ type OUSDRebase @entity {
rebasingCredits: BigInt!
rebasingCreditsPerToken: BigInt!
apy: OUSDAPY!
fee: BigInt!
yield: BigInt!
feeETH: BigInt!
feeUSD: BigInt!
yieldETH: BigInt!
yieldUSD: BigInt!
}

"""
Expand Down Expand Up @@ -724,3 +733,66 @@ type OUSDActivity @entity {
toSymbol: String
amount: BigInt
}

type OUSDDailyStat @entity {
id: ID!
blockNumber: Int! @index
timestamp: DateTime! @index
apr: Float!
apy: Float!
apy7DayAvg: Float!
apy14DayAvg: Float!
apy30DayAvg: Float!

totalSupply: BigInt!
totalSupplyUSD: Float!
rebasingSupply: BigInt!
nonRebasingSupply: BigInt!
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!

yieldETH: BigInt!
yieldETHAllTime: BigInt!
yieldUSD: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
feesETH7Day: BigInt!
feesETHAllTime: BigInt!

feesUSD: BigInt!
feesUSD7Day: BigInt!
feesUSDAllTime: BigInt!

pegPrice: BigInt!
strategies: [OUSDStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OUSDCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}

type OUSDStrategyDailyStat @entity {
id: ID!
dailyStatId: OUSDDailyStat!
name: String!
total: BigInt!
tvl: BigInt!
holdings: [OUSDStrategyHoldingDailyStat]
@derivedFrom(field: "strategyDailyStatId")
}

type OUSDStrategyHoldingDailyStat @entity {
id: ID!
strategyDailyStatId: OUSDStrategyDailyStat!
symbol: String!
amount: BigInt!
value: BigInt!
}

type OUSDCollateralDailyStat @entity {
id: ID!
dailyStatId: OUSDDailyStat! @index
symbol: String!
amount: BigInt!
price: BigInt!
value: BigInt!
}
3 changes: 2 additions & 1 deletion src/main-ousd.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as dailyStats from './ousd/post-processors/daily-stats'
import * as ousd from './ousd/processors/ousd'
import * as strategies from './ousd/processors/strategies/strategies'
import * as validateOusd from './ousd/validators/validate-ousd'
Expand All @@ -7,7 +8,7 @@ import * as exchangeRates from './shared/post-processors/exchange-rates'
export const processor = {
stateSchema: 'ousd-processor',
processors: [ousd, strategies],
postProcessors: [exchangeRates],
postProcessors: [exchangeRates, dailyStats],
validators: [validateOusd],
}
export default processor
Expand Down
4 changes: 4 additions & 0 deletions src/model/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ export * from "./ousdAaveStrategy.model"
export * from "./ousdMetaStrategy.model"
export * from "./ousdConvexLusdPlus3Crv.model"
export * from "./ousdActivity.model"
export * from "./ousdDailyStat.model"
export * from "./ousdStrategyDailyStat.model"
export * from "./ousdStrategyHoldingDailyStat.model"
export * from "./ousdCollateralDailyStat.model"
Loading