defi-state-querier 0.5.33__py3-none-any.whl → 0.5.34__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- defi_services/__init__.py +1 -1
- defi_services/abis/lending/venus/venus_comptroller_optimism_abi.py +2125 -0
- defi_services/abis/lending/yldr/__init__.py +0 -0
- defi_services/abis/lending/yldr/yldr_lending_abi.py +1725 -0
- defi_services/constants/chain_constant.py +4 -0
- defi_services/constants/entities/lending_constant.py +2 -1
- defi_services/constants/entities/lending_services.py +5 -2
- defi_services/jobs/queriers/state_querier.py +1 -1
- defi_services/services/lending/aave_v3_services.py +11 -1
- defi_services/services/lending/lending_info/arbitrum/venus_arbitrum.py +46 -2
- defi_services/services/lending/lending_info/arbitrum/yldr_arbitrum.py +51 -2
- defi_services/services/lending/lending_info/avalanche/benqi_avalanche.py +2 -2
- defi_services/services/lending/lending_info/base/venus_base.py +42 -0
- defi_services/services/lending/lending_info/celo/__init__.py +0 -0
- defi_services/services/lending/lending_info/celo/aave_v3_celo.py +47 -0
- defi_services/services/lending/lending_info/ethereum/spark_eth.py +1 -1
- defi_services/services/lending/lending_info/ethereum/venus_eth.py +124 -2
- defi_services/services/lending/lending_info/ethereum/yldr_ethereum.py +38 -2
- defi_services/services/lending/lending_info/gnosis/__init__.py +0 -0
- defi_services/services/lending/lending_info/gnosis/aave_v3_gnoisis.py +69 -0
- defi_services/services/lending/lending_info/gnosis/spark_gnosis.py +75 -0
- defi_services/services/lending/lending_info/harmony/__init__.py +0 -0
- defi_services/services/lending/lending_info/harmony/aave_v3_harmony.py +69 -0
- defi_services/services/lending/lending_info/opBNB/__init__.py +0 -0
- defi_services/services/lending/lending_info/opBNB/venus_opbnb.py +42 -0
- defi_services/services/lending/lending_info/optimism/moonwell_optimism.py +86 -0
- defi_services/services/lending/lending_info/optimism/venus_optimism.py +42 -0
- defi_services/services/lending/lending_info/scroll/__init__.py +0 -0
- defi_services/services/lending/lending_info/scroll/aave_v3_scroll.py +48 -0
- defi_services/services/lending/lending_info/sonic/__init__.py +0 -0
- defi_services/services/lending/lending_info/sonic/aave_v3_sonic.py +41 -0
- defi_services/services/lending/lending_info/zksync/venus_zksync.py +58 -2
- defi_services/services/lending/moonwell_service.py +3 -1
- defi_services/services/lending/spark_services.py +3 -1
- defi_services/services/lending/venus_services.py +18 -2
- defi_services/services/lending/xlend_services.py +2 -10
- defi_services/services/lending/yldr_services.py +394 -0
- {defi_state_querier-0.5.33.dist-info → defi_state_querier-0.5.34.dist-info}/METADATA +1 -1
- {defi_state_querier-0.5.33.dist-info → defi_state_querier-0.5.34.dist-info}/RECORD +42 -23
- {defi_state_querier-0.5.33.dist-info → defi_state_querier-0.5.34.dist-info}/WHEEL +1 -1
- {defi_state_querier-0.5.33.dist-info → defi_state_querier-0.5.34.dist-info}/licenses/LICENSE +0 -0
- {defi_state_querier-0.5.33.dist-info → defi_state_querier-0.5.34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
AAVE_V3_HARMONY = {
|
2
|
+
"address": "0x794a61358d6845594f94dc1db02a252b5b4814ad",
|
3
|
+
"name": "AAVE V3 Lending Pool",
|
4
|
+
"stakedIncentiveAddress": '0x929ec64c34a17401f460460d4b9390518e5b473e',
|
5
|
+
"rewardTokensList": [],
|
6
|
+
"oracleAddress": "0x3c90887ede8d65ccb2777a5d577beab2548280ad",
|
7
|
+
"type": "LENDING_POOL",
|
8
|
+
"poolToken": "",
|
9
|
+
"forked": "aave-v3",
|
10
|
+
"reservesList": {
|
11
|
+
"0xef977d2f931c1978db5f6747666fa1eacb0d0339": {
|
12
|
+
"tToken": "0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee",
|
13
|
+
"sdToken": "0xd94112b5b62d53c9402e7a60289c6810def1dc9b",
|
14
|
+
"dToken": "0x8619d80fb0141ba7f184cbf22fd724116d9f7ffc",
|
15
|
+
"loanToValue": 0.75,
|
16
|
+
"liquidationThreshold": 0.8
|
17
|
+
},
|
18
|
+
"0x218532a12a389a4a92fc0c5fb22901d1c19198aa": {
|
19
|
+
"tToken": "0x191c10aa4af7c30e871e70c95db0e4eb77237530",
|
20
|
+
"sdToken": "0x89d976629b7055ff1ca02b927ba3e020f22a44e4",
|
21
|
+
"dToken": "0x953a573793604af8d41f306feb8274190db4ae0e",
|
22
|
+
"loanToValue": 0.7,
|
23
|
+
"liquidationThreshold": 0.75
|
24
|
+
},
|
25
|
+
"0x985458e523db3d53125813ed68c274899e9dfab4": {
|
26
|
+
"tToken": "0x625e7708f30ca75bfd92586e17077590c60eb4cd",
|
27
|
+
"sdToken": "0x307ffe186f84a3bc2613d1ea417a5737d69a7007",
|
28
|
+
"dToken": "0xfccf3cabbe80101232d343252614b6a3ee81c989",
|
29
|
+
"loanToValue": 0.8,
|
30
|
+
"liquidationThreshold": 0.85
|
31
|
+
},
|
32
|
+
"0x3095c7557bcb296ccc6e363de01b760ba031f2d9": {
|
33
|
+
"tToken": "0x078f358208685046a11c85e8ad32895ded33a249",
|
34
|
+
"sdToken": "0x633b207dd676331c413d4c013a6294b0fe47cd0e",
|
35
|
+
"dToken": "0x92b42c66840c7ad907b4bf74879ff3ef7c529473",
|
36
|
+
"loanToValue": 0.7,
|
37
|
+
"liquidationThreshold": 0.75
|
38
|
+
},
|
39
|
+
"0x6983d1e6def3690c4d616b13597a09e6193ea013": {
|
40
|
+
"tToken": "0xe50fa9b3c56ffb159cb0fca61f5c9d750e8128c8",
|
41
|
+
"sdToken": "0xd8ad37849950903571df17049516a5cd4cbe55f6",
|
42
|
+
"dToken": "0x0c84331e39d6658cd6e6b9ba04736cc4c4734351",
|
43
|
+
"loanToValue": 0.8,
|
44
|
+
"liquidationThreshold": 0.825
|
45
|
+
},
|
46
|
+
"0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f": {
|
47
|
+
"tToken": "0x6ab707aca953edaefbc4fd23ba73294241490620",
|
48
|
+
"sdToken": "0x70effc565db6eef7b927610155602d31b670e802",
|
49
|
+
"dToken": "0xfb00ac187a8eb5afae4eace434f493eb62672df7",
|
50
|
+
"loanToValue": 0.75,
|
51
|
+
"liquidationThreshold": 0.8
|
52
|
+
},
|
53
|
+
"0xcf323aad9e522b93f11c352caa519ad0e14eb40f": {
|
54
|
+
"tToken": "0xf329e36c7bf6e5e86ce2150875a84ce77f477375",
|
55
|
+
"sdToken": "0xfaef6a702d15428e588d4c0614aefb4348d83d48",
|
56
|
+
"dToken": "0xe80761ea617f66f96274ea5e8c37f03960ecc679",
|
57
|
+
"loanToValue": 0.5,
|
58
|
+
"liquidationThreshold": 0.65
|
59
|
+
},
|
60
|
+
"0xcf664087a5bb0237a0bad6742852ec6c8d69a27a": {
|
61
|
+
"tToken": "0x6d80113e533a2c0fe82eabd35f1875dcea89ea97",
|
62
|
+
"sdToken": "0xf15f26710c827dde8acba678682f3ce24f2fb56e",
|
63
|
+
"dToken": "0x4a1c3ad6ed28a636ee1751c69071f6be75deb8b8",
|
64
|
+
"loanToValue": 0.25,
|
65
|
+
"liquidationThreshold": 0.45
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
}
|
File without changes
|
@@ -0,0 +1,42 @@
|
|
1
|
+
VENUS_OPBNB = {
|
2
|
+
"projectName": "Venus",
|
3
|
+
"name": "Venus Lending Pool",
|
4
|
+
"rewardToken": "",
|
5
|
+
"comptrollerAddress": "0xd6e3e2a1d8d95cae355d15b3b9f8e5c2511874dd",
|
6
|
+
"lensAddress": "0x2ed744f6e722aa5e41e67267774b386d244e5e4e",
|
7
|
+
"poolToken": "",
|
8
|
+
"type": "LENDING_POOL",
|
9
|
+
"forked": "compound",
|
10
|
+
"reservesList": {
|
11
|
+
"0x7c6b91d9be155a6db01f749217d76ff02a7227f2": {
|
12
|
+
"cToken": "0xed827b80bd838192ea95002c01b5c6da8354219a",
|
13
|
+
"exchangeRate": 1.0000506991295468,
|
14
|
+
"liquidationThreshold": 0.7,
|
15
|
+
"loanToValue": 0.7
|
16
|
+
},
|
17
|
+
"0xe7798f023fc62146e8aa1b36da45fb70855a77ea": {
|
18
|
+
"cToken": "0x509e81ef638d489936fa85bc58f52df01190d26c",
|
19
|
+
"exchangeRate": 1.0055438541292125,
|
20
|
+
"liquidationThreshold": 0.7,
|
21
|
+
"loanToValue": 0.7
|
22
|
+
},
|
23
|
+
"0x9e5aac1ba1a2e6aed6b32689dfcf62a509ca96f3": {
|
24
|
+
"cToken": "0xb7a01ba126830692238521a1aa7e7a7509410b8e",
|
25
|
+
"exchangeRate": 1.0364626534624786,
|
26
|
+
"liquidationThreshold": 0.75,
|
27
|
+
"loanToValue": 0.75
|
28
|
+
},
|
29
|
+
"0x4200000000000000000000000000000000000006": {
|
30
|
+
"cToken": "0x53d11cb8a0e5320cd7229c3acc80d1a0707f2672",
|
31
|
+
"exchangeRate": 1.0237816504108685,
|
32
|
+
"liquidationThreshold": 0.6,
|
33
|
+
"loanToValue": 0.6
|
34
|
+
},
|
35
|
+
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb": {
|
36
|
+
"cToken": "0x13b492b8a03d072bab5c54ac91dba5b830a50917",
|
37
|
+
"exchangeRate": 1.0212604531407183,
|
38
|
+
"liquidationThreshold": 0.75,
|
39
|
+
"loanToValue": 0.75
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
@@ -6,4 +6,90 @@ MOONWELL_OPTIMISM = {
|
|
6
6
|
"poolToken": "0xa88594d404727625a9437c3f886c7643872296ae",
|
7
7
|
"type": "LENDING_POOL",
|
8
8
|
"forked": "compound",
|
9
|
+
"reservesList":{
|
10
|
+
"0x0b2c639c533813f4aa9d7837caf62653d097ff85": {
|
11
|
+
"cToken": "0x8e08617b0d66359d73aa11e11017834c29155525",
|
12
|
+
"exchangeRate": 0.0208652145806442,
|
13
|
+
"liquidationThreshold": 0.88,
|
14
|
+
"loanToValue": 0.88
|
15
|
+
},
|
16
|
+
"0x94b008aa00579c1307b0ef2c499ad98a8ce58e58": {
|
17
|
+
"cToken": "0xa3a53899ee8f9f6e963437c5b3f805fec538bf84",
|
18
|
+
"exchangeRate": 0.0207763520307085,
|
19
|
+
"liquidationThreshold": 0.88,
|
20
|
+
"loanToValue": 0.88
|
21
|
+
},
|
22
|
+
"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1": {
|
23
|
+
"cToken": "0x3fe782c2fe7668c2f1eb313acf3022a31fead6b2",
|
24
|
+
"exchangeRate": 0.020879802896977526,
|
25
|
+
"liquidationThreshold": 0.83,
|
26
|
+
"loanToValue": 0.83
|
27
|
+
},
|
28
|
+
"0x68f180fcce6836688e9084f035309e29bf0a2095": {
|
29
|
+
"cToken": "0x6e6ca598a06e609c913551b729a228b023f06fdb",
|
30
|
+
"exchangeRate": 0.020022714682036598,
|
31
|
+
"liquidationThreshold": 0.001,
|
32
|
+
"loanToValue": 0.001
|
33
|
+
},
|
34
|
+
"0x4200000000000000000000000000000000000006": {
|
35
|
+
"cToken": "0xb4104c02bbf4e9be85aaa41a62974e4e28d59a33",
|
36
|
+
"exchangeRate": 0.020244300816811025,
|
37
|
+
"liquidationThreshold": 0.83,
|
38
|
+
"loanToValue": 0.83
|
39
|
+
},
|
40
|
+
"0x1f32b1c2345538c0c6f582fcb022739c4a194ebb": {
|
41
|
+
"cToken": "0xbb3b1ab66efb43b10923b87460c0106643b83f9d",
|
42
|
+
"exchangeRate": 0.020064065898116556,
|
43
|
+
"liquidationThreshold": 0.81,
|
44
|
+
"loanToValue": 0.81
|
45
|
+
},
|
46
|
+
"0xaddb6a0412de1ba0f936dcaeb8aaa24578dcf3b2": {
|
47
|
+
"cToken": "0x95c84f369bd0251ca903052600a3c96838d78ba1",
|
48
|
+
"exchangeRate": 0.02000539873389154,
|
49
|
+
"liquidationThreshold": 0.81,
|
50
|
+
"loanToValue": 0.81
|
51
|
+
},
|
52
|
+
"0x9bcef72be871e61ed4fbbc7630889bee758eb81d": {
|
53
|
+
"cToken": "0x4c2e35e3ec4a0c82849637bc04a4609dbe53d321",
|
54
|
+
"exchangeRate": 0.02015439845616458,
|
55
|
+
"liquidationThreshold": 0.81,
|
56
|
+
"loanToValue": 0.81
|
57
|
+
},
|
58
|
+
"0x3c8b650257cfb5f272f799f5e2b4e65093a11a05": {
|
59
|
+
"cToken": "0x21d851585840942b0ef9f20d842c00c5f3735eaf",
|
60
|
+
"exchangeRate": 0.02,
|
61
|
+
"liquidationThreshold": 0.0,
|
62
|
+
"loanToValue": 0.0
|
63
|
+
},
|
64
|
+
"0x4200000000000000000000000000000000000042": {
|
65
|
+
"cToken": "0x9fc345a20541bf8773988515c5950ed69af01847",
|
66
|
+
"exchangeRate": 0.020068198205405036,
|
67
|
+
"liquidationThreshold": 0.65,
|
68
|
+
"loanToValue": 0.65
|
69
|
+
},
|
70
|
+
"0x5a7facb970d094b6c7ff1df0ea68d99e6e73cbff": {
|
71
|
+
"cToken": "0xb8051464c8c92209c92f3a4cd9c73746c4c3cfb3",
|
72
|
+
"exchangeRate": 0.02006773230964768,
|
73
|
+
"liquidationThreshold": 0.78,
|
74
|
+
"loanToValue": 0.78
|
75
|
+
},
|
76
|
+
"0x9560e827af36c94d2ac33a39bce1fe78631088db": {
|
77
|
+
"cToken": "0x866b838b97ee43f2c818b3cb5cc77a0dc22003fc",
|
78
|
+
"exchangeRate": 0.020074075469987605,
|
79
|
+
"liquidationThreshold": 0.63,
|
80
|
+
"loanToValue": 0.63
|
81
|
+
},
|
82
|
+
"0x87eee96d50fb761ad85b1c982d28a042169d61b1": {
|
83
|
+
"cToken": "0x181ba797ccf779d8ab339721ed6ee827e758668e",
|
84
|
+
"exchangeRate": 0.020045637406496248,
|
85
|
+
"liquidationThreshold": 0.74,
|
86
|
+
"loanToValue": 0.74
|
87
|
+
},
|
88
|
+
"0x01bff41798a0bcf287b996046ca68b395dbc1071": {
|
89
|
+
"cToken": "0xed37cd7872c6fe4020982d35104be7919b8f8b33",
|
90
|
+
"exchangeRate": 0.02,
|
91
|
+
"liquidationThreshold": 0.83,
|
92
|
+
"loanToValue": 0.83
|
93
|
+
}
|
94
|
+
}
|
9
95
|
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
VENUS_OPTIMISM = {
|
2
|
+
"projectName": "Venus",
|
3
|
+
"name": "Venus Lending Pool",
|
4
|
+
"rewardToken": "",
|
5
|
+
"comptrollerAddress": "0x5593ff68be84c966821eef5f0a988c285d5b7cec",
|
6
|
+
"lensAddress": "0x142160a2e699e33af337741f157d96aad6bc72aa",
|
7
|
+
"poolToken": "",
|
8
|
+
"type": "LENDING_POOL",
|
9
|
+
"forked": "compound",
|
10
|
+
"reservesList": {
|
11
|
+
"0x68f180fcce6836688e9084f035309e29bf0a2095": {
|
12
|
+
"cToken": "0x9efdcfc2373f81d3df24647b1c46e15268884c46",
|
13
|
+
"exchangeRate": 1.000004426806658,
|
14
|
+
"liquidationThreshold": 0.68,
|
15
|
+
"loanToValue": 0.68
|
16
|
+
},
|
17
|
+
"0x4200000000000000000000000000000000000006": {
|
18
|
+
"cToken": "0x66d5ae25731ce99d46770745385e662c8e0b4025",
|
19
|
+
"exchangeRate": 1.0002524575431078,
|
20
|
+
"liquidationThreshold": 0.75,
|
21
|
+
"loanToValue": 0.75
|
22
|
+
},
|
23
|
+
"0x94b008aa00579c1307b0ef2c499ad98a8ce58e58": {
|
24
|
+
"cToken": "0x37ac9731b0b02df54975cd0c7240e0977a051721",
|
25
|
+
"exchangeRate": 1.0129800053966553,
|
26
|
+
"liquidationThreshold": 0.75,
|
27
|
+
"loanToValue": 0.75
|
28
|
+
},
|
29
|
+
"0x4200000000000000000000000000000000000042": {
|
30
|
+
"cToken": "0x6b846e3418455804c1920fa4cc7a31a51c659a2d",
|
31
|
+
"exchangeRate": 1.0000009131775718,
|
32
|
+
"liquidationThreshold": 0.58,
|
33
|
+
"loanToValue": 0.58
|
34
|
+
},
|
35
|
+
"0x0b2c639c533813f4aa9d7837caf62653d097ff85": {
|
36
|
+
"cToken": "0x1c9406ee95b7af55f005996947b19f91b6d55b15",
|
37
|
+
"exchangeRate": 1.0200439616434542,
|
38
|
+
"liquidationThreshold": 0.75,
|
39
|
+
"loanToValue": 0.75
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
AAVE_V3_SCROLL = {
|
2
|
+
"address": "0x11fcfe756c05ad438e312a7fd934381537d3cffe",
|
3
|
+
"name": "AAVE V3 Lending Pool",
|
4
|
+
"stakedIncentiveAddress": '0xa3f3100c4f1d0624db9db97b40c13885ce297799',
|
5
|
+
"rewardTokensList": [],
|
6
|
+
"oracleAddress": "0x04421d8c506e2fa2371a08efaabf791f624054f3",
|
7
|
+
"type": "LENDING_POOL",
|
8
|
+
"poolToken": "",
|
9
|
+
"forked": "aave-v3",
|
10
|
+
"reservesList": {
|
11
|
+
"0x5300000000000000000000000000000000000004": {
|
12
|
+
"tToken": "0xf301805be1df81102c957f6d4ce29d2b8c056b2a",
|
13
|
+
"sdToken": "0x117d9cf336287f46dbe509a43925cff115aa563c",
|
14
|
+
"dToken": "0xfd7344ceb1df9cf238ecd667f4a6f99c6ef44a56",
|
15
|
+
"loanToValue": 0.8,
|
16
|
+
"liquidationThreshold": 0.83
|
17
|
+
},
|
18
|
+
"0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4": {
|
19
|
+
"tToken": "0x1d738a3436a8c49ceffbab7fbf04b660fb528cbd",
|
20
|
+
"sdToken": "0x117d9cf336287f46dbe509a43925cff115aa563c",
|
21
|
+
"dToken": "0x3d2e209af5bfa79297c88d6b57f89d792f6e28ee",
|
22
|
+
"loanToValue": 0.75,
|
23
|
+
"liquidationThreshold": 0.78
|
24
|
+
},
|
25
|
+
"0xf610a9dfb7c89644979b4a0f27063e9e7d7cda32": {
|
26
|
+
"tToken": "0x5b1322eeb46240b02e20062b8f0f9908d525b09c",
|
27
|
+
"sdToken": "0x117d9cf336287f46dbe509a43925cff115aa563c",
|
28
|
+
"dToken": "0x8a035644322129800c3f747f54db0f4d3c0a2877",
|
29
|
+
"loanToValue": 0.75,
|
30
|
+
"liquidationThreshold": 0.79
|
31
|
+
},
|
32
|
+
"0x01f0a31698c4d065659b9bdc21b3610292a1c506": {
|
33
|
+
"tToken": "0xd80a5e16dbdc52bd1c947cedfa22c562be9129c8",
|
34
|
+
"sdToken": "0x117d9cf336287f46dbe509a43925cff115aa563c",
|
35
|
+
"dToken": "0x009d88c6a6b4caa240b71c98ba93732e26f2a55a",
|
36
|
+
"loanToValue": 0.725,
|
37
|
+
"liquidationThreshold": 0.75
|
38
|
+
},
|
39
|
+
"0xd29687c813d741e2f938f4ac377128810e217b1b": {
|
40
|
+
"tToken": "0x25718130c2a8eb94e2e1fafb5f1cdd4b459acf64",
|
41
|
+
"sdToken": "0x117d9cf336287f46dbe509a43925cff115aa563c",
|
42
|
+
"dToken": "0xffba405bbf25b2e6c454d18165f2fd8786858c6b",
|
43
|
+
"loanToValue": 0.0,
|
44
|
+
"liquidationThreshold": 0.0
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
}
|
File without changes
|
@@ -0,0 +1,41 @@
|
|
1
|
+
AAVE_V3_SONIC = {
|
2
|
+
"address": "0x5362dbb1e601abf3a4c14c22ffeda64042e5eaa3",
|
3
|
+
"name": "AAVE V3 Lending Pool",
|
4
|
+
"stakedIncentiveAddress": '0x24bd6e9ca54f1737467def82dca9702925b3aa59',
|
5
|
+
"rewardTokensList": [],
|
6
|
+
"oracleAddress": "0xd63f7658c66b2934bd234d79d06aef5290734b30",
|
7
|
+
"type": "LENDING_POOL",
|
8
|
+
"poolToken": "",
|
9
|
+
"forked": "aave-v3",
|
10
|
+
"reservesList": {
|
11
|
+
"0x50c42deacd8fc9773493ed674b675be577f2634b": {
|
12
|
+
"tToken": "0xe18ab82c81e7eecff32b8a82b1b7d2d23f1ece96",
|
13
|
+
"sdToken": "0x0000000000000000000000000000000000000000",
|
14
|
+
"dToken": "0x07b1adfb7d5795cf21bae8a77eceb222f2fafbce",
|
15
|
+
"loanToValue": 0.8,
|
16
|
+
"liquidationThreshold": 0.83
|
17
|
+
},
|
18
|
+
"0x29219dd400f2bf60e5a23d13be72b486d4038894": {
|
19
|
+
"tToken": "0x578ee1ca3a8e1b54554da1bf7c583506c4cd11c6",
|
20
|
+
"sdToken": "0x0000000000000000000000000000000000000000",
|
21
|
+
"dToken": "0x2273cabad63b7d247a6b107e723c803fc49953a0",
|
22
|
+
"loanToValue": 0.75,
|
23
|
+
"liquidationThreshold": 0.78
|
24
|
+
},
|
25
|
+
"0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38": {
|
26
|
+
"tToken": "0x6c5e14a212c1c3e4baf6f871ac9b1a969918c131",
|
27
|
+
"sdToken": "0x0000000000000000000000000000000000000000",
|
28
|
+
"dToken": "0xf6089b790fbf8f4812a79a31cfabeb00b06ba7bd",
|
29
|
+
"loanToValue": 0.68,
|
30
|
+
"liquidationThreshold": 0.7
|
31
|
+
},
|
32
|
+
"0xe5da20f15420ad15de0fa650600afc998bbe3955": {
|
33
|
+
"tToken": "0xeaa74d7f42267eb907092af4bc700f667eed0b8b",
|
34
|
+
"sdToken": "0x0000000000000000000000000000000000000000",
|
35
|
+
"dToken": "0x333cfdcb6457c409e4f0c88f3806252bee5fe425",
|
36
|
+
"loanToValue": 0.66,
|
37
|
+
"liquidationThreshold": 0.68
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
}
|
@@ -2,9 +2,65 @@ VENUS_ZKSYNC = {
|
|
2
2
|
"projectName": "Venus",
|
3
3
|
"name": "Venus Lending Pool",
|
4
4
|
"rewardToken": "0xd78abd81a3d57712a3af080dc4185b698fe9ac5a",
|
5
|
-
"comptrollerAddress": "",
|
6
|
-
"lensAddress": "",
|
5
|
+
"comptrollerAddress": "0xdde4d098d9995b659724ae6d5e3fb9681ac941b1",
|
6
|
+
"lensAddress": "0x69fc4232959131b4992597b739cec97ee898aa68",
|
7
7
|
"poolToken": "0xd78abd81a3d57712a3af080dc4185b698fe9ac5a",
|
8
8
|
"type": "LENDING_POOL",
|
9
9
|
"forked": "compound",
|
10
|
+
"reservesList": {
|
11
|
+
"0xbbeb516fb02a01611cbbe0453fe3c580d7281011": {
|
12
|
+
"cToken": "0xaf8fd83cfcbe963211faaf1847f0f217f80b4719",
|
13
|
+
"exchangeRate": 1.007070389694167,
|
14
|
+
"liquidationThreshold": 0.77,
|
15
|
+
"loanToValue": 0.77
|
16
|
+
},
|
17
|
+
"0x5aea5775959fbc2557cc8789bc1bf90a239d9a91": {
|
18
|
+
"cToken": "0x1fa916c27c7c2c4602124a14c77dbb40a5ff1be8",
|
19
|
+
"exchangeRate": 1.0047150946314665,
|
20
|
+
"liquidationThreshold": 0.77,
|
21
|
+
"loanToValue": 0.77
|
22
|
+
},
|
23
|
+
"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4": {
|
24
|
+
"cToken": "0x1af23bd57c62a99c59ad48236553d0dd11e49d2d",
|
25
|
+
"exchangeRate": 1.0356501900490338,
|
26
|
+
"liquidationThreshold": 0.75,
|
27
|
+
"loanToValue": 0.75
|
28
|
+
},
|
29
|
+
"0x493257fd37edb34451f62edf8d2a0c418852ba4c": {
|
30
|
+
"cToken": "0x69cda960e3b20dfd480866fffd377ebe40bd0a46",
|
31
|
+
"exchangeRate": 1.0459536378801164,
|
32
|
+
"liquidationThreshold": 0.77,
|
33
|
+
"loanToValue": 0.77
|
34
|
+
},
|
35
|
+
"0x5a7d6b2f92c77fad6ccabd7ee0624e64907eaf3e": {
|
36
|
+
"cToken": "0x697a70779c1a03ba2bd28b7627a902bff831b616",
|
37
|
+
"exchangeRate": 1.0014802393769437,
|
38
|
+
"liquidationThreshold": 0.4,
|
39
|
+
"loanToValue": 0.4
|
40
|
+
},
|
41
|
+
"0x1d17cbcf0d6d143135ae902365d2e5e2a16538d4": {
|
42
|
+
"cToken": "0x84064c058f2efea4ab648bb6bd7e40f83ffde39a",
|
43
|
+
"exchangeRate": 1.0267375242682901,
|
44
|
+
"liquidationThreshold": 0.75,
|
45
|
+
"loanToValue": 0.75
|
46
|
+
},
|
47
|
+
"0xa900cbe7739c96d2b153a273953620a701d5442b": {
|
48
|
+
"cToken": "0x183de3c349fcf546aae925e1c7f364ea6fb4033c",
|
49
|
+
"exchangeRate": 1.0040517806945923,
|
50
|
+
"liquidationThreshold": 0.0,
|
51
|
+
"loanToValue": 0.0
|
52
|
+
},
|
53
|
+
"0x703b52f2b28febcb60e1372858af5b18849fe867": {
|
54
|
+
"cToken": "0x03cad66259f7f34ee075f8b62d133563d249eda4",
|
55
|
+
"exchangeRate": 1.0000023657125416,
|
56
|
+
"liquidationThreshold": 0.71,
|
57
|
+
"loanToValue": 0.71
|
58
|
+
},
|
59
|
+
"0xb72207e1fb50f341415999732a20b6d25d8127aa": {
|
60
|
+
"cToken": "0xceb7da150d16ace58f090754fef2775c23c8b631",
|
61
|
+
"exchangeRate": 1.0000000035608936,
|
62
|
+
"liquidationThreshold": 0.0,
|
63
|
+
"loanToValue": 0.0
|
64
|
+
}
|
65
|
+
}
|
10
66
|
}
|
@@ -8,6 +8,7 @@ from defi_services.constants.entities.lending_constant import Lending
|
|
8
8
|
from defi_services.constants.token_constant import Token
|
9
9
|
from defi_services.jobs.queriers.state_querier import StateQuerier
|
10
10
|
from defi_services.services.lending.lending_info.base.moonwell_base import MOONWELL_BASE
|
11
|
+
from defi_services.services.lending.lending_info.optimism.moonwell_optimism import MOONWELL_OPTIMISM
|
11
12
|
from defi_services.services.lending.venus_services import VenusStateService
|
12
13
|
|
13
14
|
logger = logging.getLogger("MoonWell Lending Pool State Service")
|
@@ -15,7 +16,8 @@ logger = logging.getLogger("MoonWell Lending Pool State Service")
|
|
15
16
|
|
16
17
|
class MoonWellInfo:
|
17
18
|
mapping = {
|
18
|
-
Chain.base: MOONWELL_BASE
|
19
|
+
Chain.base: MOONWELL_BASE,
|
20
|
+
Chain.optimism: MOONWELL_OPTIMISM
|
19
21
|
}
|
20
22
|
|
21
23
|
|
@@ -5,13 +5,15 @@ from defi_services.constants.entities.lending_constant import Lending
|
|
5
5
|
from defi_services.jobs.queriers.state_querier import StateQuerier
|
6
6
|
from defi_services.services.lending.aave_v3_services import AaveV3StateService
|
7
7
|
from defi_services.services.lending.lending_info.ethereum.spark_eth import SPARK_ETH
|
8
|
+
from defi_services.services.lending.lending_info.gnosis.spark_gnosis import SPARK_GNOSIS
|
8
9
|
|
9
10
|
logger = logging.getLogger("Spark Lending Pool State Service")
|
10
11
|
|
11
12
|
|
12
13
|
class SparkInfo:
|
13
14
|
mapping = {
|
14
|
-
Chain.ethereum: SPARK_ETH
|
15
|
+
Chain.ethereum: SPARK_ETH,
|
16
|
+
Chain.gnosis: SPARK_GNOSIS
|
15
17
|
}
|
16
18
|
|
17
19
|
|
@@ -3,6 +3,7 @@ import logging
|
|
3
3
|
from web3 import Web3
|
4
4
|
|
5
5
|
from defi_services.abis.lending.venus.venus_comptroller_abi import VENUS_COMPTROLLER_ABI
|
6
|
+
from defi_services.abis.lending.venus.venus_comptroller_optimism_abi import VENUS_COMPTROLLER_OP_ABI
|
6
7
|
from defi_services.abis.lending.venus.venus_lens_abi import VENUS_LENS_ABI
|
7
8
|
from defi_services.abis.lending.venus.vtoken_abi import VTOKEN_ABI
|
8
9
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
@@ -11,14 +12,26 @@ from defi_services.constants.entities.lending_constant import Lending
|
|
11
12
|
from defi_services.constants.token_constant import Token
|
12
13
|
from defi_services.jobs.queriers.state_querier import StateQuerier
|
13
14
|
from defi_services.services.lending.compound_service import CompoundStateService
|
15
|
+
from defi_services.services.lending.lending_info.arbitrum.venus_arbitrum import VENUS_ARB
|
16
|
+
from defi_services.services.lending.lending_info.base.venus_base import VENUS_BASE
|
14
17
|
from defi_services.services.lending.lending_info.bsc.venus_bsc import VENUS_BSC
|
18
|
+
from defi_services.services.lending.lending_info.ethereum.venus_eth import VENUS_ETH
|
19
|
+
from defi_services.services.lending.lending_info.opBNB.venus_opbnb import VENUS_OPBNB
|
20
|
+
from defi_services.services.lending.lending_info.optimism.venus_optimism import VENUS_OPTIMISM
|
21
|
+
from defi_services.services.lending.lending_info.zksync.venus_zksync import VENUS_ZKSYNC
|
15
22
|
|
16
23
|
logger = logging.getLogger("Venus Lending Pool State Service")
|
17
24
|
|
18
25
|
|
19
26
|
class VenusInfo:
|
20
27
|
mapping = {
|
21
|
-
Chain.bsc: VENUS_BSC
|
28
|
+
Chain.bsc: VENUS_BSC,
|
29
|
+
Chain.optimism: VENUS_OPTIMISM,
|
30
|
+
Chain.arbitrum: VENUS_ARB,
|
31
|
+
Chain.base: VENUS_BASE,
|
32
|
+
Chain.zksync: VENUS_ZKSYNC,
|
33
|
+
Chain.ethereum: VENUS_ETH,
|
34
|
+
Chain.opbnb: VENUS_OPBNB
|
22
35
|
}
|
23
36
|
|
24
37
|
|
@@ -30,7 +43,10 @@ class VenusStateService(CompoundStateService):
|
|
30
43
|
self.pool_info = VenusInfo.mapping.get(chain_id)
|
31
44
|
self.state_service = state_service
|
32
45
|
self.lens_abi = VENUS_LENS_ABI
|
33
|
-
|
46
|
+
if chain_id == Chain.bsc:
|
47
|
+
self.comptroller_abi = VENUS_COMPTROLLER_ABI
|
48
|
+
else:
|
49
|
+
self.comptroller_abi = VENUS_COMPTROLLER_OP_ABI
|
34
50
|
self.vtoken_abi = VTOKEN_ABI
|
35
51
|
|
36
52
|
# BASIC FUNCTIONS
|
@@ -14,16 +14,8 @@ from defi_services.constants.network_constants import NATIVE_TOKEN
|
|
14
14
|
from defi_services.constants.time_constant import TimeConstants
|
15
15
|
from defi_services.jobs.queriers.state_querier import StateQuerier
|
16
16
|
from defi_services.services.lending.aave_v2_services import AaveV2StateService
|
17
|
-
from defi_services.services.lending.lending_info.arbitrum.aave_v3_arbitrum import AAVE_V3_ARB
|
18
|
-
from defi_services.services.lending.lending_info.avalanche.aave_v3_avalanche import AAVE_V3_AVALANCHE
|
19
|
-
from defi_services.services.lending.lending_info.base.aave_v3_base import AAVE_V3_BASE
|
20
17
|
from defi_services.services.lending.lending_info.base.xlend_base import XLEND_BASE
|
21
|
-
from defi_services.services.lending.lending_info.
|
22
|
-
from defi_services.services.lending.lending_info.ethereum.old_aave_v3_eth import AAVE_V3_ETH
|
23
|
-
from defi_services.services.lending.lending_info.fantom.aave_v3_ftm import AAVE_V3_FTM
|
24
|
-
from defi_services.services.lending.lending_info.optimism.aave_v3_optimism import AAVE_V3_OPTIMISM
|
25
|
-
from defi_services.services.lending.lending_info.polygon.aave_v3_polygon import AAVE_V3_POLYGON
|
26
|
-
from defi_services.services.lending.lending_info.zksync.aave_v3_zksync import AAVE_V3_ZKSYNC
|
18
|
+
from defi_services.services.lending.lending_info.optimism.xlend_optimism import XLEND_OPTIMISM
|
27
19
|
|
28
20
|
logger = logging.getLogger("Xlend Lending Pool State Service")
|
29
21
|
|
@@ -31,7 +23,7 @@ logger = logging.getLogger("Xlend Lending Pool State Service")
|
|
31
23
|
class XlendInfo:
|
32
24
|
mapping = {
|
33
25
|
Chain.base: XLEND_BASE,
|
34
|
-
Chain.optimism:
|
26
|
+
Chain.optimism: XLEND_OPTIMISM
|
35
27
|
}
|
36
28
|
|
37
29
|
|