defi-state-querier 0.5.23__py3-none-any.whl → 0.5.25__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.
Files changed (28) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/abis/lending/ionic/__init__.py +0 -0
  3. defi_services/abis/lending/ionic/ionic_ctoken_abi.py +1108 -0
  4. defi_services/abis/lending/moonwell/__init__.py +0 -0
  5. defi_services/abis/lending/moonwell/moonwell_comptroller_abi.py +1500 -0
  6. defi_services/abis/lending/moonwell/moonwell_ctoken_abi.py +1431 -0
  7. defi_services/abis/lending/radiant_v2/radiant_reward_converter.py +817 -0
  8. defi_services/constants/chain_constant.py +2 -1
  9. defi_services/constants/entities/lending_constant.py +10 -5
  10. defi_services/constants/entities/lending_services.py +9 -1
  11. defi_services/services/lending/granary_services.py +3 -1
  12. defi_services/services/lending/ionic_service.py +167 -0
  13. defi_services/services/lending/lending_info/base/granary_base.py +62 -0
  14. defi_services/services/lending/lending_info/base/ionic_base.py +173 -0
  15. defi_services/services/lending/lending_info/base/moonwell_base.py +79 -1
  16. defi_services/services/lending/lending_info/base/radiant_v2_base.py +57 -0
  17. defi_services/services/lending/lending_info/base/sonne_base.py +53 -0
  18. defi_services/services/lending/lending_info/base/zerolend_base.py +99 -99
  19. defi_services/services/lending/moonwell_service.py +120 -0
  20. defi_services/services/lending/radiant_v2_services.py +50 -10
  21. defi_services/services/lending/sonne_service.py +64 -0
  22. defi_services/services/lending/venus_services.py +9 -3
  23. defi_services/services/lending/zerolend_services.py +1 -1
  24. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/METADATA +1 -1
  25. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/RECORD +28 -15
  26. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/LICENSE +0 -0
  27. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/WHEEL +0 -0
  28. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/top_level.txt +0 -0
@@ -54,5 +54,6 @@ class BlockTime:
54
54
  Chain.optimism: 1, # TODO: check
55
55
  Chain.avalanche: 2,
56
56
  Chain.tron: 3,
57
- Chain.cronos: 6
57
+ Chain.cronos: 6,
58
+ Chain.base: 2
58
59
  }
@@ -26,8 +26,13 @@ class Lending:
26
26
  compound_v3 = 'compound-v3'
27
27
  justlend = "justlend"
28
28
  zerolend = "zerolend"
29
- all = [strike, aave_v2, aave_v3, radiant_v2, compound, flux, onyx, granary,
30
- iron_bank, trava, valas, geist, cream, venus, liqee, strike, uwu, wepiggy,
31
- morpho_compound, morpho_aave_v2, morpho_aave_v3, spark, ape_swap, silo, compound_v3,
32
- justlend, zerolend
33
- ]
29
+ moonwell = "moonwell"
30
+ ionic = "ionic-protocol"
31
+ sonne = "sonne-finance"
32
+
33
+ all = [
34
+ strike, aave_v2, aave_v3, radiant_v2, compound, flux, onyx, granary,
35
+ iron_bank, trava, valas, geist, cream, venus, liqee, strike, uwu, wepiggy,
36
+ morpho_compound, morpho_aave_v2, morpho_aave_v3, spark, ape_swap, silo, compound_v3,
37
+ justlend, zerolend, moonwell, ionic, sonne
38
+ ]
@@ -4,11 +4,14 @@ from defi_services.services.lending.aave_v2_services import AaveV2StateService
4
4
  from defi_services.services.lending.apeswap_services import ApeSwapStateService
5
5
  from defi_services.services.lending.compound_v3_services import CompoundV3StateService
6
6
  from defi_services.services.lending.granary_services import GranaryStateService
7
+ from defi_services.services.lending.ionic_service import IonicStateService
7
8
  from defi_services.services.lending.justlend_service import JustLendStateService
9
+ from defi_services.services.lending.moonwell_service import MoonWellStateService
8
10
  from defi_services.services.lending.morpho_aave_v2_services import MorphoAaveV2StateService
9
11
  from defi_services.services.lending.morpho_aave_v3_services import MorphoAaveV3StateService
10
12
  from defi_services.services.lending.morpho_compound_services import MorphoCompoundStateService
11
13
  from defi_services.services.lending.silo_services import SiloStateService
14
+ from defi_services.services.lending.sonne_service import SonneStateService
12
15
  from defi_services.services.lending.spark_services import SparkStateService
13
16
  from defi_services.services.lending.uwu_services import UwuStateService
14
17
  from defi_services.services.lending.aave_v3_services import AaveV3StateService
@@ -110,7 +113,12 @@ class LendingServices:
110
113
  base = {
111
114
  Lending.aave_v3: AaveV3StateService,
112
115
  Lending.compound_v3: CompoundV3StateService,
113
- Lending.zerolend: ZeroLendStateService
116
+ Lending.zerolend: ZeroLendStateService,
117
+ Lending.moonwell: MoonWellStateService,
118
+ Lending.granary: GranaryStateService,
119
+ Lending.radiant_v2: RadiantStateService,
120
+ Lending.ionic: IonicStateService,
121
+ Lending.sonne: SonneStateService
114
122
  }
115
123
 
116
124
  zksync = {
@@ -14,6 +14,7 @@ from defi_services.constants.token_constant import Token
14
14
  from defi_services.jobs.queriers.state_querier import StateQuerier
15
15
  from defi_services.services.lending.lending_info.arbitrum.granary_arbitrum import GRANARY_ARBITRUM
16
16
  from defi_services.services.lending.lending_info.avalanche.granary_avalanche import GRANARY_AVALANCHE
17
+ from defi_services.services.lending.lending_info.base.granary_base import GRANARY_BASE
17
18
  from defi_services.services.lending.lending_info.bsc.granary_bsc import GRANARY_BSC
18
19
  from defi_services.services.lending.lending_info.ethereum.granary_eth import GRANARY_V1_ETH
19
20
  from defi_services.services.lending.lending_info.fantom.granary_ftm import GRANARY_FTM
@@ -31,7 +32,8 @@ class GranaryV1Info:
31
32
  Chain.optimism: GRANARY_OPTIMISM,
32
33
  Chain.fantom: GRANARY_FTM,
33
34
  Chain.avalanche: GRANARY_AVALANCHE,
34
- Chain.arbitrum: GRANARY_ARBITRUM
35
+ Chain.arbitrum: GRANARY_ARBITRUM,
36
+ Chain.base: GRANARY_BASE
35
37
  }
36
38
 
37
39
 
@@ -0,0 +1,167 @@
1
+ import logging
2
+
3
+ from web3 import Web3
4
+
5
+ from defi_services.abis.lending.ionic.ionic_ctoken_abi import IONIC_CTOKEN_ABI
6
+ from defi_services.abis.lending.moonwell.moonwell_comptroller_abi import MOONWELL_COMPTROLLER_ABI
7
+ from defi_services.abis.token.erc20_abi import ERC20_ABI
8
+ from defi_services.constants.chain_constant import Chain
9
+ from defi_services.constants.entities.lending_constant import Lending
10
+ from defi_services.constants.token_constant import Token
11
+ from defi_services.jobs.queriers.state_querier import StateQuerier
12
+ from defi_services.services.lending.lending_info.base.ionic_base import IONIC_BASE
13
+ from defi_services.services.lending.venus_services import VenusStateService
14
+
15
+ logger = logging.getLogger("Ionic Lending Pool State Service")
16
+
17
+
18
+ class IonicInfo:
19
+ mapping = {
20
+ Chain.base: IONIC_BASE
21
+ }
22
+
23
+
24
+ class IonicStateService(VenusStateService):
25
+ def __init__(self, state_service: StateQuerier, chain_id: str = "0x38"):
26
+ super().__init__(state_service, chain_id)
27
+ self.name = f"{chain_id}_{Lending.ionic}"
28
+ self.chain_id = chain_id
29
+ self.pool_info = IonicInfo.mapping.get(chain_id)
30
+ self.state_service = state_service
31
+ self.comptroller_abi = MOONWELL_COMPTROLLER_ABI
32
+ self.vtoken_abi = IONIC_CTOKEN_ABI
33
+
34
+ def get_service_info(self):
35
+ info = {
36
+ Lending.ionic: {
37
+ "chain_id": self.chain_id,
38
+ "type": "lending",
39
+ "protocol_info": self.pool_info
40
+ }
41
+ }
42
+ return info
43
+
44
+ def get_dapp_asset_info(self, block_number: int = "latest"):
45
+ _w3 = self.state_service.get_w3()
46
+ comptroller_contract = _w3.eth.contract(
47
+ address=_w3.to_checksum_address(self.pool_info.get("comptrollerAddress")), abi=self.comptroller_abi)
48
+ ctokens = []
49
+ for token in comptroller_contract.functions.getAllMarkets().call(block_identifier=block_number):
50
+ ctokens.append(token)
51
+
52
+ reserves_info = {}
53
+ tokens = [Web3.to_checksum_address(i) for i in ctokens]
54
+ queries = {}
55
+ for token in tokens:
56
+ key = f"underlying_{token}_{block_number}".lower()
57
+ queries[key] = {
58
+ "address": token, "abi": self.vtoken_abi, "params": [],
59
+ "function": "underlying", "block_number": block_number
60
+ }
61
+
62
+ exchange_rate_query_id = f'exchangeRateCurrent_{token}_{block_number}'
63
+ queries[exchange_rate_query_id] = self.get_ctoken_function_info(
64
+ ctoken=token, fn_name='exchangeRateCurrent', block_number=block_number)
65
+
66
+ markets = f"markets_{token}_{block_number}".lower()
67
+ queries[markets] = self.get_comptroller_function_info("markets", [token])
68
+
69
+ decoded_data = self.state_service.query_state_data(queries)
70
+ for token in tokens:
71
+ key = f"underlying_{token}_{block_number}".lower()
72
+ underlying = decoded_data.get(key).lower()
73
+ markets = f"markets_{token}_{block_number}".lower()
74
+ liquidation_threshold = decoded_data.get(markets)[1] / 10 ** 18
75
+ ltv = liquidation_threshold
76
+
77
+ exchange_rate_query_id = f'exchangeRateCurrent_{token}_{block_number}'
78
+ exchange_rate = decoded_data.get(exchange_rate_query_id) / 10 ** 18
79
+
80
+ reserves_info[underlying] = {
81
+ 'cToken': token.lower(),
82
+ "exchangeRate": exchange_rate,
83
+ "liquidationThreshold": liquidation_threshold,
84
+ "loanToValue": ltv
85
+ }
86
+ return reserves_info
87
+
88
+ def get_apy_lending_pool_function_info(
89
+ self,
90
+ reserves_info: dict,
91
+ block_number: int = "latest"
92
+ ):
93
+ rpc_calls = {}
94
+ for token_address, reserve_info in reserves_info.items():
95
+ if token_address != Token.native_token:
96
+ query_id = f"decimals_{token_address}_{block_number}".lower()
97
+ rpc_calls[query_id] = self.state_service.get_function_info(token_address, ERC20_ABI, "decimals", [], block_number)
98
+
99
+ ctoken = reserve_info.get("cToken")
100
+ for fn_name in ['decimals', 'totalSupply', 'totalBorrows', 'supplyRatePerBlock', 'borrowRatePerBlock', 'exchangeRateCurrent']:
101
+ query_id = f"{fn_name}_{ctoken}_{block_number}".lower()
102
+ rpc_calls[query_id] = self.get_ctoken_function_info(
103
+ ctoken=ctoken,
104
+ fn_name=fn_name,
105
+ block_number=block_number
106
+ )
107
+
108
+ return rpc_calls
109
+
110
+ def get_reserve_tokens_metadata(
111
+ self,
112
+ decoded_data: dict,
113
+ reserves_info: dict,
114
+ block_number: int = "latest"
115
+ ):
116
+ reserve_tokens_info = []
117
+ for token_address, reserve_info in reserves_info.items():
118
+ if token_address != Token.native_token:
119
+ underlying_decimals_query_id = f"decimals_{token_address}_{block_number}".lower()
120
+ underlying_decimals = decoded_data.get(underlying_decimals_query_id)
121
+ else:
122
+ underlying_decimals = Chain.native_decimals.get(self.chain_id, 18)
123
+
124
+ ctoken = reserve_info.get("cToken")
125
+ ctoken_decimals_query_id = f"decimals_{ctoken}_{block_number}".lower()
126
+ total_supply_query_id = f"totalSupply_{ctoken}_{block_number}".lower()
127
+ total_borrow_query_id = f"totalBorrows_{ctoken}_{block_number}".lower()
128
+ supply_rate_query_id = f"supplyRatePerBlock_{ctoken}_{block_number}".lower()
129
+ borrow_rate_query_id = f"borrowRatePerBlock_{ctoken}_{block_number}".lower()
130
+ exchange_rate_query_id = f"exchangeRateCurrent_{ctoken}_{block_number}".lower()
131
+
132
+ reserve_tokens_info.append({
133
+ "token": ctoken,
134
+ "token_decimals": decoded_data.get(ctoken_decimals_query_id),
135
+ "borrow_rate": decoded_data.get(borrow_rate_query_id),
136
+ "supply_rate": decoded_data.get(supply_rate_query_id),
137
+ "supply": decoded_data.get(total_supply_query_id),
138
+ "borrow": decoded_data.get(total_borrow_query_id),
139
+ "exchange_rate": decoded_data.get(exchange_rate_query_id),
140
+ "underlying_decimals": underlying_decimals,
141
+ "underlying": token_address
142
+ })
143
+ return reserve_tokens_info
144
+
145
+ @classmethod
146
+ def _calculate_interest_rates(
147
+ cls, token_info: dict, pool_decimals: int, apx_block_speed_in_seconds: float):
148
+ block_per_day = int(86400 / apx_block_speed_in_seconds)
149
+ exchange_rate = float(token_info["exchange_rate"]) / 10 ** 18
150
+
151
+ total_borrow = float(token_info["borrow"]) / 10 ** int(token_info["underlying_decimals"])
152
+ total_supply = float(token_info["supply"]) * exchange_rate / 10 ** int(token_info["token_decimals"])
153
+
154
+ supply_apy = ((token_info["supply_rate"] / 10 ** pool_decimals) * block_per_day + 1) ** 365 - 1
155
+ borrow_apy = ((token_info["borrow_rate"] / 10 ** pool_decimals) * block_per_day + 1) ** 365 - 1
156
+
157
+ return {
158
+ 'deposit_apy': supply_apy,
159
+ 'borrow_apy': borrow_apy,
160
+ 'total_deposit': total_supply,
161
+ 'total_borrow': total_borrow
162
+ }
163
+
164
+ def get_ctoken_function_info(self, ctoken: str, fn_name: str, fn_paras: list = None, block_number: int = "latest"):
165
+ return self.state_service.get_function_info(
166
+ ctoken, self.vtoken_abi, fn_name, fn_paras, block_number
167
+ )
@@ -0,0 +1,62 @@
1
+ GRANARY_BASE = {
2
+ "address": "0xb702ce183b4e1faa574834715e5d4a6378d0eed3",
3
+ "name": "Granary Finance Lending Pool",
4
+ "rewardToken": [],
5
+ "rewarder": "0xc043ba54f34c9fb3a0b45d22e2ef1f171272bc9d",
6
+ "stakedIncentiveAddress": "",
7
+ "poolToken": "",
8
+ "oracleAddress": "0x5a3423210536d930150080f699248edebc65e2b4",
9
+ "type": "LENDING_POOL",
10
+ "forked": "aave-v2",
11
+ "reservesList": {
12
+ "0x50c5725949a6f0c72e6c4a641f24049a917db0cb": {
13
+ "tToken": "0xe7334ad0e325139329e747cf2fc24538dd564987",
14
+ "dToken": "0xe5415fa763489c813694d7a79d133f0a7363310c",
15
+ "sdToken": "0xc40709470139657e6d80249c5cc998efb44898c9",
16
+ "loanToValue": 0.7,
17
+ "liquidationThreshold": 0.75
18
+ },
19
+ "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca": {
20
+ "tToken": "0x02cd18c03b5b3f250d2b29c87949cdab4ee11488",
21
+ "dToken": "0xbce07537df8ad5519c1d65e902e10aa48af83d88",
22
+ "sdToken": "0x73c177510cb7b5c6a7c770376fc6ebd29ef9e1a7",
23
+ "loanToValue": 0.8,
24
+ "liquidationThreshold": 0.85
25
+ },
26
+ "0x4200000000000000000000000000000000000006": {
27
+ "tToken": "0x9c29a8ec901dbec4fff165cd57d4f9e03d4838f7",
28
+ "dToken": "0x06d38c309d1dc541a23b0025b35d163c25754288",
29
+ "sdToken": "0x6f66c5c5e2ff94929582eabfc19051f19ed9eb70",
30
+ "loanToValue": 0.8,
31
+ "liquidationThreshold": 0.85
32
+ },
33
+ "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22": {
34
+ "tToken": "0x272cfccefbefbe1518cd87002a8f9dfd8845a6c4",
35
+ "dToken": "0x5eea43129024eee861481f32c2541b12ddd44c08",
36
+ "sdToken": "0x09ab5ca2d537b81520f78474d6ed43675451a7f8",
37
+ "loanToValue": 0.7,
38
+ "liquidationThreshold": 0.75
39
+ },
40
+ "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
41
+ "tToken": "0x58254000ee8127288387b04ce70292b56098d55c",
42
+ "dToken": "0x05249f9ba88f7d98fe21a8f3c460f4746689aea5",
43
+ "sdToken": "0xc73ac4d26025622167a2bc67c93a855c1c6bdb24",
44
+ "loanToValue": 0.865,
45
+ "liquidationThreshold": 0.9
46
+ },
47
+ "0x940181a94a35a4569e4529a3cdfb74e38fd98631": {
48
+ "tToken": "0xe3f709397e87032e61f4248f53ee5c9a9abb6440",
49
+ "dToken": "0x083e519e76fe7e68c15a6163279eaaf87e2addae",
50
+ "sdToken": "0x383995fd2e86a2e067ffb31674aa0d1b370b39bd",
51
+ "loanToValue": 0.7,
52
+ "liquidationThreshold": 0.75
53
+ },
54
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": {
55
+ "tToken": "0xc17312076f48764d6b4d263efdd5a30833e311dc",
56
+ "dToken": "0x3f332f38926b809670b3cac52df67706856a1555",
57
+ "sdToken": "0x5183adca8472b7c999c310e4d5aaab04ad12e252",
58
+ "loanToValue": 0.85,
59
+ "liquidationThreshold": 0.9
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,173 @@
1
+ IONIC_BASE = {
2
+ "name": "Ionic Protocol Lending Pool",
3
+ "rewardToken": "0x3ee5e23eee121094f1cfc0ccc79d6c809ebd22e5",
4
+ "comptrollerAddress": "0x05c9c6417f246600f8f5f49fca9ee991bff73d13",
5
+ "lensAddress": "",
6
+ "poolToken": "0x3ee5e23eee121094f1cfc0ccc79d6c809ebd22e5",
7
+ "type": "LENDING_POOL",
8
+ "forked": "compound",
9
+ "reservesList": {
10
+ "0x940181a94a35a4569e4529a3cdfb74e38fd98631": {
11
+ "cToken": "0x014e08f05ac11bb532be62774a4c548368f59779",
12
+ "exchangeRate": 0.21036280076405323,
13
+ "liquidationThreshold": 0.65,
14
+ "loanToValue": 0.65
15
+ },
16
+ "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22": {
17
+ "cToken": "0x9c201024a62466f9157b2daadda9326207addd29",
18
+ "exchangeRate": 0.2002912374078266,
19
+ "liquidationThreshold": 0.8,
20
+ "loanToValue": 0.8
21
+ },
22
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": {
23
+ "cToken": "0xa900a17a49bc4d442ba7f72c39fa2108865671f0",
24
+ "exchangeRate": 0.2144986630669136,
25
+ "liquidationThreshold": 0.9,
26
+ "loanToValue": 0.9
27
+ },
28
+ "0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452": {
29
+ "cToken": "0x9d62e30c6cb7964c99314dcf5f847e36fcb29ca9",
30
+ "exchangeRate": 0.20033943867623932,
31
+ "liquidationThreshold": 0.82,
32
+ "loanToValue": 0.82
33
+ },
34
+ "0x2416092f143378750bb29b79ed961ab195cceea5": {
35
+ "cToken": "0x079f84161642d81aafb67966123c9949f9284bf5",
36
+ "exchangeRate": 0.2,
37
+ "liquidationThreshold": 0.67,
38
+ "loanToValue": 0.67
39
+ },
40
+ "0x4200000000000000000000000000000000000006": {
41
+ "cToken": "0x49420311b518f3d0c94e897592014de53831cfa3",
42
+ "exchangeRate": 0.2056799148456863,
43
+ "liquidationThreshold": 0.82,
44
+ "loanToValue": 0.82
45
+ },
46
+ "0x04c0599ae5a44757c0af6f9ec3b93da8976c150a": {
47
+ "cToken": "0x84341b650598002d427570298564d6701733c805",
48
+ "exchangeRate": 0.2006672530564737,
49
+ "liquidationThreshold": 0.7,
50
+ "loanToValue": 0.7
51
+ },
52
+ "0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4": {
53
+ "cToken": "0x9c2a4f9c5471fd36be3bbd8437a33935107215a1",
54
+ "exchangeRate": 0.21306472879372002,
55
+ "liquidationThreshold": 0.8,
56
+ "loanToValue": 0.8
57
+ },
58
+ "0xcb327b99ff831bf8223cced12b1338ff3aa322ff": {
59
+ "cToken": "0x3d9669de9e3e98db41a1cbf6dc23446109945e3c",
60
+ "exchangeRate": 0.20548705316597352,
61
+ "liquidationThreshold": 0.7,
62
+ "loanToValue": 0.7
63
+ },
64
+ "0xab36452dbac151be02b16ca17d8919826072f64a": {
65
+ "cToken": "0xfc6b82668e10aff62f208c492fc95ef1fa9c0426",
66
+ "exchangeRate": 0.20002876280295545,
67
+ "liquidationThreshold": 0.5,
68
+ "loanToValue": 0.5
69
+ },
70
+ "0xcc7ff230365bd730ee4b352cc2492cedac49383e": {
71
+ "cToken": "0x751911bda88efcf412326abe649b7a3b28c4dede",
72
+ "exchangeRate": 0.20548693336881305,
73
+ "liquidationThreshold": 0.7,
74
+ "loanToValue": 0.7
75
+ },
76
+ "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
77
+ "cToken": "0x1de166df671ae6db4c4c98903df88e8007593748",
78
+ "exchangeRate": 0.20052653914389207,
79
+ "liquidationThreshold": 0.8,
80
+ "loanToValue": 0.8
81
+ },
82
+ "0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6": {
83
+ "cToken": "0xc462eb5587062e2f2391990b8609d2428d8cf598",
84
+ "exchangeRate": 0.20000001713976723,
85
+ "liquidationThreshold": 0.8,
86
+ "loanToValue": 0.8
87
+ },
88
+ "0x57f5e098cad7a3d1eed53991d4d66c45c9af7812": {
89
+ "cToken": "0xe30965acd0ee1ce2e0cd0acbfb3596bd6fc78a51",
90
+ "exchangeRate": 0.2044245555402895,
91
+ "liquidationThreshold": 0.82,
92
+ "loanToValue": 0.82
93
+ },
94
+ "0x7002458b1df59eccb57387bc79ffc7c29e22e6f7": {
95
+ "cToken": "0xe00b2b2ca7ac347bc7ca82fe5cff0f76222ff375",
96
+ "exchangeRate": 0.20000000381271832,
97
+ "liquidationThreshold": 0.77,
98
+ "loanToValue": 0.77
99
+ },
100
+ "0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42": {
101
+ "cToken": "0x0e5a87047f871050c0d713321deb0f008a41c495",
102
+ "exchangeRate": 0.20519084272071697,
103
+ "liquidationThreshold": 0.85,
104
+ "loanToValue": 0.85
105
+ },
106
+ "0xb79dd08ea68a908a97220c76d19a6aa9cbde4376": {
107
+ "cToken": "0x74109171033f662d5b898a7a2fcab2f1ef80c201",
108
+ "exchangeRate": 0.20677822951262323,
109
+ "liquidationThreshold": 0.85,
110
+ "loanToValue": 0.85
111
+ },
112
+ "0xd95ca61ce9aaf2143e81ef5462c0c2325172e028": {
113
+ "cToken": "0xf1bbecd6acf648540eb79588df692c6b2f0fbc09",
114
+ "exchangeRate": 0.2000000021271215,
115
+ "liquidationThreshold": 0.85,
116
+ "loanToValue": 0.85
117
+ },
118
+ "0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938": {
119
+ "cToken": "0xa4442b665d4c6dbc6ea43137b336e3089f05626c",
120
+ "exchangeRate": 0.20504935394887192,
121
+ "liquidationThreshold": 0.8,
122
+ "loanToValue": 0.8
123
+ },
124
+ "0x9b8df6e244526ab5f6e6400d331db28c8fdddb55": {
125
+ "cToken": "0xbd06905590b6e1b6ac979fc477a0aebb58d52371",
126
+ "exchangeRate": 0.20045386283137967,
127
+ "liquidationThreshold": 0.8,
128
+ "loanToValue": 0.8
129
+ },
130
+ "0xb0505e5a99abd03d94a1169e638b78edfed26ea4": {
131
+ "cToken": "0xaa255cf8e294bd7fcab21897c0791e50c99bac69",
132
+ "exchangeRate": 0.20097417256339267,
133
+ "liquidationThreshold": 0.7,
134
+ "loanToValue": 0.7
135
+ },
136
+ "0xe31ee12bdfdd0573d634124611e85338e2cbf0cf": {
137
+ "cToken": "0xf64bfd19ddcb2bb54e6f976a233d0a9400ed84ea",
138
+ "exchangeRate": 0.20280879465864812,
139
+ "liquidationThreshold": 0.7,
140
+ "loanToValue": 0.7
141
+ },
142
+ "0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979": {
143
+ "cToken": "0xd333681242f376f9005d1208ff946c3ee73ed659",
144
+ "exchangeRate": 0.2002139526862648,
145
+ "liquidationThreshold": 0.5,
146
+ "loanToValue": 0.5
147
+ },
148
+ "0xdcefd8c8fcc492630b943abcab3429f12ea9fea2": {
149
+ "cToken": "0x600d660440f15eeadbc3fc1403375e04b318f07e",
150
+ "exchangeRate": 0.21872300870735548,
151
+ "liquidationThreshold": 0.55,
152
+ "loanToValue": 0.55
153
+ },
154
+ "0x2615a94df961278dcbc41fb0a54fec5f10a693ae": {
155
+ "cToken": "0x5842c06fd18665d9e5c8d0f8fe770e635013626c",
156
+ "exchangeRate": 0.2,
157
+ "liquidationThreshold": 0.65,
158
+ "loanToValue": 0.65
159
+ },
160
+ "0x7ba6f01772924a82d9626c126347a28299e98c98": {
161
+ "cToken": "0xd3181806b89ca82cfa45d2e0807ae3c707bd752f",
162
+ "exchangeRate": 0.2,
163
+ "liquidationThreshold": 0.1,
164
+ "loanToValue": 0.1
165
+ },
166
+ "0x526728dbc96689597f85ae4cd716d4f7fccbae9d": {
167
+ "cToken": "0x5be1cb6cb3c9bfd16db43ed4f6c081fa9783dd1c",
168
+ "exchangeRate": 0.2,
169
+ "liquidationThreshold": 0.1,
170
+ "loanToValue": 0.1
171
+ }
172
+ }
173
+ }
@@ -1,11 +1,89 @@
1
1
  MOONWELL_BASE = {
2
2
  "name": "MoonWell Lending Pool",
3
- "rewardToken": "",
3
+ "rewardToken": "0xa88594d404727625a9437c3f886c7643872296ae",
4
4
  "comptrollerAddress": "0xfbb21d0380bee3312b33c4353c8936a0f13ef26c",
5
5
  "lensAddress": "",
6
6
  "poolToken": "0xa88594d404727625a9437c3f886c7643872296ae",
7
7
  "type": "LENDING_POOL",
8
8
  "forked": "compound",
9
9
  "reservesList": {
10
+ "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca": {
11
+ "cToken": "0x703843c3379b52f9ff486c9f5892218d2a065cc8",
12
+ "exchangeRate": 0.0220443085576951,
13
+ "liquidationThreshold": 0.63,
14
+ "loanToValue": 0.63
15
+ },
16
+ "0x4200000000000000000000000000000000000006": {
17
+ "cToken": "0x628ff693426583d9a7fb391e54366292f509d457",
18
+ "exchangeRate": 0.020412500672796527,
19
+ "liquidationThreshold": 0.84,
20
+ "loanToValue": 0.84
21
+ },
22
+ "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22": {
23
+ "cToken": "0x3bf93770f2d4a794c3d9ebefbaebae2a8f09a5e5",
24
+ "exchangeRate": 0.020076903623724787,
25
+ "liquidationThreshold": 0.81,
26
+ "loanToValue": 0.81
27
+ },
28
+ "0x50c5725949a6f0c72e6c4a641f24049a917db0cb": {
29
+ "cToken": "0x73b06d8d18de422e269645eace15400de7462417",
30
+ "exchangeRate": 0.02120759682210917,
31
+ "liquidationThreshold": 0.5,
32
+ "loanToValue": 0.5
33
+ },
34
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": {
35
+ "cToken": "0xedc817a28e8b93b03976fbd4a3ddbc9f7d176c22",
36
+ "exchangeRate": 0.0213067286714483,
37
+ "liquidationThreshold": 0.83,
38
+ "loanToValue": 0.83
39
+ },
40
+ "0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452": {
41
+ "cToken": "0x627fe393bc6edda28e99ae648fd6ff362514304b",
42
+ "exchangeRate": 0.020088853449824397,
43
+ "liquidationThreshold": 0.81,
44
+ "loanToValue": 0.81
45
+ },
46
+ "0xb6fe221fe9eef5aba221c348ba20a1bf5e73624c": {
47
+ "cToken": "0xcb1dacd30638ae38f2b94ea64f066045b7d45f44",
48
+ "exchangeRate": 0.020055463685541564,
49
+ "liquidationThreshold": 0.81,
50
+ "loanToValue": 0.81
51
+ },
52
+ "0x940181a94a35a4569e4529a3cdfb74e38fd98631": {
53
+ "cToken": "0x73902f619ceb9b31fd8efecf435cbdf89e369ba6",
54
+ "exchangeRate": 0.022752802072674147,
55
+ "liquidationThreshold": 0.65,
56
+ "loanToValue": 0.65
57
+ },
58
+ "0x04c0599ae5a44757c0af6f9ec3b93da8976c150a": {
59
+ "cToken": "0xb8051464c8c92209c92f3a4cd9c73746c4c3cfb3",
60
+ "exchangeRate": 0.020060424794583583,
61
+ "liquidationThreshold": 0.78,
62
+ "loanToValue": 0.78
63
+ },
64
+ "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
65
+ "cToken": "0xf877acafa28c19b96727966690b2f44d35ad5976",
66
+ "exchangeRate": 0.02003869829926124,
67
+ "liquidationThreshold": 0.81,
68
+ "loanToValue": 0.81
69
+ },
70
+ "0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42": {
71
+ "cToken": "0xb682c840b5f4fc58b20769e691a6fa1305a501a2",
72
+ "exchangeRate": 0.0205449175199046,
73
+ "liquidationThreshold": 0.83,
74
+ "loanToValue": 0.83
75
+ },
76
+ "0xedfa23602d0ec14714057867a78d01e94176bea0": {
77
+ "cToken": "0xfc41b49d064ac646015b459c522820db9472f4b5",
78
+ "exchangeRate": 0.02003102242991382,
79
+ "liquidationThreshold": 0.74,
80
+ "loanToValue": 0.74
81
+ },
82
+ "0xa88594d404727625a9437c3f886c7643872296ae": {
83
+ "cToken": "0xdc7810b47eaab250de623f0ee07764afa5f71ed1",
84
+ "exchangeRate": 0.020000014506706253,
85
+ "liquidationThreshold": 0.65,
86
+ "loanToValue": 0.65
87
+ }
10
88
  }
11
89
  }
@@ -0,0 +1,57 @@
1
+ RADIANT_BASE = {
2
+ "address": "0x30798cfe2cca822321ceed7e6085e633aabc492f",
3
+ "name": "Radiant V2 Lending Pool",
4
+ "rewardToken": ["0xd722e55c1d9d9fa0021a5215cbb904b92b3dc5d4",
5
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
6
+ "0x4200000000000000000000000000000000000006"],
7
+ "multiFeeAddress": "0xd87f8a52a91680c993ece968b281bf92505a3741",
8
+ "stakedIncentiveAddress": "",
9
+ "rewardConverter": "0xb905f3c95576baa125c56e477d119db9f9eabfb7",
10
+ "oracleAddress": "0xe373749cd9b2d379f7f6dd595e5164498b922164",
11
+ "type": "LENDING_POOL",
12
+ "forked": "aave-v2",
13
+ "reservesList": {
14
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": {
15
+ "tToken": "0xc2ddb87da8f16f1c3983fa7112419a1381919b14",
16
+ "dToken": "0x392376c337413ce2e9ad7dd5f3468ae58f323b00",
17
+ "sdToken": "0x1d8234e53dde5f2859e5ee67afe9e6782c80890f",
18
+ "loanToValue": 0.75,
19
+ "liquidationThreshold": 0.78
20
+ },
21
+ "0x4200000000000000000000000000000000000006": {
22
+ "tToken": "0x47cefa4f2170e6cba87452e9053540e05182a556",
23
+ "dToken": "0x2455485c868c94781aa25f3fe9a5f9a6771d659c",
24
+ "sdToken": "0x65675c472a5f40565b07f0947e2798c6f46caafa",
25
+ "loanToValue": 0.75,
26
+ "liquidationThreshold": 0.8
27
+ },
28
+ "0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452": {
29
+ "tToken": "0x43095e6e52a603fa571dde18a7a123ec407433fe",
30
+ "dToken": "0xb8eb4737c7da019f26a297c8020f024baa0c61d7",
31
+ "sdToken": "0x2d5c83a489880c0366695e03490cd85febdc370c",
32
+ "loanToValue": 0.67,
33
+ "liquidationThreshold": 0.75
34
+ },
35
+ "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22": {
36
+ "tToken": "0x20508ba938fedae646fcad48416bc9b6a448786e",
37
+ "dToken": "0xf349787fed9c02bb7d4928fbc2c3d51a38ed7fbb",
38
+ "sdToken": "0xfe29c44869cf1ca7b34aefa4a7204b47797340c2",
39
+ "loanToValue": 0.67,
40
+ "liquidationThreshold": 0.75
41
+ },
42
+ "0x04c0599ae5a44757c0af6f9ec3b93da8976c150a": {
43
+ "tToken": "0x223a4066bd6a30477ead12a7af52125390c735da",
44
+ "dToken": "0x73a53a1d90fc37bc6ef66e25c819976cc2ad7d22",
45
+ "sdToken": "0x89cc1618c774626ca81710c3cda8a269af972ebf",
46
+ "loanToValue": 0.725,
47
+ "liquidationThreshold": 0.75
48
+ },
49
+ "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
50
+ "tToken": "0x633ebd78e0ebe2ff2e2e169a4010b9ca4f7bcaa1",
51
+ "dToken": "0x40eb2d8e246915d768a218880cc52bc6993dc2b4",
52
+ "sdToken": "0x204d3fdef84ba08a452fbed235ecfc8431cce97f",
53
+ "loanToValue": 0.73,
54
+ "liquidationThreshold": 0.78
55
+ }
56
+ }
57
+ }