From b2a4a2795a58603c285fcdd7342f4ab311e7475c Mon Sep 17 00:00:00 2001 From: Conor Flynn Date: Thu, 13 Apr 2023 14:36:18 -0400 Subject: [PATCH] add graph protocol configuration files --- .../requests/graph-borrows.properties | 39 ++++++++ .../requests/graph-collaterals.properties | 35 ++++++++ .../requests/graph-deposits.properties | 35 ++++++++ .../requests/graph-flash-loans.properties | 35 ++++++++ .../requests/graph-liquidations.properties | 38 ++++++++ .../graph-price-history-items.properties | 31 +++++++ .../requests/graph-redeems.properties | 35 ++++++++ .../requests/graph-repays.properties | 35 ++++++++ .../requests/graph-reserves.properties | 37 ++++++++ .../resources/requests/graph-swaps.properties | 90 +++++++++++++++++++ .../requests/graph-user-reserves.properties | 51 +++++++++++ .../resources/requests/graph-users.properties | 2 +- 12 files changed, 462 insertions(+), 1 deletion(-) create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-borrows.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-collaterals.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-deposits.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-flash-loans.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-liquidations.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-price-history-items.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-redeems.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-repays.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties create mode 100644 DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-borrows.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-borrows.properties new file mode 100644 index 00000000..5c183fdc --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-borrows.properties @@ -0,0 +1,39 @@ +request.name= graph-borrows + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,borrows,\ + values,\ + id:\ + user:\ + caller:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + amount:\ + borrowRate:\ + borrowRateMode:\ + stableTokenDebt:\ + variableTokenDebt + +url.headers= Content-Type,application/json + +data.path= data,\ + borrows + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-collaterals.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-collaterals.properties new file mode 100644 index 00000000..f97e7f82 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-collaterals.properties @@ -0,0 +1,35 @@ +request.name= graph-collaterals + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,usageAsCollaterals,\ + values,\ + id:\ + user:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + fromState:\ + toState + +url.headers= Content-Type,application/json + +data.path= data,\ + usageAsCollaterals + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-deposits.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-deposits.properties new file mode 100644 index 00000000..c9c5be4c --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-deposits.properties @@ -0,0 +1,35 @@ +request.name= graph-deposits + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,deposits,\ + values,\ + id:\ + user:\ + caller:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + amount + +url.headers= Content-Type,application/json + +data.path= data,\ + deposits + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-flash-loans.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-flash-loans.properties new file mode 100644 index 00000000..346426e6 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-flash-loans.properties @@ -0,0 +1,35 @@ +request.name= graph-flash-loans + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,flashLoans,\ + values,\ + id:\ + pool:\ + reserve:\ + target:\ + amount:\ + totalFee:\ + initiator:\ + timestamp + +url.headers= Content-Type,application/json + +data.path= data,\ + flashLoans + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-liquidations.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-liquidations.properties new file mode 100644 index 00000000..7b02888d --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-liquidations.properties @@ -0,0 +1,38 @@ +request.name= graph-liquidations + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,liquidationCalls,\ + values,\ + id:\ + user:\ + pool:\ + collateralReserve:\ + collateralUserReserve:\ + principalReserve:\ + principalUserReserve:\ + principalAmount:\ + collateralAmount:\ + timestamp:\ + liquidator + +url.headers= Content-Type,application/json + +data.path= data,\ + liquidationCalls + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-price-history-items.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-price-history-items.properties new file mode 100644 index 00000000..745986e0 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-price-history-items.properties @@ -0,0 +1,31 @@ +request.name= graph-price-history-items + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,priceHistoryItems,\ + values,\ + id:\ + asset:\ + price:\ + timestamp + +url.headers= Content-Type,application/json + +data.path= data,\ + priceHistoryItems + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-redeems.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-redeems.properties new file mode 100644 index 00000000..d7ecd7dc --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-redeems.properties @@ -0,0 +1,35 @@ +request.name= graph-redeems + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,redeemUnderlyings,\ + values,\ + id:\ + user:\ + to:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + amount + +url.headers= Content-Type,application/json + +data.path= data,\ + redeemUnderlyings + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-repays.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-repays.properties new file mode 100644 index 00000000..129c34a0 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-repays.properties @@ -0,0 +1,35 @@ +request.name= graph-repays + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,repays,\ + values,\ + id:\ + user:\ + repayer:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + amount + +url.headers= Content-Type,application/json + +data.path= data,\ + repays + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties new file mode 100644 index 00000000..15dcd2e9 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-reserves.properties @@ -0,0 +1,37 @@ +request.name= graph-swaps + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,swaps,\ + values,\ + id:\ + user:\ + reserve:\ + pool:\ + userReserve:\ + timestamp:\ + borrowRateModeTo:\ + borrowRateModeFrom:\ + stableBorrowRate:\ + variableBorrowRate + +url.headers= Content-Type,application/json + +data.path= data,\ + swaps + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties new file mode 100644 index 00000000..6711c348 --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-swaps.properties @@ -0,0 +1,90 @@ +request.name= graph-reserves + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,reserves,\ + values,\ + id:\ + underlyingAsset:\ + pool:\ + symbol:\ + name:\ + decimals:\ + usageAsCollateralEnabled:\ + borrowingEnabled:\ + stableBorrowRateEnabled:\ + isActive:\ + isFrozen:\ + price:\ + reserveInterestRateStrategy:\ + optimalUtilisationRate:\ + variableRateSlope1:\ + variableRateSlope2:\ + stableRateSlope1:\ + stableRateSlope2:\ + baseVariableBorrowRate:\ + baseLTVasCollateral:\ + reserveLiquidationThreshold:\ + reserveLiquidationBonus:\ + utilizationRate:\ + totalLiquidity:\ + totalATokenSupply:\ + totalLiquidityAsCollateral:\ + totalPrincipalStableDebt:\ + totalScaledVariableDebt:\ + totalCurrentVariableDebt:\ + totalDeposits:\ + liquidityRate:\ + averageStableRate:\ + variableBorrowRate:\ + stableBorrowRate:\ + liquidityIndex:\ + variableBorrowIndex:\ + aToken{id}:\ + vToken{id}:\ + sToken{id}:\ + reserveFactor:\ + lastUpdateTimestamp:\ + stableDebtLastUpdateTimestamp:\ + aEmissionPerSecond:\ + vEmissionPerSecond:\ + sEmissionPerSecond:\ + aTokenIncentivesIndex:\ + vTokenIncentivesIndex:\ + sTokenIncentivesIndex:\ + aIncentivesLastUpdateTimestamp:\ + vIncentivesLastUpdateTimestamp:\ + sIncentivesLastUpdateTimestamp:\ + lifetimeLiquidity:\ + lifetimePrincipalStableDebt:\ + lifetimeScaledVariableDebt:\ + lifetimeCurrentVariableDebt:\ + lifetimeRepayments:\ + lifetimeWithdrawals:\ + lifetimeBorrows:\ + lifetimeLiquidated:\ + lifetimeFlashLoans:\ + lifetimeFlashLoanPremium:\ + lifetimeDepositorsInterestEarned:\ + ifetimeReserveFactorAccrued + +url.headers= Content-Type,application/json + +data.path= data,\ + reserves + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= id + +date.valid= false + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties new file mode 100644 index 00000000..3732930c --- /dev/null +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-user-reserves.properties @@ -0,0 +1,51 @@ +request.name= graph-swaps + +url.base= https://api.thegraph.com/subgraphs/name/aave/protocol-v2 + +url.properties= method,userReserves,\ + values,\ + id:\ + pool:\ + reserve:\ + user:\ + usageAsCollateralEnabledOnUser:\ + scaledATokenBalance:\ + currentATokenBalance:\ + scaledVariableDebt:\ + currentVariableDebt:\ + principalStableDebt:\ + currentStableDebt:\ + currentTotalDebt:\ + stableBorrowRate:\ + oldStableBorrowRate:\ + liquiditiyRate:\ + stableBorrowLastUpdateTimestamp:\ + variableBorrowIndex:\ + aTokenincentivesUserIndex:\ + vTokenincentivesUserIndex:\ + sTokenincentivesUserIndex:\ + aIncentivesLastUpdateTimestamp:\ + vIncentivesLastUpdateTimestamp:\ + sIncentivesLastUpdateTimestamp:\ + lastUpdateTimestamp + +url.headers= Content-Type,application/json + +data.path= data,\ + swaps + +recursion.type= graphql + +recursion.tags= -l,1000 + +recursion.location= timestamp + +date.valid= true + +date.location= properties + +date.start= startDate + +date.end= endDate + +date.format= yyyy-MM-dd \ No newline at end of file diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-users.properties b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-users.properties index b1cb27a6..d8b1abb7 100644 --- a/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-users.properties +++ b/DeFi-Data-Engine/DeFi Data Engine/src/main/resources/requests/graph-users.properties @@ -21,7 +21,7 @@ recursion.tags= -l,1000 recursion.location= id -date.valid= true +date.valid= false date.location= properties