defi-state-querier 0.0.9__py3-none-any.whl → 0.1.1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/abis/lending/apeswape/__init__.py +0 -0
  3. defi_services/abis/lending/apeswape/apeswap_comptroller_abi.py +2235 -0
  4. defi_services/abis/lending/apeswape/apeswap_lens_abi.py +747 -0
  5. defi_services/abis/lending/apeswape/apswap_ctoken_abi.py +1485 -0
  6. defi_services/abis/lending/wepiggy/wepiggy_comptroller_abi.py +1684 -0
  7. defi_services/abis/lending/wepiggy/wepiggy_distribution_abi.py +959 -1041
  8. defi_services/abis/lending/wepiggy/wepiggy_lens_abi.py +1098 -0
  9. defi_services/constants/entities/lending_constant.py +3 -1
  10. defi_services/constants/entities/lending_services.py +28 -13
  11. defi_services/services/lending/apeswap_services.py +88 -0
  12. defi_services/services/lending/compound_service.py +1 -0
  13. defi_services/services/lending/{granary_v1_services.py → granary_services.py} +38 -18
  14. defi_services/services/lending/iron_bank_service.py +5 -1
  15. defi_services/services/lending/lending_info/arbitrum/granary_arbitrum.py +67 -0
  16. defi_services/services/lending/lending_info/arbitrum/wepiggy_arbitrum.py +36 -0
  17. defi_services/services/lending/lending_info/avalanche/granary_avalanche.py +55 -0
  18. defi_services/services/lending/lending_info/avalanche/iron_bank_avalanche.py +55 -0
  19. defi_services/services/lending/lending_info/bsc/apeswap_bsc.py +52 -0
  20. defi_services/services/lending/lending_info/bsc/granary_bsc.py +49 -0
  21. defi_services/services/lending/lending_info/bsc/liqee_bsc.py +85 -0
  22. defi_services/services/lending/lending_info/bsc/wepiggy_bsc.py +76 -0
  23. defi_services/services/lending/lending_info/ethereum/{granary_v1_eth.py → granary_eth.py} +1 -1
  24. defi_services/services/lending/lending_info/ethereum/iron_bank_eth.py +0 -1
  25. defi_services/services/lending/lending_info/ethereum/spark_eth.py +41 -94
  26. defi_services/services/lending/lending_info/ethereum/wepiggy_eth.py +18 -7
  27. defi_services/services/lending/lending_info/fantom/granary_ftm.py +67 -0
  28. defi_services/services/lending/lending_info/optimism/granary_optimism.py +84 -0
  29. defi_services/services/lending/lending_info/optimism/iron_bank_optimism.py +43 -0
  30. defi_services/services/lending/lending_info/optimism/wepiggy_optimism.py +40 -0
  31. defi_services/services/lending/lending_info/polygon/wepiggy_polygon.py +52 -0
  32. defi_services/services/lending/liqee_service.py +5 -3
  33. defi_services/services/lending/morpho_aave_v2_services.py +2 -2
  34. defi_services/services/lending/morpho_aave_v3_services.py +2 -2
  35. defi_services/services/lending/morpho_compound_services.py +1 -1
  36. defi_services/services/lending/spark_services.py +32 -0
  37. defi_services/services/lending/wepiggy_services.py +26 -237
  38. {defi_state_querier-0.0.9.dist-info → defi_state_querier-0.1.1.dist-info}/METADATA +1 -1
  39. {defi_state_querier-0.0.9.dist-info → defi_state_querier-0.1.1.dist-info}/RECORD +42 -21
  40. {defi_state_querier-0.0.9.dist-info → defi_state_querier-0.1.1.dist-info}/LICENSE +0 -0
  41. {defi_state_querier-0.0.9.dist-info → defi_state_querier-0.1.1.dist-info}/WHEEL +0 -0
  42. {defi_state_querier-0.0.9.dist-info → defi_state_querier-0.1.1.dist-info}/top_level.txt +0 -0
@@ -20,7 +20,9 @@ class Lending:
20
20
  morpho_compound = 'morpho-compound'
21
21
  morpho_aave_v2 = 'morpho-aave'
22
22
  morpho_aave_v3 = 'morpho-aavev3'
23
+ spark = 'spark'
24
+ ape_swap = "apeswap-lending"
23
25
  all = [strike, aave_v2, aave_v3, radiant_v2, compound, flux, onyx, granary,
24
26
  iron_bank, trava, valas, geist, cream, venus, liqee, strike, uwu, wepiggy,
25
- morpho_compound, morpho_aave_v2, morpho_aave_v3
27
+ morpho_compound, morpho_aave_v2, morpho_aave_v3, spark, ape_swap
26
28
  ]
@@ -1,10 +1,12 @@
1
1
  from defi_services.constants.chain_constant import Chain
2
2
  from defi_services.constants.entities.lending_constant import Lending
3
3
  from defi_services.services.lending.aave_v2_services import AaveV2StateService
4
- from defi_services.services.lending.granary_v1_services import GranaryV1StateService
5
- from defi_services.services.lending.morpho_aave_v2_services import MorphoAaveV2Services
6
- from defi_services.services.lending.morpho_aave_v3_services import MorphoAaveV3Services
7
- from defi_services.services.lending.morpho_compound_services import MorphoCompoundServices
4
+ from defi_services.services.lending.apeswap_services import ApeSwapStateService
5
+ from defi_services.services.lending.granary_services import GranaryStateService
6
+ from defi_services.services.lending.morpho_aave_v2_services import MorphoAaveV2StateService
7
+ from defi_services.services.lending.morpho_aave_v3_services import MorphoAaveV3StateService
8
+ from defi_services.services.lending.morpho_compound_services import MorphoCompoundStateService
9
+ from defi_services.services.lending.spark_services import SparkStateService
8
10
  from defi_services.services.lending.uwu_services import UwuStateService
9
11
  from defi_services.services.lending.aave_v3_services import AaveV3StateService
10
12
  from defi_services.services.lending.compound_service import CompoundStateService
@@ -35,16 +37,18 @@ class LendingServices:
35
37
  Lending.liqee: LiqeeStateService,
36
38
  Lending.strike: StrikeStateService,
37
39
  Lending.onyx: OnyxStateService,
38
- Lending.granary: GranaryV1StateService,
40
+ Lending.granary: GranaryStateService,
39
41
  Lending.wepiggy: WepiggyStateService,
40
- Lending.morpho_aave_v3: MorphoAaveV3Services,
41
- Lending.morpho_aave_v2: MorphoAaveV2Services,
42
- Lending.morpho_compound: MorphoCompoundServices
42
+ Lending.morpho_aave_v3: MorphoAaveV3StateService,
43
+ Lending.morpho_aave_v2: MorphoAaveV2StateService,
44
+ Lending.morpho_compound: MorphoCompoundStateService,
45
+ Lending.spark: SparkStateService
43
46
  }
44
47
  fantom = {
45
48
  Lending.trava: TravaStateService,
46
49
  Lending.geist: GeistStateService,
47
50
  Lending.aave_v3: AaveV3StateService,
51
+ Lending.granary: GranaryStateService
48
52
  }
49
53
 
50
54
  bsc = {
@@ -52,26 +56,37 @@ class LendingServices:
52
56
  Lending.valas: ValasStateService,
53
57
  Lending.cream: CreamStateService,
54
58
  Lending.venus: VenusStateService,
55
- Lending.radiant_v2: RadiantStateService
59
+ Lending.radiant_v2: RadiantStateService,
60
+ Lending.liqee: LiqeeStateService,
61
+ Lending.wepiggy: WepiggyStateService,
62
+ Lending.granary: GranaryStateService,
63
+ Lending.ape_swap: ApeSwapStateService
56
64
  }
57
65
 
58
66
  avalanche = {
59
67
  Lending.aave_v3: AaveV3StateService,
60
- Lending.aave_v2: AaveV2StateService
68
+ Lending.aave_v2: AaveV2StateService,
69
+ Lending.granary: GranaryStateService
61
70
  }
62
71
 
63
72
  polygon = {
64
73
  Lending.aave_v2: AaveV2StateService,
65
- Lending.aave_v3: AaveV3StateService
74
+ Lending.aave_v3: AaveV3StateService,
75
+ Lending.wepiggy: WepiggyStateService
66
76
  }
67
77
 
68
78
  optimism = {
69
- Lending.aave_v3: AaveV3StateService
79
+ Lending.aave_v3: AaveV3StateService,
80
+ Lending.granary: GranaryStateService,
81
+ Lending.wepiggy: WepiggyStateService,
82
+ Lending.iron_bank: IronBankStateService
70
83
  }
71
84
 
72
85
  arbitrum = {
73
86
  Lending.radiant_v2: RadiantStateService,
74
- Lending.aave_v3: AaveV3StateService
87
+ Lending.aave_v3: AaveV3StateService,
88
+ Lending.wepiggy: WepiggyStateService,
89
+ Lending.granary: GranaryStateService
75
90
  }
76
91
  # mapping
77
92
  mapping = {
@@ -0,0 +1,88 @@
1
+ import logging
2
+
3
+ from web3 import Web3
4
+
5
+ from defi_services.abis.lending.apeswape.apeswap_comptroller_abi import APESWAP_COMPTROLLER_ABI
6
+ from defi_services.abis.lending.apeswape.apeswap_lens_abi import APESWAP_LENS_ABI
7
+ from defi_services.abis.lending.apeswape.apswap_ctoken_abi import APESWAP_CTOKEN_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 ContractAddresses
11
+ from defi_services.jobs.queriers.state_querier import StateQuerier
12
+ from defi_services.services.lending.compound_service import CompoundStateService
13
+ from defi_services.services.lending.lending_info.bsc.apeswap_bsc import APESWAP_BSC
14
+
15
+ logger = logging.getLogger("Compound Lending Pool State Service")
16
+
17
+
18
+ class ApeSwapInfo:
19
+ mapping = {
20
+ Chain.bsc: APESWAP_BSC
21
+ }
22
+
23
+
24
+ class ApeSwapStateService(CompoundStateService):
25
+ def __init__(self, state_service: StateQuerier, chain_id: str = "0x38"):
26
+ super().__init__(state_service, chain_id)
27
+ self.comptroller_abi = APESWAP_COMPTROLLER_ABI
28
+ self.lens_abi = APESWAP_LENS_ABI
29
+ self.name = f"{self.chain_id}_{Lending.ape_swap}"
30
+ self.pool_info = ApeSwapInfo.mapping.get(chain_id)
31
+
32
+ def get_service_info(self):
33
+ info = {
34
+ Lending.ape_swap: {
35
+ "chain_id": self.chain_id,
36
+ "type": "lending",
37
+ "protocol_info": self.pool_info
38
+ }
39
+ }
40
+ return info
41
+
42
+ def get_dapp_asset_info(
43
+ self,
44
+ block_number: int = "latest"):
45
+ _w3 = self.state_service.get_w3()
46
+ comptroller_contract = _w3.eth.contract(
47
+ address=_w3.toChecksumAddress(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
+ if token in [ContractAddresses.LUNA.lower(), ContractAddresses.UST.lower(), ContractAddresses.LUNA,
51
+ ContractAddresses.UST]:
52
+ continue
53
+ ctokens.append(token)
54
+
55
+ lens_contract = _w3.eth.contract(
56
+ address=Web3.toChecksumAddress(self.pool_info.get("lensAddress")), abi=self.lens_abi
57
+ )
58
+ tokens = [Web3.toChecksumAddress(i) for i in ctokens]
59
+ metadata = lens_contract.functions.cTokenMetadataAll(tokens).call(block_identifier=block_number)
60
+ reserves_info = {}
61
+ for data in metadata:
62
+ underlying = data[13].lower()
63
+ ctoken = data[0].lower()
64
+ lt = data[10] / 10 ** 18
65
+ reserves_info[underlying] = {
66
+ "cToken": ctoken,
67
+ "liquidationThreshold": lt
68
+ }
69
+
70
+ return reserves_info
71
+
72
+ # REWARDS BALANCE
73
+ def get_claimable_rewards_balance_function_info(
74
+ self,
75
+ wallet_address: str,
76
+ block_number: int = "latest",
77
+ ):
78
+ return {}
79
+
80
+ def calculate_claimable_rewards_balance(self, wallet_address: str, decoded_data: dict,
81
+ block_number: int = "latest"):
82
+ return {}
83
+
84
+ def get_ctoken_function_info(self, ctoken: str, fn_name: str, fn_paras: list, block_number: int = "latest"):
85
+ return self.state_service.get_function_info(
86
+ ctoken, APESWAP_CTOKEN_ABI, fn_name, fn_paras, block_number
87
+ )
88
+
@@ -83,6 +83,7 @@ class CompoundStateService(ProtocolServices):
83
83
  tokens.append(Token.wrapped_token.get(self.chain_id))
84
84
  continue
85
85
  tokens.append(token)
86
+
86
87
  logger.info(f"Get token list related in {time.time() - begin}s")
87
88
  return tokens
88
89
 
@@ -12,7 +12,12 @@ from defi_services.constants.entities.lending_constant import Lending
12
12
  from defi_services.constants.query_constant import Query
13
13
  from defi_services.constants.token_constant import Token
14
14
  from defi_services.jobs.queriers.state_querier import StateQuerier
15
- from defi_services.services.lending.lending_info.ethereum.granary_v1_eth import GRANARY_V1_ETH
15
+ from defi_services.services.lending.lending_info.arbitrum.granary_arbitrum import GRANARY_ARBITRUM
16
+ from defi_services.services.lending.lending_info.avalanche.granary_avalanche import GRANARY_AVALANCHE
17
+ from defi_services.services.lending.lending_info.bsc.granary_bsc import GRANARY_BSC
18
+ from defi_services.services.lending.lending_info.ethereum.granary_eth import GRANARY_V1_ETH
19
+ from defi_services.services.lending.lending_info.fantom.granary_ftm import GRANARY_FTM
20
+ from defi_services.services.lending.lending_info.optimism.granary_optimism import GRANARY_OPTIMISM
16
21
  from defi_services.services.protocol_services import ProtocolServices
17
22
 
18
23
  logger = logging.getLogger("Granary V1 Lending Pool State Service")
@@ -21,10 +26,15 @@ logger = logging.getLogger("Granary V1 Lending Pool State Service")
21
26
  class GranaryV1Info:
22
27
  mapping = {
23
28
  Chain.ethereum: GRANARY_V1_ETH,
29
+ Chain.bsc: GRANARY_BSC,
30
+ Chain.optimism: GRANARY_OPTIMISM,
31
+ Chain.fantom: GRANARY_FTM,
32
+ Chain.avalanche: GRANARY_AVALANCHE,
33
+ Chain.arbitrum: GRANARY_ARBITRUM
24
34
  }
25
35
 
26
36
 
27
- class GranaryV1StateService(ProtocolServices):
37
+ class GranaryStateService(ProtocolServices):
28
38
  def __init__(self, state_service: StateQuerier, chain_id: str = "0x1"):
29
39
  self.name = f"{chain_id}_{Lending.granary}"
30
40
  self.chain_id = chain_id
@@ -67,7 +77,7 @@ class GranaryV1StateService(ProtocolServices):
67
77
 
68
78
  def get_token_list(self):
69
79
  begin = time.time()
70
- tokens = [self.pool_info.get('rewardToken'), self.pool_info.get("poolToken")]
80
+ tokens = self.pool_info.get('rewardToken') + [self.pool_info.get("poolToken")]
71
81
  for token in self.pool_info.get("reservesList"):
72
82
  if token == Token.native_token:
73
83
  tokens.append(Token.wrapped_token.get(self.chain_id))
@@ -87,7 +97,6 @@ class GranaryV1StateService(ProtocolServices):
87
97
  begin = time.time()
88
98
  reserves_info = kwargs.get("reserves_info", self.pool_info.get("reservesList"))
89
99
  token_prices = kwargs.get("token_prices", {})
90
- pool_token_price = token_prices.get(self.pool_info.get('poolToken'), 1)
91
100
  wrapped_native_token_price = token_prices.get(Token.wrapped_token.get(self.chain_id), 1)
92
101
  pool_decimals = kwargs.get("pool_decimals", 18)
93
102
  result = {}
@@ -238,26 +247,37 @@ class GranaryV1StateService(ProtocolServices):
238
247
  reserves_info: dict = None,
239
248
  block_number: int = "latest"
240
249
  ):
250
+ reward_tokens = self.pool_info.get("rewardToken")
251
+ if not reward_tokens:
252
+ return {}
241
253
  rpc_calls = {}
242
- tokens = []
243
- for token, value in reserves_info.items():
244
- atoken, debt_token = Web3.toChecksumAddress(value['tToken']), Web3.toChecksumAddress(value['dToken'])
245
- tokens += [atoken, debt_token]
246
- key = f"getAllUserRewardsBalance_{self.name}_{wallet_address}_{block_number}".lower()
247
- rpc_calls[key] = self.get_function_rewarder_info(
248
- "getAllUserRewardsBalance", [tokens, wallet_address], block_number)
254
+ for token in reward_tokens:
255
+ decimals_key = f"decimals_{token}_{block_number}".lower()
256
+ key = f"getUserUnclaimedRewardsFromStorage_{self.name}_{wallet_address}_{token}_{block_number}".lower()
257
+ rpc_calls[key] = self.get_function_rewarder_info(
258
+ "getUserUnclaimedRewardsFromStorage", [wallet_address, token], block_number)
259
+ rpc_calls[decimals_key] = self.state_service.get_function_info(
260
+ token, ERC20_ABI, "decimals", [], block_number
261
+ )
249
262
 
250
263
  return rpc_calls
251
264
 
252
265
  def calculate_all_rewards_balance(
253
266
  self, decoded_data: dict, wallet_address: str, block_number: int = "latest"):
254
-
255
- key = f"getAllUserRewardsBalance_{self.name}_{wallet_address}_{block_number}".lower()
256
- reward_token = decoded_data.get(key)[0][0]
257
- rewards = decoded_data.get(key)[-1][0] / 10 ** 18
258
- result = {
259
- reward_token.lower(): {"amount": rewards}
260
- }
267
+ reward_tokens = self.pool_info.get("rewardToken")
268
+ if not reward_tokens:
269
+ return {}
270
+ result = {}
271
+ for token in reward_tokens:
272
+ decimals_key = f"decimals_{token}_{block_number}".lower()
273
+ key = f"getUserUnclaimedRewardsFromStorage_{self.name}_{wallet_address}_{token}_{block_number}".lower()
274
+ if decoded_data.get(key) is None:
275
+ continue
276
+ decimals = decoded_data.get(decimals_key)
277
+ rewards = decoded_data.get(key) / 10 ** decimals
278
+ result.update({
279
+ token.lower(): {"amount": rewards}
280
+ })
261
281
 
262
282
  return result
263
283
 
@@ -12,7 +12,9 @@ from defi_services.constants.entities.lending_constant import Lending
12
12
  from defi_services.constants.query_constant import Query
13
13
  from defi_services.constants.token_constant import ContractAddresses, Token
14
14
  from defi_services.jobs.queriers.state_querier import StateQuerier
15
+ from defi_services.services.lending.lending_info.avalanche.iron_bank_avalanche import IRON_BANK_AVALANCHE
15
16
  from defi_services.services.lending.lending_info.ethereum.iron_bank_eth import IRON_BANK_ETH
17
+ from defi_services.services.lending.lending_info.optimism.iron_bank_optimism import IRON_BANK_OPTIMISM
16
18
  from defi_services.services.protocol_services import ProtocolServices
17
19
 
18
20
  logger = logging.getLogger("Iron Bank Lending Pool State Service")
@@ -20,7 +22,9 @@ logger = logging.getLogger("Iron Bank Lending Pool State Service")
20
22
 
21
23
  class IronBankInfo:
22
24
  mapping = {
23
- Chain.ethereum: IRON_BANK_ETH
25
+ Chain.ethereum: IRON_BANK_ETH,
26
+ Chain.optimism: IRON_BANK_OPTIMISM,
27
+ Chain.avalanche: IRON_BANK_AVALANCHE
24
28
  }
25
29
 
26
30
 
@@ -0,0 +1,67 @@
1
+ GRANARY_ARBITRUM = {
2
+ "address": "0x102442a3ba1e441043154bc0b8a2e2fb5e0f94a7",
3
+ "name": "Granary Lending Pool",
4
+ "rewardToken": ["0x80bb30d62a16e1f2084deae84dc293531c3ac3a1", "0xa1150db5105987cec5fd092273d1e3cbb22b378b"],
5
+ "rewarder": '0x7a191973eaf8cdcc4de683d10c1e11c5a5bc717d',
6
+ "stakedIncentiveAddress": "",
7
+ "poolToken": "0x80bb30d62a16e1f2084deae84dc293531c3ac3a1",
8
+ "oracleAddress": "0xe12e084fc4550387cb2b252b5f289ba38b755354",
9
+ "type": "LENDING_POOL",
10
+ "forked": "aave-v3",
11
+ "reservesList": {
12
+ "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1": {
13
+ "tToken": "0xfc2eac1aeb490d5ff727e659273c8afc5dd2b0bb",
14
+ "dToken": "0xfdf4ee30ceff9a6253d4eb43257abc361433bf04",
15
+ "sdToken": "0x75803d39db1f2d3c84fd1b3ad74d5070283c0e39",
16
+ "liquidationThreshold": 0.85
17
+ },
18
+ "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8": {
19
+ "tToken": "0x6c4cb1115927d50e495e554d38b83f2973f05361",
20
+ "dToken": "0xe2b1674f85c8a1729567f38cb502088c6e147938",
21
+ "sdToken": "0x3fc33103748cb94495be26a35c6b77b2d7a71a61",
22
+ "liquidationThreshold": 0.85
23
+ },
24
+ "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9": {
25
+ "tToken": "0x66ddd8f3a0c4ceb6a324376ea6c00b4c8c1bb3d9",
26
+ "dToken": "0x3e2deeda33d8ba579430f38868db3ed0e2394576",
27
+ "sdToken": "0x03adcec5d760e50a2bed982cb5e6a6ab2580d55e",
28
+ "liquidationThreshold": 0.85
29
+ },
30
+ "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f": {
31
+ "tToken": "0x731e2246a0c67b1b19188c7019094ba9f107404f",
32
+ "dToken": "0x8daec4344a99f575b13de9f16c53d5bf65e75a42",
33
+ "sdToken": "0x01c4dd26296e7a13418d0dc6822591810da8b989",
34
+ "liquidationThreshold": 0.85
35
+ },
36
+ "0x82af49447d8a07e3bd95bd0d56f35241523fbab1": {
37
+ "tToken": "0x712f1955e5ed3f7a5ac7b5e4c480db8edf9b3fd7",
38
+ "dToken": "0xc5e029c1097d9585629ae4bdf74c37182ec8d1ba",
39
+ "sdToken": "0xc39b18f5e6f3338b787d10bb6c37058d29c1da79",
40
+ "liquidationThreshold": 0.85
41
+ },
42
+ "0x912ce59144191c1204e64559fe8253a0e49e6548": {
43
+ "tToken": "0x8b9a4ded05ad8c3ab959980538437b0562dbb129",
44
+ "dToken": "0x5935530b52332d1030d98c1ce06f2943e06b75ad",
45
+ "sdToken": "0xa05934acb42768343035bce74f72bfd6d2f61010",
46
+ "liquidationThreshold": 0.7
47
+ },
48
+ "0xaf88d065e77c8cc2239327c5edb3a432268e5831": {
49
+ "tToken": "0x2af47e1786c1af2debee2dede590a0d00005129b",
50
+ "dToken": "0x86547cb041c7a98576da7fa87acd6eac66c51e0c",
51
+ "sdToken": "0x9e14e90c3912731531d8ee5b397526e3b2807452",
52
+ "liquidationThreshold": 0.85
53
+ },
54
+ "0x5979d7b546e38e414f7e9822514be443a4800529": {
55
+ "tToken": "0x93e5e80029b36e5e5e75311cf50ebc60995f9ea6",
56
+ "dToken": "0x5d13ffbc005a2bdd16f3c50e527d42c387759299",
57
+ "sdToken": "0x73b4cdf788ac8bf0b0104966cdae4dc482fc3800",
58
+ "liquidationThreshold": 0.75
59
+ },
60
+ "0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8": {
61
+ "tToken": "0x883b786504a2c6bfa2c9e578e5d1752ecbc24dee",
62
+ "dToken": "0x458d60c27b433a157462c7959e2a103389de3fce",
63
+ "sdToken": "0xe0b08f55697fea5272604fc002b96b8379298f1a",
64
+ "liquidationThreshold": 0.75
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,36 @@
1
+ WEPIGGY_ARB = {
2
+ "name": "Wepiggy Lending Pool",
3
+ "rewardToken": "0x6f620ec89b8479e97a6985792d0c64f237566746",
4
+ "comptrollerAddress": "0xaa87715e858b482931eb2f6f92e504571588390b",
5
+ "lensAddress": "0xf4b6d5d432f1c7a9efc9e0b04acde479f9fd1f72",
6
+ "distributionAddress": "0x77401ff895bde043d40aae58f98de5698682c12a",
7
+ "poolToken": "0x6f620ec89b8479e97a6985792d0c64f237566746",
8
+ "type": "LENDING_POOL",
9
+ "forked": "compound",
10
+ "reservesList": {
11
+ "0x0000000000000000000000000000000000000000": {
12
+ "cToken": "0x17933112e9780abd0f27f2b7d9dda9e840d43159",
13
+ "liquidationThreshold": 0.8
14
+ },
15
+ "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f": {
16
+ "cToken": "0x3393cd223f59f32cc0cc845de938472595ca48a1",
17
+ "liquidationThreshold": 0.8
18
+ },
19
+ "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8": {
20
+ "cToken": "0x2bf852e22c92fd790f4ae54a76536c8c4217786b",
21
+ "liquidationThreshold": 0.9
22
+ },
23
+ "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9": {
24
+ "cToken": "0xb65ab7e1c6c1ba202baed82d6fb71975d56f007c",
25
+ "liquidationThreshold": 0.9
26
+ },
27
+ "0xf97f4df75117a78c1a5a0dbb814af92458539fb4": {
28
+ "cToken": "0x8f87c9c6efe9ca6997d6fec8bc930c1fed90ccc7",
29
+ "liquidationThreshold": 0.6
30
+ },
31
+ "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1": {
32
+ "cToken": "0xde39adfb2025d2aa51f6fd967e7c1753215f1905",
33
+ "liquidationThreshold": 0.9
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,55 @@
1
+ GRANARY_AVALANCHE = {
2
+ "address": "0xb702ce183b4e1faa574834715e5d4a6378d0eed3",
3
+ "name": "Granary Lending Pool",
4
+ "rewardToken": [],
5
+ "rewarder": '0xdde5dc81e40799750b92079723da2acaf9e1c6d6',
6
+ "stakedIncentiveAddress": "",
7
+ "poolToken": "0x80bb30d62a16e1f2084deae84dc293531c3ac3a1",
8
+ "oracleAddress": "0x5a3423210536d930150080f699248edebc65e2b4",
9
+ "type": "LENDING_POOL",
10
+ "forked": "aave-v3",
11
+ "reservesList": {
12
+ "0xd586e7f844cea2f87f50152665bcbc2c279d8d70": {
13
+ "tToken": "0xe7334ad0e325139329e747cf2fc24538dd564987",
14
+ "dToken": "0xe5415fa763489c813694d7a79d133f0a7363310c",
15
+ "sdToken": "0xc40709470139657e6d80249c5cc998efb44898c9",
16
+ "liquidationThreshold": 0.85
17
+ },
18
+ "0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664": {
19
+ "tToken": "0x02cd18c03b5b3f250d2b29c87949cdab4ee11488",
20
+ "dToken": "0xbce07537df8ad5519c1d65e902e10aa48af83d88",
21
+ "sdToken": "0x73c177510cb7b5c6a7c770376fc6ebd29ef9e1a7",
22
+ "liquidationThreshold": 0.85
23
+ },
24
+ "0xc7198437980c041c805a1edcba50c1ce5db95118": {
25
+ "tToken": "0x9c29a8ec901dbec4fff165cd57d4f9e03d4838f7",
26
+ "dToken": "0x06d38c309d1dc541a23b0025b35d163c25754288",
27
+ "sdToken": "0x6f66c5c5e2ff94929582eabfc19051f19ed9eb70",
28
+ "liquidationThreshold": 0.85
29
+ },
30
+ "0x50b7545627a5162f82a992c33b87adc75187b218": {
31
+ "tToken": "0x272cfccefbefbe1518cd87002a8f9dfd8845a6c4",
32
+ "dToken": "0x5eea43129024eee861481f32c2541b12ddd44c08",
33
+ "sdToken": "0x09ab5ca2d537b81520f78474d6ed43675451a7f8",
34
+ "liquidationThreshold": 0.85
35
+ },
36
+ "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab": {
37
+ "tToken": "0x58254000ee8127288387b04ce70292b56098d55c",
38
+ "dToken": "0x05249f9ba88f7d98fe21a8f3c460f4746689aea5",
39
+ "sdToken": "0xc73ac4d26025622167a2bc67c93a855c1c6bdb24",
40
+ "liquidationThreshold": 0.85
41
+ },
42
+ "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7": {
43
+ "tToken": "0xe3f709397e87032e61f4248f53ee5c9a9abb6440",
44
+ "dToken": "0x083e519e76fe7e68c15a6163279eaaf87e2addae",
45
+ "sdToken": "0x383995fd2e86a2e067ffb31674aa0d1b370b39bd",
46
+ "liquidationThreshold": 0.85
47
+ },
48
+ "0xd1c3f94de7e5b45fa4edbba472491a9f4b166fc4": {
49
+ "tToken": "0xc17312076f48764d6b4d263efdd5a30833e311dc",
50
+ "dToken": "0x3f332f38926b809670b3cac52df67706856a1555",
51
+ "sdToken": "0x5183adca8472b7c999c310e4d5aaab04ad12e252",
52
+ "liquidationThreshold": 0.7
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,55 @@
1
+ IRON_BANK_AVALANCHE = {
2
+ "name": "Iron Bank Lending Pool",
3
+ "rewardToken": "0x00a35fd824c717879bf370e70ac6868b95870dfb",
4
+ "comptrollerAddress": "0x2ee80614ccbc5e28654324a66a396458fa5cd7cc",
5
+ "lensAddress": "0x5b4058a9000e86fe136ac896352c4dfd539e32a1",
6
+ "poolToken": "0x00a35fd824c717879bf370e70ac6868b95870dfb",
7
+ "type": "LENDING_POOL",
8
+ "forked": "compound",
9
+ "reservesList": {
10
+ "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7": {
11
+ "cToken": "0xb3c68d69e95b095ab4b33b4cb67dbc0fbf3edf56",
12
+ "liquidationThreshold": 0.75
13
+ },
14
+ "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab": {
15
+ "cToken": "0x338eee1f7b89ce6272f302bdc4b952c13b221f1d",
16
+ "liquidationThreshold": 0.75
17
+ },
18
+ "0xc7198437980c041c805a1edcba50c1ce5db95118": {
19
+ "cToken": "0xceb1ce674f38398432d20bc8f90345e91ef46fd3",
20
+ "liquidationThreshold": 0.75
21
+ },
22
+ "0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664": {
23
+ "cToken": "0xe28965073c49a02923882b8329d3e8c1d805e832",
24
+ "liquidationThreshold": 0.75
25
+ },
26
+ "0xd586e7f844cea2f87f50152665bcbc2c279d8d70": {
27
+ "cToken": "0x085682716f61a72bf8c573fbaf88cca68c60e99b",
28
+ "liquidationThreshold": 0.75
29
+ },
30
+ "0x50b7545627a5162f82a992c33b87adc75187b218": {
31
+ "cToken": "0xb09b75916c5f4097c8b5812e63e216fef97661fc",
32
+ "liquidationThreshold": 0.75
33
+ },
34
+ "0x5947bb275c521040051d82396192181b413227a3": {
35
+ "cToken": "0x18931772adb90e7f214b6cbc78ddd6e0f090d4b1",
36
+ "liquidationThreshold": 0.45
37
+ },
38
+ "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": {
39
+ "cToken": "0xec5aa19566aa442c8c50f3c6734b6bb23ff21cd7",
40
+ "liquidationThreshold": 0.75
41
+ },
42
+ "0x130966628846bfd36ff31a822705796e8cb8c18d": {
43
+ "cToken": "0xbf1430d9ec170b7e97223c7f321782471c587b29",
44
+ "liquidationThreshold": 0.0
45
+ },
46
+ "0x2147efff675e4a4ee1c2f918d181cdbd7a8e208f": {
47
+ "cToken": "0x02c9133627a14214879175a7a222d0a7f7404efb",
48
+ "liquidationThreshold": 0.0
49
+ },
50
+ "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7": {
51
+ "cToken": "0x3af7c11d112c1c730e5cee339ca5b48f9309acbc",
52
+ "liquidationThreshold": 0.0
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,52 @@
1
+ APESWAP_BSC = {
2
+ "name": "Compound Lending Pool",
3
+ "rewardToken": "",
4
+ "comptrollerAddress": "0xad48b2c9dc6709a560018c678e918253a65df86e",
5
+ "lensAddress": "0x183019dc7a8f8f1456df735862761cccf2e23009",
6
+ "poolToken": "0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95",
7
+ "type": "LENDING_POOL",
8
+ "forked": "compound",
9
+ "reservesList": {
10
+ "0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95": {
11
+ "cToken": "0xc2e840bdd02b4a1d970c87a912d8576a7e61d314",
12
+ "liquidationThreshold": 0.4
13
+ },
14
+ "0x2170ed0880ac9a755fd29b2688956bd959f933f8": {
15
+ "cToken": "0xaa1b1e1f251610ae10e4d553b05c662e60992eed",
16
+ "liquidationThreshold": 0.7
17
+ },
18
+ "0xe9e7cea3dedca5984780bafc599bd69add087d56": {
19
+ "cToken": "0x0096b6b49d13b347033438c4a699df3afd9d2f96",
20
+ "liquidationThreshold": 0.7
21
+ },
22
+ "0x55d398326f99059ff775485246999027b3197955": {
23
+ "cToken": "0xdbfd516d42743ca3f1c555311f7846095d85f6fd",
24
+ "liquidationThreshold": 0.7
25
+ },
26
+ "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82": {
27
+ "cToken": "0x3353f5bcfd7e4b146f2ed8f1e8d875733cd754a7",
28
+ "liquidationThreshold": 0.4
29
+ },
30
+ "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d": {
31
+ "cToken": "0x91b66a9ef4f4cad7f8af942855c37dd53520f151",
32
+ "liquidationThreshold": 0.7
33
+ },
34
+ "0x0000000000000000000000000000000000000000": {
35
+ "cToken": "0x34878f6a484005aa90e7188a546ea9e52b538f6f",
36
+ "liquidationThreshold": 0.7
37
+ },
38
+ "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c": {
39
+ "cToken": "0x5fce5d208dc325ff602c77497dc18f8eadac8ada",
40
+ "liquidationThreshold": 0.7
41
+ },
42
+ "0x7083609fce4d1d8dc0c979aab8c869ea2c873402": {
43
+ "cToken": "0x92d106c39ac068eb113b3ecb3273b23cd19e6e26",
44
+ "liquidationThreshold": 0.5
45
+ },
46
+ "0x1bdd3cf7f79cfb8edbb955f20ad99211551ba275": {
47
+ "cToken": "0x3ee2bd8c244b5b3656673c2a49447e41d31f8e1e",
48
+ "liquidationThreshold": 0.6
49
+ }
50
+ }
51
+
52
+ }
@@ -0,0 +1,49 @@
1
+ GRANARY_BSC = {
2
+ "address": "0x7171054f8d148fe1097948923c91a6596fc29032",
3
+ "name": "Granary Lending Pool",
4
+ "rewardToken": [],
5
+ "rewarder": '0xc043ba54f34c9fb3a0b45d22e2ef1f171272bc9d',
6
+ "stakedIncentiveAddress": "",
7
+ "poolToken": "0x8f87a7d376821c7b2658a005aaf190ec778bf37a",
8
+ "oracleAddress": "0x417ca1091fa4c329cee19452851dff46902440a5",
9
+ "type": "LENDING_POOL",
10
+ "forked": "aave-v3",
11
+ "reservesList": {
12
+ "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3": {
13
+ "tToken": "0x6055558d88dde78df51bf9e90bdd225d525cf80b",
14
+ "dToken": "0xa0758cd24cf68f486f3f6d96e833680d4971ccf8",
15
+ "sdToken": "0x6f4fde7277e70483c344e3175b1262928fb52bae",
16
+ "liquidationThreshold": 0.85
17
+ },
18
+ "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d": {
19
+ "tToken": "0xe37bbfdd50b715d49df6e596f9248bfe6b967cd7",
20
+ "dToken": "0x2f4e44316af0cac2154f95acca305082a2382e98",
21
+ "sdToken": "0xe56873b4886e4c08a07498a90d6cdb2f0069c4b3",
22
+ "liquidationThreshold": 0.85
23
+ },
24
+ "0x55d398326f99059ff775485246999027b3197955": {
25
+ "tToken": "0x7e25119b5e52c32970161f1e0da3e66bbef100f1",
26
+ "dToken": "0x573bce236692b48f5faa07947e78c1e282e16c28",
27
+ "sdToken": "0xaf8ed214adf8358d296a3135bfef8167594d181d",
28
+ "liquidationThreshold": 0.85
29
+ },
30
+ "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c": {
31
+ "tToken": "0x6c578574a5400c5e45f18be65227cfc2a64d94f7",
32
+ "dToken": "0x7f459f3c6d068168ef791746602ca29180b5d03f",
33
+ "sdToken": "0x60516165bcee35870499acd040ba8b586f280959",
34
+ "liquidationThreshold": 0.85
35
+ },
36
+ "0x2170ed0880ac9a755fd29b2688956bd959f933f8": {
37
+ "tToken": "0x2a050a0d74c9a12ba44bd2aca9d7d7d1bdf988e9",
38
+ "dToken": "0xa7ede8701d7dac898b04ddf27c781b4eb961443f",
39
+ "sdToken": "0x64f719b2a1668835337fff491e7c88402093fbb4",
40
+ "liquidationThreshold": 0.85
41
+ },
42
+ "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c": {
43
+ "tToken": "0x70ad5e32e6ea548dce7d331b447c2791cf695a98",
44
+ "dToken": "0x839c8ca0873de853c5f8df1ef3e82e9da398abf6",
45
+ "sdToken": "0x24f515b64f1d5dc8d702daa4e0ce0ef9fcdce589",
46
+ "liquidationThreshold": 0.85
47
+ }
48
+ }
49
+ }