Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (#major); aave-forks; upgrade aave-forks to schema 3.0.1 and use sdk #1993

Merged
merged 62 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
394552c
copied over sdk and 3.0 schema
tnkrxyz Apr 5, 2023
929a30b
merged aave-forks schema w/ 3.0.1
tnkrxyz Apr 10, 2023
d737bbc
refactored to use sdk (WIP)
tnkrxyz Apr 10, 2023
475bb4f
cleaning up; renamed token._type
tnkrxyz Apr 10, 2023
c9291bf
fixed indexing errors
tnkrxyz Apr 12, 2023
21f07a4
added protocol side revenue from liquidation
tnkrxyz Apr 12, 2023
454e670
bumped aave-v3 version
tnkrxyz Apr 12, 2023
5d43fe5
simplified aave-v3 yaml
tnkrxyz Apr 14, 2023
b61317c
moved more code to shared src from protocol
tnkrxyz Apr 15, 2023
5d421af
refactored spark-lend and uwu-lend
tnkrxyz Apr 15, 2023
867ebcd
refactored all aave-fork protocols
tnkrxyz Apr 15, 2023
0c9c6b2
fixed eslint errors
tnkrxyz Apr 15, 2023
16f6aa9
added protocol side rev from liquidation for spark lend
tnkrxyz Apr 15, 2023
6c04829
added createLiquidatorPosition flag;prettier changes
tnkrxyz Apr 15, 2023
6e28ee3
added flashloan and fee for avve v2 forks
tnkrxyz Apr 15, 2023
77f96f2
added flashloan and fees for aave-v3, spark-lend
tnkrxyz Apr 15, 2023
1874009
made helper entities immutable
tnkrxyz Apr 15, 2023
03f7885
added isIsoloated flag
tnkrxyz Apr 17, 2023
d407a58
fixed AToken transfer amount #1669
tnkrxyz Apr 17, 2023
0165316
Use BalanceTransfer event for v2 AToken transfers
tnkrxyz Apr 17, 2023
8d38880
fixed BalanceTransfer event signature
tnkrxyz Apr 17, 2023
6e4849c
fixed eslint error
tnkrxyz Apr 17, 2023
0f541ba
fixed configuration.json for aave-v3-optimism
tnkrxyz Apr 18, 2023
55154d6
removed interestType from getOrCreateRewardToken
tnkrxyz Apr 18, 2023
67fbc53
added note for risk type
tnkrxyz Apr 19, 2023
d5c7b42
fixed flashloan premium
tnkrxyz Apr 19, 2023
98f5abe
removed prettier inside aave-forks
tnkrxyz Apr 19, 2023
a298293
fixed lint error
tnkrxyz Apr 20, 2023
83766b9
bumped versions for aave-forks protocols
tnkrxyz Apr 20, 2023
e5d057f
better handling of flashloan premium
tnkrxyz Apr 23, 2023
e4a8805
add interestRateType for debt repay + liquidation
tnkrxyz Apr 25, 2023
70294df
added handler for SwapBorrowRateMode
tnkrxyz Apr 26, 2023
5c68b97
fixed deployment errors
tnkrxyz Apr 28, 2023
37c9889
stopped transfering collateral position to liquidator
tnkrxyz Apr 29, 2023
ca2c6ad
fixed token.load in getAssetPriceInUSDC
tnkrxyz Apr 29, 2023
05ad77b
address PR review comments
tnkrxyz May 3, 2023
3788c12
fix eslint errors
tnkrxyz May 3, 2023
63dd24b
alt method to determine interestRateType for Repay/Liquidation
tnkrxyz May 4, 2023
7d2db89
removed logs for debugging
tnkrxyz May 4, 2023
d609bef
refactored liquidating debt
tnkrxyz May 8, 2023
a61f921
refactored interest rate type detection for Repay
tnkrxyz May 8, 2023
660ae29
removed createLiquidatorPosition
tnkrxyz May 8, 2023
074072d
added "_" prefix to getPositionBalance
tnkrxyz May 9, 2023
ae0fda5
save market entity
tnkrxyz May 11, 2023
c375b16
added eMode and _siloedBorrowing
tnkrxyz May 11, 2023
54bd8e7
fixed market.save(); add interestRateType to createTransfer
tnkrxyz May 16, 2023
307e3ed
added _getName()
tnkrxyz May 16, 2023
d70201e
fixed eslint error
tnkrxyz May 16, 2023
d800a3e
fixed build error
tnkrxyz May 16, 2023
8756b5f
deleted accidentally committed file
tnkrxyz May 16, 2023
6b7078b
added receipt for handleRepay
tnkrxyz May 16, 2023
0b84b40
fixed amountUSD for deposit/withdraw/borrow/repay;fixed repay interes…
tnkrxyz May 18, 2023
104d24d
fixed bug in checking _enabledCollaterals
tnkrxyz May 23, 2023
8db4580
fixing negative revenue due to flashloan premium accounting
tnkrxyz Jun 26, 2023
8d5b45b
set small negative rev due to rounding to 0
tnkrxyz Jun 28, 2023
944c6bc
fixed versions for aave-forks
tnkrxyz Jun 28, 2023
f3f1f2a
Merge branch 'master' into aave-forks-sdk
tnkrxyz Jun 28, 2023
fe2c4a0
fixed eslint errors
tnkrxyz Jun 28, 2023
cbd14e2
fixing merging issues
tnkrxyz Jun 28, 2023
2bcff2a
fixing merging issues
tnkrxyz Jun 28, 2023
4cd8a37
fixed build error aave-v3-metis
tnkrxyz Jun 28, 2023
2950f72
fixed typo
tnkrxyz Jun 28, 2023
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
114 changes: 57 additions & 57 deletions deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.3.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.arc.template.yaml"
Expand Down Expand Up @@ -173,9 +173,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.3.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.amm.template.yaml"
Expand Down Expand Up @@ -207,9 +207,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.3.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.rwa.template.yaml"
Expand Down Expand Up @@ -241,9 +241,9 @@
"network": "avalanche",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.3.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v2.template.yaml"
Expand All @@ -267,9 +267,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.3.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v2.template.yaml"
Expand All @@ -293,9 +293,9 @@
"network": "polygon",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.18",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v2.template.yaml"
Expand Down Expand Up @@ -323,9 +323,9 @@
"network": "arbitrum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -349,9 +349,9 @@
"network": "avalanche",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -375,9 +375,9 @@
"network": "fantom",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -397,9 +397,9 @@
"network": "harmony",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -419,9 +419,9 @@
"network": "polygon",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -441,9 +441,9 @@
"network": "optimism",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.2.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand All @@ -463,9 +463,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.1.0",
"methodology": "1.0.1"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "aave.v3.template.yaml"
Expand Down Expand Up @@ -3837,9 +3837,9 @@
"network": "fantom",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.1.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "geist.finance.template.yaml"
Expand Down Expand Up @@ -3867,9 +3867,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "spark.lend.template.yaml"
Expand Down Expand Up @@ -3897,9 +3897,9 @@
"network": "arbitrum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.1.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "radiant.capital.template.yaml"
Expand Down Expand Up @@ -3931,9 +3931,9 @@
"network": "arbitrum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "radiant.capital.v2.template.yaml"
Expand All @@ -3953,9 +3953,9 @@
"network": "bsc",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "radiant.capital.v2.template.yaml"
Expand Down Expand Up @@ -3983,9 +3983,9 @@
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.1.0",
"methodology": "1.0.0"
"schema": "3.0.1",
"subgraph": "2.0.0",
"methodology": "1.1.0"
},
"files": {
"template": "uwu.lend.template.yaml"
Expand Down
6 changes: 6 additions & 0 deletions schema-lending.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ enum FeeType {
" Fee taken on withdrawal. e.g. found in Euler "
WITHDRAW_FEE

" Flashloan Fees taken by the protocol "
FLASHLOAN_PROTOCOL_FEE

" Flashloan Fees taken by LP "
FLASHLOAN_LP_FEE

" Any fee not represented here. Please make a github issue for this to be added: https://github.com/messari/subgraphs/issues/new "
OTHER
}
Expand Down
2 changes: 2 additions & 0 deletions subgraphs/_reference_/src/sdk/protocols/lending/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export namespace FeeType {
export const PROTOCOL_FEE = "PROTOCOL_FEE";
export const MINT_FEE = "MINT_FEE";
export const WITHDRAW_FEE = "WITHDRAW_FEE";
export const FLASHLOAN_PROTOCOL_FEE = "FLASHLOAN_PROTOCOL_FEE";
export const FLASHLOAN_LP_FEE = "FLASHLOAN_LP_FEE";
export const OTHER = "OTHER";
}

Expand Down
4 changes: 0 additions & 4 deletions subgraphs/aave-forks/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion subgraphs/aave-forks/.prettierrc.json

This file was deleted.

Loading