defi-state-querier 0.5.26__py3-none-any.whl → 0.5.28__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 (83) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/constants/chain_constant.py +1 -8
  3. defi_services/constants/entities/dex_info_constant.py +2 -2
  4. defi_services/constants/entities/dex_services.py +1 -13
  5. defi_services/constants/entities/lending_constant.py +5 -11
  6. defi_services/constants/entities/lending_services.py +4 -31
  7. defi_services/constants/entities/vault_constant.py +2 -2
  8. defi_services/constants/entities/vault_services.py +1 -7
  9. defi_services/constants/network_constants.py +361 -20
  10. defi_services/constants/token_constant.py +1 -3
  11. defi_services/jobs/processors/cosmos_state_processor.py +2 -3
  12. defi_services/jobs/processors/ton_state_processor.py +4 -5
  13. defi_services/jobs/queriers/call_state_querier.py +0 -2
  14. defi_services/jobs/queriers/state_querier.py +0 -3
  15. defi_services/services/dex/dex_info/uniswap_info.py +1 -29
  16. defi_services/services/dex/uniswap_v3_service.py +2 -6
  17. defi_services/services/lending/aave_v2_services.py +29 -44
  18. defi_services/services/lending/aave_v3_services.py +20 -41
  19. defi_services/services/lending/compound_v3_services.py +3 -7
  20. defi_services/services/lending/granary_services.py +4 -6
  21. defi_services/services/lending/justlend_service.py +3 -4
  22. defi_services/services/lending/lending_info/arbitrum/aave_v3_arbitrum.py +1 -1
  23. defi_services/services/lending/lending_info/arbitrum/compound_v3_arbitrum.py +6 -96
  24. defi_services/services/lending/lending_info/ethereum/aave_v3_eth.py +140 -1
  25. defi_services/services/lending/lending_info/ethereum/compound_v3_eth.py +5 -180
  26. defi_services/services/lending/lending_info/polygon/compound_v3_polygon.py +5 -35
  27. defi_services/services/lending/morpho_aave_v2_services.py +3 -3
  28. defi_services/services/lending/morpho_aave_v3_services.py +2 -2
  29. defi_services/services/lending/radiant_v2_services.py +10 -52
  30. defi_services/services/lending/trava_services.py +2 -2
  31. defi_services/services/lending/uwu_services.py +3 -3
  32. defi_services/services/lending/valas_services.py +2 -2
  33. defi_services/services/lending/venus_services.py +3 -9
  34. defi_services/services/multicall/multicall_v2.py +317 -0
  35. {defi_state_querier-0.5.26.dist-info → defi_state_querier-0.5.28.dist-info}/METADATA +3 -2
  36. {defi_state_querier-0.5.26.dist-info → defi_state_querier-0.5.28.dist-info}/RECORD +46 -83
  37. {defi_state_querier-0.5.26.dist-info → defi_state_querier-0.5.28.dist-info}/WHEEL +1 -1
  38. defi_services/abis/lending/ionic/__init__.py +0 -0
  39. defi_services/abis/lending/ionic/ionic_ctoken_abi.py +0 -1108
  40. defi_services/abis/lending/moonwell/__init__.py +0 -0
  41. defi_services/abis/lending/moonwell/moonwell_comptroller_abi.py +0 -1500
  42. defi_services/abis/lending/moonwell/moonwell_ctoken_abi.py +0 -1431
  43. defi_services/abis/lending/radiant_v2/radiant_reward_converter.py +0 -817
  44. defi_services/abis/token/trc20_abi.py +0 -304
  45. defi_services/abis/vault/tcv_abi.py +0 -1523
  46. defi_services/jobs/tcv.py +0 -144
  47. defi_services/services/lending/ionic_service.py +0 -167
  48. defi_services/services/lending/lending_info/arbitrum/venus_arbitrum.py +0 -10
  49. defi_services/services/lending/lending_info/base/__init__.py +0 -0
  50. defi_services/services/lending/lending_info/base/aave_v3_base.py +0 -61
  51. defi_services/services/lending/lending_info/base/compound_v3_base.py +0 -116
  52. defi_services/services/lending/lending_info/base/granary_base.py +0 -62
  53. defi_services/services/lending/lending_info/base/ionic_base.py +0 -173
  54. defi_services/services/lending/lending_info/base/moonwell_base.py +0 -89
  55. defi_services/services/lending/lending_info/base/radiant_v2_base.py +0 -57
  56. defi_services/services/lending/lending_info/base/sonne_base.py +0 -53
  57. defi_services/services/lending/lending_info/base/zerolend_base.py +0 -109
  58. defi_services/services/lending/lending_info/bsc/aave_v3_bsc.py +0 -68
  59. defi_services/services/lending/lending_info/ethereum/old_aave_v3_eth.py +0 -150
  60. defi_services/services/lending/lending_info/ethereum/radiant_eth.py +0 -69
  61. defi_services/services/lending/lending_info/ethereum/venus_eth.py +0 -10
  62. defi_services/services/lending/lending_info/ethereum/zerolend_eth.py +0 -96
  63. defi_services/services/lending/lending_info/optimism/compound_v3_optimism.py +0 -116
  64. defi_services/services/lending/lending_info/optimism/moonwell_optimism.py +0 -9
  65. defi_services/services/lending/lending_info/zksync/__init__.py +0 -0
  66. defi_services/services/lending/lending_info/zksync/aave_v3_zksync.py +0 -47
  67. defi_services/services/lending/lending_info/zksync/venus_zksync.py +0 -10
  68. defi_services/services/lending/lending_info/zksync/zerolend_zksync.py +0 -138
  69. defi_services/services/lending/moonwell_service.py +0 -120
  70. defi_services/services/lending/sonne_service.py +0 -64
  71. defi_services/services/lending/zerolend_services.py +0 -36
  72. defi_services/services/vault/tcv_vault_services.py +0 -108
  73. defi_services/services/vault/vault_info/arbitrum/__init__.py +0 -0
  74. defi_services/services/vault/vault_info/arbitrum/tcv_arb.py +0 -58
  75. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/__init__.py +0 -0
  76. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/aave_v2_event_abi.py +0 -0
  77. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/aave_v2_incentives_abi.py +0 -0
  78. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/lending_pool_abi.py +0 -0
  79. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/oracle_abi.py +0 -0
  80. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/staked_incentives_abi.py +0 -0
  81. /defi_services/abis/lending/{aave_v2_and_forks → aave_v2_and_forlks}/uwu_incentives_abi.py +0 -0
  82. {defi_state_querier-0.5.26.dist-info → defi_state_querier-0.5.28.dist-info/licenses}/LICENSE +0 -0
  83. {defi_state_querier-0.5.26.dist-info → defi_state_querier-0.5.28.dist-info}/top_level.txt +0 -0
@@ -7,5 +7,144 @@ AAVE_V3_ETH = {
7
7
  "type": "LENDING_POOL",
8
8
  "poolToken": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
9
9
  "forked": "aave-v3",
10
- "reservesList": {'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': {'tToken': '0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xea51d7853eefb32b6ee06b1c12e6dcca88be0ffe', 'loanToValue': 0.805, 'liquidationThreshold': 0.83}, '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0': {'tToken': '0x0b925ed163218f6662a35e0f0371ac234f9e9371', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xc96113eed8cab59cd8a66813bcb0ceb29f06d2e4', 'loanToValue': 0.785, 'liquidationThreshold': 0.81}, '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599': {'tToken': '0x5ee5bf7ae06d1be5997a1a72006fe6c607ec6de8', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x40aabef1aa8f0eec637e0e7d92fbffb2f26a8b7b', 'loanToValue': 0.73, 'liquidationThreshold': 0.78}, '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': {'tToken': '0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x72e95b8931767c79ba4eee721354d6e99a61d004', 'loanToValue': 0.75, 'liquidationThreshold': 0.78}, '0x6b175474e89094c44da98b954eedeac495271d0f': {'tToken': '0x018008bfb33d285247a21d44e50697654f754e63', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xcf8d0c70c850859266f5c338b38f9d663181c314', 'loanToValue': 0.63, 'liquidationThreshold': 0.77}, '0x514910771af9ca656af840dff83e8264ecf986ca': {'tToken': '0x5e8c8a7243651db1384c0ddfdbe39761e8e7e51a', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x4228f8895c7dda20227f6a5c6751b8ebf19a6ba8', 'loanToValue': 0.66, 'liquidationThreshold': 0.71}, '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9': {'tToken': '0xa700b4eb416be35b2911fd5dee80678ff64ff6c9', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xbae535520abd9f8c85e58929e0006a2c8b372f74', 'loanToValue': 0.66, 'liquidationThreshold': 0.73}, '0xbe9895146f7af43049ca1c1ae358b0541ea49704': {'tToken': '0x977b6fc5de62598b08c85ac8cf2b745874e8b78c', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x0c91bca95b5fe69164ce583a2ec9429a569798ed', 'loanToValue': 0.75, 'liquidationThreshold': 0.79}, '0xdac17f958d2ee523a2206206994597c13d831ec7': {'tToken': '0x23878914efe38d27c4d67ab83ed1b93a74d4086a', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x6df1c1e379bc5a00a7b4c6e67a203333772f45a8', 'loanToValue': 0.75, 'liquidationThreshold': 0.78}, '0xae78736cd615f374d3085123a210448e74fc6393': {'tToken': '0xcc9ee9483f662091a1de4795249e24ac0ac2630f', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xae8593dd575fe29a9745056aa91c4b746eee62c8', 'loanToValue': 0.75, 'liquidationThreshold': 0.79}, '0x5f98805a4e8be255a32880fdec7f6728c6568ba0': {'tToken': '0x3fe6a295459fae07df8a0cecc36f37160fe86aa9', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x33652e48e4b74d18520f11bfe58edd2ed2cec5a2', 'loanToValue': 0.0, 'liquidationThreshold': 0.77}, '0xd533a949740bb3306d119cc777fa900ba034cd52': {'tToken': '0x7b95ec873268a6bfc6427e7a28e396db9d0ebc65', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x1b7d3f4b3c032a5ae656e30eea4e8e1ba376068f', 'loanToValue': 0.35, 'liquidationThreshold': 0.41}, '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2': {'tToken': '0x8a458a9dc9048e005d22849f470891b840296619', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x6efc73e54e41b27d2134ff9f98f15550f30df9b1', 'loanToValue': 0.65, 'liquidationThreshold': 0.7}, '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': {'tToken': '0xc7b4c17861357b8abb91f25581e7263e08dcb59c', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x8d0de040e8aad872ec3c33a3776de9152d3c34ca', 'loanToValue': 0.49, 'liquidationThreshold': 0.65}, '0xba100000625a3754423978a60c9317c58a424e3d': {'tToken': '0x2516e7b3f76294e03c42aa4c5b5b4dce9c436fb8', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x3d3efceb4ff0966d34d9545d3a2fa2dcdbf451f2', 'loanToValue': 0.57, 'liquidationThreshold': 0.59}, '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984': {'tToken': '0xf6d2224916ddfbbab6e6bd0d1b7034f4ae0cab18', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xf64178ebd2e2719f2b1233bcb5ef6db4bcc4d09a', 'loanToValue': 0.65, 'liquidationThreshold': 0.74}, '0x5a98fcbea516cf06857215779fd812ca3bef1b32': {'tToken': '0x9a44fd41566876a39655f74971a3a6ea0a17a454', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xc30808705c01289a3d306ca9cab081ba9114ec82', 'loanToValue': 0.4, 'liquidationThreshold': 0.5}, '0xc18360217d8f7ab5e7c516566761ea12ce7f9d72': {'tToken': '0x545bd6c032efdde65a377a6719def2796c8e0f2e', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xd180d7fdd4092f07428efe801e17bc03576b3192', 'loanToValue': 0.39, 'liquidationThreshold': 0.49}, '0x111111111117dc0aa78b770fa6a738034120c302': {'tToken': '0x71aef7b30728b9bb371578f36c5a1f1502a5723e', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xa38fca8c6bf9bda52e76eb78f08caa3be7c5a970', 'loanToValue': 0.57, 'liquidationThreshold': 0.67}, '0x853d955acef822db058eb8505911ed77f175b99e': {'tToken': '0xd4e245848d6e1220dbe62e155d89fa327e43cb06', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x88b8358f5bc87c2d7e116cca5b65a9eeb2c5ea3f', 'loanToValue': 0.0, 'liquidationThreshold': 0.72}, '0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f': {'tToken': '0x00907f9921424583e7ffbfedf84f92b7b2be4977', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x786dbff3f1292ae8f92ea68cf93c30b34b1ed04b', 'loanToValue': 0.0, 'liquidationThreshold': 0.0}, '0xd33526068d116ce69f19a9ee46f0bd304f21a51f': {'tToken': '0xb76cf92076adbf1d9c39294fa8e7a67579fde357', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x8988eca19d502fd8b9ccd03fa3bd20a6f599bc2a', 'loanToValue': 0.0, 'liquidationThreshold': 0.0}, '0x83f20f44975d03b1b09e64809b757c47f942beea': {'tToken': '0x4c612e3b15b96ff9a6faed838f8d07d479a8dd4c', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x8db9d35e117d8b93c6ca9b644b25bad5d9908141', 'loanToValue': 0.75, 'liquidationThreshold': 0.78}, '0xaf5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6': {'tToken': '0x1ba9843bd4327c6c77011406de5fa8749f7e3479', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x655568bdd6168325ec7e58bf39b21a856f906dc2', 'loanToValue': 0.0, 'liquidationThreshold': 0.37}, '0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202': {'tToken': '0x5b502e3796385e1e9755d7043b9c945c3accec9c', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x253127ffc04981cea8932f406710661c2f2c3fd2', 'loanToValue': 0.0, 'liquidationThreshold': 0.37}, '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0': {'tToken': '0x82f9c5ad306bba1ad0de49bb5fa6f01bf61085ef', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x68e9f0ad4e6f8f5db70f6923d4d6d5b225b83b16', 'loanToValue': 0.0, 'liquidationThreshold': 0.42}, '0xf939e0a03fb07f59a73314e73794be0e57ac1b4e': {'tToken': '0xb82fa9f31612989525992fcfbb09ab22eff5c85a', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x028f7886f3e937f8479efad64f31b3fe1119857a', 'loanToValue': 0.0, 'liquidationThreshold': 0.0}, '0x6c3ea9036406852006290770bedfcaba0e23a0e8': {'tToken': '0x0c0d01abf3e6adfca0989ebba9d6e85dd58eab1e', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x57b67e4de077085fd0af2174e9c14871be664546', 'loanToValue': 0.0, 'liquidationThreshold': 0.0}, '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee': {'tToken': '0xbdfa7b7893081b35fb54027489e2bc7a38275129', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x77ad9bf13a52517ad698d65913e8d381300c8bf3', 'loanToValue': 0.725, 'liquidationThreshold': 0.75}, '0xf1c9acdc66974dfb6decb12aa385b9cd01190e38': {'tToken': '0x927709711794f3de5ddbf1d176bee2d55ba13c21', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x8838eeff2af391863e1bb8b1df563f86743a8470', 'loanToValue': 0.725, 'liquidationThreshold': 0.75}, '0x4c9edd5852cd905f086c759e8383e09bff1e68b3': {'tToken': '0x4f5923fc5fd4a93352581b38b7cd26943012decf', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x015396e1f286289ae23a762088e863b3ec465145', 'loanToValue': 0.72, 'liquidationThreshold': 0.75}, '0xa35b1b31ce002fbf2058d22f30f95d405200a15b': {'tToken': '0x1c0e06a0b1a4c160c17545ff2a951bfca57c0002', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x08a8dc81aea67f84745623ac6c72cda3967aab8b', 'loanToValue': 0.745, 'liquidationThreshold': 0.77}, '0x9d39a5de30e57443bff2a8307a4256c8797a3497': {'tToken': '0x4579a27af00a62c0eb156349f31b345c08386419', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xeffde9bfa8ec77c14c364055a200746d6e12bed6', 'loanToValue': 0.72, 'liquidationThreshold': 0.75}, '0x18084fba666a33d37592fa2633fd49a74dd93a88': {'tToken': '0x10ac93971cdb1f5c778144084242374473c350da', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xac50890a80a2731eb1ea2e9b4f29569ceb06d960', 'loanToValue': 0.73, 'liquidationThreshold': 0.78}, '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf': {'tToken': '0x5c647ce0ae10658ec44fa4e11a51c96e94efd1dd', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0xeb284a70557efe3591b9e6d9d720040e02c54a4d', 'loanToValue': 0.73, 'liquidationThreshold': 0.78}, '0xdc035d45d973e3ec169d2276ddab16f1e407384f': {'tToken': '0x32a6268f9ba3642dda7892add74f1d34469a4259', 'sdToken': '0x0000000000000000000000000000000000000000', 'dToken': '0x490e0e6255bf65b43e2e02f7acb783c5e04572ff', 'loanToValue': 0.75, 'liquidationThreshold': 0.78}}
10
+ "reservesList": {
11
+ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
12
+ "tToken": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8",
13
+ "sdToken": "0x102633152313c81cd80419b6ecf66d14ad68949a",
14
+ "dToken": "0xea51d7853eefb32b6ee06b1c12e6dcca88be0ffe",
15
+ "liquidationThreshold": 0.83
16
+ },
17
+ "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
18
+ "tToken": "0x0b925ed163218f6662a35e0f0371ac234f9e9371",
19
+ "sdToken": "0x39739943199c0fbfe9e5f1b5b160cd73a64cb85d",
20
+ "dToken": "0xc96113eed8cab59cd8a66813bcb0ceb29f06d2e4",
21
+ "liquidationThreshold": 0.81
22
+ },
23
+ "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
24
+ "tToken": "0x5ee5bf7ae06d1be5997a1a72006fe6c607ec6de8",
25
+ "sdToken": "0xa1773f1ccf6db192ad8fe826d15fe1d328b03284",
26
+ "dToken": "0x40aabef1aa8f0eec637e0e7d92fbffb2f26a8b7b",
27
+ "liquidationThreshold": 0.78
28
+ },
29
+ "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
30
+ "tToken": "0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c",
31
+ "sdToken": "0xb0fe3d292f4bd50de902ba5bdf120ad66e9d7a39",
32
+ "dToken": "0x72e95b8931767c79ba4eee721354d6e99a61d004",
33
+ "liquidationThreshold": 0.8
34
+ },
35
+ "0x6b175474e89094c44da98b954eedeac495271d0f": {
36
+ "tToken": "0x018008bfb33d285247a21d44e50697654f754e63",
37
+ "sdToken": "0x413adac9e2ef8683adf5ddaece8f19613d60d1bb",
38
+ "dToken": "0xcf8d0c70c850859266f5c338b38f9d663181c314",
39
+ "liquidationThreshold": 0.8
40
+ },
41
+ "0x514910771af9ca656af840dff83e8264ecf986ca": {
42
+ "tToken": "0x5e8c8a7243651db1384c0ddfdbe39761e8e7e51a",
43
+ "sdToken": "0x63b1129ca97d2b9f97f45670787ac12a9df1110a",
44
+ "dToken": "0x4228f8895c7dda20227f6a5c6751b8ebf19a6ba8",
45
+ "liquidationThreshold": 0.68
46
+ },
47
+ "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9": {
48
+ "tToken": "0xa700b4eb416be35b2911fd5dee80678ff64ff6c9",
49
+ "sdToken": "0x268497bf083388b1504270d0e717222d3a87d6f2",
50
+ "dToken": "0xbae535520abd9f8c85e58929e0006a2c8b372f74",
51
+ "liquidationThreshold": 0.73
52
+ },
53
+ "0xbe9895146f7af43049ca1c1ae358b0541ea49704": {
54
+ "tToken": "0x977b6fc5de62598b08c85ac8cf2b745874e8b78c",
55
+ "sdToken": "0x82be6012cea6d147b968ebaea5ceecf6a5b4f493",
56
+ "dToken": "0x0c91bca95b5fe69164ce583a2ec9429a569798ed",
57
+ "liquidationThreshold": 0.77
58
+ },
59
+ "0xdac17f958d2ee523a2206206994597c13d831ec7": {
60
+ "tToken": "0x23878914efe38d27c4d67ab83ed1b93a74d4086a",
61
+ "sdToken": "0x822fa72df1f229c3900f5ad6c3fa2c424d691622",
62
+ "dToken": "0x6df1c1e379bc5a00a7b4c6e67a203333772f45a8",
63
+ "liquidationThreshold": 0.76
64
+ },
65
+ "0xae78736cd615f374d3085123a210448e74fc6393": {
66
+ "tToken": "0xcc9ee9483f662091a1de4795249e24ac0ac2630f",
67
+ "sdToken": "0x1d1906f909cae494c7441604dafdddbd0485a925",
68
+ "dToken": "0xae8593dd575fe29a9745056aa91c4b746eee62c8",
69
+ "liquidationThreshold": 0.77
70
+ },
71
+ "0x5f98805a4e8be255a32880fdec7f6728c6568ba0": {
72
+ "tToken": "0x3fe6a295459fae07df8a0cecc36f37160fe86aa9",
73
+ "sdToken": "0x37a6b708fdb1483c231961b9a7f145261e815fc3",
74
+ "dToken": "0x33652e48e4b74d18520f11bfe58edd2ed2cec5a2",
75
+ "liquidationThreshold": 0.8
76
+ },
77
+ "0xd533a949740bb3306d119cc777fa900ba034cd52": {
78
+ "tToken": "0x7b95ec873268a6bfc6427e7a28e396db9d0ebc65",
79
+ "sdToken": "0x90d9cd005e553111eb8c9c31abe9706a186b6048",
80
+ "dToken": "0x1b7d3f4b3c032a5ae656e30eea4e8e1ba376068f",
81
+ "liquidationThreshold": 0.41
82
+ },
83
+ "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2": {
84
+ "tToken": "0x8a458a9dc9048e005d22849f470891b840296619",
85
+ "sdToken": "0x0496372be7e426d28e89debf01f19f014d5938be",
86
+ "dToken": "0x6efc73e54e41b27d2134ff9f98f15550f30df9b1",
87
+ "liquidationThreshold": 0.7
88
+ },
89
+ "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f": {
90
+ "tToken": "0xc7b4c17861357b8abb91f25581e7263e08dcb59c",
91
+ "sdToken": "0x478e1ec1a2beed94c1407c951e4b9e22d53b2501",
92
+ "dToken": "0x8d0de040e8aad872ec3c33a3776de9152d3c34ca",
93
+ "liquidationThreshold": 0.65
94
+ },
95
+ "0xba100000625a3754423978a60c9317c58a424e3d": {
96
+ "tToken": "0x2516e7b3f76294e03c42aa4c5b5b4dce9c436fb8",
97
+ "sdToken": "0xb368d45aaaa07ee2c6275cb320d140b22de43cdd",
98
+ "dToken": "0x3d3efceb4ff0966d34d9545d3a2fa2dcdbf451f2",
99
+ "liquidationThreshold": 0.62
100
+ },
101
+ "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": {
102
+ "tToken": "0xf6d2224916ddfbbab6e6bd0d1b7034f4ae0cab18",
103
+ "sdToken": "0x2fec76324a0463c46f32e74a86d1cf94c02158dc",
104
+ "dToken": "0xf64178ebd2e2719f2b1233bcb5ef6db4bcc4d09a",
105
+ "liquidationThreshold": 0.77
106
+ },
107
+ "0x5a98fcbea516cf06857215779fd812ca3bef1b32": {
108
+ "tToken": "0x9a44fd41566876a39655f74971a3a6ea0a17a454",
109
+ "sdToken": "0xa0a5bf5781aeb548db9d4226363b9e89287c5fd2",
110
+ "dToken": "0xc30808705c01289a3d306ca9cab081ba9114ec82",
111
+ "liquidationThreshold": 0.5
112
+ },
113
+ "0xc18360217d8f7ab5e7c516566761ea12ce7f9d72": {
114
+ "tToken": "0x545bd6c032efdde65a377a6719def2796c8e0f2e",
115
+ "sdToken": "0x7617d02e311cde347a0cb45bb7df2926bbaf5347",
116
+ "dToken": "0xd180d7fdd4092f07428efe801e17bc03576b3192",
117
+ "liquidationThreshold": 0.49
118
+ },
119
+ "0x111111111117dc0aa78b770fa6a738034120c302": {
120
+ "tToken": "0x71aef7b30728b9bb371578f36c5a1f1502a5723e",
121
+ "sdToken": "0x4b62bfaff61ab3985798e5202d2d167f567d0bcd",
122
+ "dToken": "0xa38fca8c6bf9bda52e76eb78f08caa3be7c5a970",
123
+ "liquidationThreshold": 0.67
124
+ },
125
+ "0x853d955acef822db058eb8505911ed77f175b99e": {
126
+ "tToken": "0xd4e245848d6e1220dbe62e155d89fa327e43cb06",
127
+ "sdToken": "0x219640546c0dfddcb9ab3bcda89b324e0a376367",
128
+ "dToken": "0x88b8358f5bc87c2d7e116cca5b65a9eeb2c5ea3f",
129
+ "liquidationThreshold": 0.75
130
+ },
131
+ "0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f": {
132
+ "tToken": "0x00907f9921424583e7ffbfedf84f92b7b2be4977",
133
+ "sdToken": "0x3f3df7266da30102344a813f1a3d07f5f041b5ac",
134
+ "dToken": "0x786dbff3f1292ae8f92ea68cf93c30b34b1ed04b",
135
+ "liquidationThreshold": 0.0
136
+ },
137
+ "0xd33526068d116ce69f19a9ee46f0bd304f21a51f": {
138
+ "tToken": "0xb76cf92076adbf1d9c39294fa8e7a67579fde357",
139
+ "sdToken": "0x41e330fd8f7ea31e2e8f02cc0c9392d1403597b4",
140
+ "dToken": "0x8988eca19d502fd8b9ccd03fa3bd20a6f599bc2a",
141
+ "liquidationThreshold": 0.0
142
+ },
143
+ "0x83f20f44975d03b1b09e64809b757c47f942beea": {
144
+ "tToken": "0x4c612e3b15b96ff9a6faed838f8d07d479a8dd4c",
145
+ "sdToken": "0x48bc45f084988bc01933ea93eeffebc0416534f6",
146
+ "dToken": "0x8db9d35e117d8b93c6ca9b644b25bad5d9908141",
147
+ "liquidationThreshold": 0.8
148
+ }
149
+ }
11
150
  }
@@ -19,56 +19,6 @@ COMPOUND_V3_ETH = {
19
19
  "priceFeed": "0x4f67e4d9bd67efa28236013288737d39aef48e79",
20
20
  "loanToValue": 0.9,
21
21
  "liquidationThreshold": 0.93
22
- },
23
- "0xae78736cd615f374d3085123a210448e74fc6393": {
24
- "priceFeed": "0xa3a7fb5963d1d69b95eec4957f77678ef073ba08",
25
- "loanToValue": 0.9,
26
- "liquidationThreshold": 0.93
27
- },
28
- "0xa1290d69c65a6fe4df752f95823fae25cb99e5a7": {
29
- "priceFeed": "0xfa454de61b317b6535a0c462267208e8fdb89f45",
30
- "loanToValue": 0.88,
31
- "liquidationThreshold": 0.91
32
- },
33
- "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee": {
34
- "priceFeed": "0x1ad4ceba9f8135a557bbe317db62aa125c330f26",
35
- "loanToValue": 0.9,
36
- "liquidationThreshold": 0.93
37
- },
38
- "0xf1c9acdc66974dfb6decb12aa385b9cd01190e38": {
39
- "priceFeed": "0x66f5afdad14b30816b47b707240d1e8e3344d04d",
40
- "loanToValue": 0.8,
41
- "liquidationThreshold": 0.85
42
- },
43
- "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
44
- "priceFeed": "0xd98be00b5d27fc98112bde293e487f8d4ca57d07",
45
- "loanToValue": 0.8,
46
- "liquidationThreshold": 0.85
47
- },
48
- "0xbf5495efe5db9ce00f80364c8b423567e58d2110": {
49
- "priceFeed": "0xde43600de5016b50752cc2615332d8ccbed6ec1b",
50
- "loanToValue": 0.88,
51
- "liquidationThreshold": 0.91
52
- },
53
- "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
54
- "priceFeed": "0x57a71a9c632b2e6d8b0eb9a157888a3fc87400d1",
55
- "loanToValue": 0.8,
56
- "liquidationThreshold": 0.85
57
- },
58
- "0xfae103dc9cf190ed75350761e95403b7b8afa6c0": {
59
- "priceFeed": "0xdd18688bb75af704f3fb1183e459c4d4d41132d9",
60
- "loanToValue": 0.8,
61
- "liquidationThreshold": 0.85
62
- },
63
- "0x18084fba666a33d37592fa2633fd49a74dd93a88": {
64
- "priceFeed": "0x1933f7e5f8b0423fbab28ce9c8c39c2cc414027b",
65
- "loanToValue": 0.76,
66
- "liquidationThreshold": 0.81
67
- },
68
- "0xa35b1b31ce002fbf2058d22f30f95d405200a15b": {
69
- "priceFeed": "0x9f2f60f38bbc275af8f88a21c0e2bfe751e97c1f",
70
- "loanToValue": 0.85,
71
- "liquidationThreshold": 0.9
72
22
  }
73
23
  }
74
24
  },
@@ -77,13 +27,13 @@ COMPOUND_V3_ETH = {
77
27
  "assets": {
78
28
  "0xc00e94cb662c3520282e6f5717214004a7f26888": {
79
29
  "priceFeed": "0xdbd020caef83efd542f4de03e3cf0c28a4428bd5",
80
- "loanToValue": 0.5,
30
+ "loanToValue": 0.65,
81
31
  "liquidationThreshold": 0.7
82
32
  },
83
33
  "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
84
34
  "priceFeed": "0xf4030086522a5beea4988f8ca5b36dbc97bee88c",
85
- "loanToValue": 0.8,
86
- "liquidationThreshold": 0.85
35
+ "loanToValue": 0.7,
36
+ "liquidationThreshold": 0.77
87
37
  },
88
38
  "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
89
39
  "priceFeed": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419",
@@ -92,140 +42,15 @@ COMPOUND_V3_ETH = {
92
42
  },
93
43
  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": {
94
44
  "priceFeed": "0x553303d460ee0afb37edff9be42922d8ff63220e",
95
- "loanToValue": 0.68,
96
- "liquidationThreshold": 0.74
97
- },
98
- "0x514910771af9ca656af840dff83e8264ecf986ca": {
99
- "priceFeed": "0x2c1d072e956affc0d435cb7ac38ef18d24d9127c",
100
- "loanToValue": 0.73,
101
- "liquidationThreshold": 0.79
102
- },
103
- "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
104
- "priceFeed": "0x023ee795361b28cdbb94e302983578486a0a5f1b",
105
- "loanToValue": 0.82,
106
- "liquidationThreshold": 0.87
107
- },
108
- "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
109
- "priceFeed": "0x0a4f4f9e84fc4f674f0d209f94d41fafe5af887d",
110
- "loanToValue": 0.8,
111
- "liquidationThreshold": 0.85
112
- },
113
- "0x18084fba666a33d37592fa2633fd49a74dd93a88": {
114
- "priceFeed": "0xaa9527bf3183a96fe6e55831c96de5cd988d3484",
115
- "loanToValue": 0.76,
45
+ "loanToValue": 0.75,
116
46
  "liquidationThreshold": 0.81
117
- }
118
- }
119
- },
120
- "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
121
- "comet": "0x3d0bb1ccab520a66e607822fc55bc921738fafe3",
122
- "assets": {
123
- "0xa1290d69c65a6fe4df752f95823fae25cb99e5a7": {
124
- "priceFeed": "0xc49399814452b41da8a7cd76a159f5515cb3e493",
125
- "loanToValue": 0.88,
126
- "liquidationThreshold": 0.91
127
- },
128
- "0xbf5495efe5db9ce00f80364c8b423567e58d2110": {
129
- "priceFeed": "0xc7986b6318c3f3ab5be12baf22892961158d3c24",
130
- "loanToValue": 0.88,
131
- "liquidationThreshold": 0.91
132
- }
133
- }
134
- },
135
- "0xdac17f958d2ee523a2206206994597c13d831ec7": {
136
- "comet": "0x3afdc9bca9213a35503b077a6072f3d0d5ab0840",
137
- "assets": {
138
- "0xc00e94cb662c3520282e6f5717214004a7f26888": {
139
- "priceFeed": "0xdbd020caef83efd542f4de03e3cf0c28a4428bd5",
140
- "loanToValue": 0.5,
141
- "liquidationThreshold": 0.7
142
- },
143
- "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
144
- "priceFeed": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419",
145
- "loanToValue": 0.83,
146
- "liquidationThreshold": 0.9
147
- },
148
- "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599": {
149
- "priceFeed": "0x4e64e54c9f0313852a230782b3ba4b3b0952b499",
150
- "loanToValue": 0.8,
151
- "liquidationThreshold": 0.85
152
- },
153
- "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": {
154
- "priceFeed": "0x553303d460ee0afb37edff9be42922d8ff63220e",
155
- "loanToValue": 0.68,
156
- "liquidationThreshold": 0.74
157
47
  },
158
48
  "0x514910771af9ca656af840dff83e8264ecf986ca": {
159
49
  "priceFeed": "0x2c1d072e956affc0d435cb7ac38ef18d24d9127c",
160
- "loanToValue": 0.73,
161
- "liquidationThreshold": 0.79
162
- },
163
- "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
164
- "priceFeed": "0x023ee795361b28cdbb94e302983578486a0a5f1b",
165
- "loanToValue": 0.8,
166
- "liquidationThreshold": 0.85
167
- },
168
- "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
169
- "priceFeed": "0x2d09142eae60fd8bd454a276e95aebdffd05722d",
170
- "loanToValue": 0.8,
171
- "liquidationThreshold": 0.85
172
- },
173
- "0x18084fba666a33d37592fa2633fd49a74dd93a88": {
174
- "priceFeed": "0x7b03a016dbc36db8e05c480192fadcdb0a06bc37",
175
- "loanToValue": 0.76,
176
- "liquidationThreshold": 0.81
177
- },
178
- "0x57f5e098cad7a3d1eed53991d4d66c45c9af7812": {
179
- "priceFeed": "0xe3a409ed15cd53afdefdd191ad945cec528a2496",
180
- "loanToValue": 0.88,
181
- "liquidationThreshold": 0.9
182
- },
183
- "0xa663b02cf0a4b149d2ad41910cb81e23e1c41c32": {
184
- "priceFeed": "0x403f2083b6e220147f8a8832f0b284b4ed5777d1",
185
- "loanToValue": 0.88,
186
- "liquidationThreshold": 0.9
187
- },
188
- "0xd5f7838f5c461feff7fe49ea5ebaf7728bb0adfa": {
189
- "priceFeed": "0x2f7439252da796ab9a93f7e478e70ded43db5b89",
190
- "loanToValue": 0.8,
50
+ "loanToValue": 0.79,
191
51
  "liquidationThreshold": 0.85
192
52
  }
193
53
  }
194
- },
195
- "0xdc035d45d973e3ec169d2276ddab16f1e407384f": {
196
- "comet": "0x5d409e56d886231adaf00c8775665ad0f9897b56",
197
- "assets": {
198
- "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
199
- "priceFeed": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419",
200
- "loanToValue": 0.83,
201
- "liquidationThreshold": 0.9
202
- },
203
- "0x4c9edd5852cd905f086c759e8383e09bff1e68b3": {
204
- "priceFeed": "0xa569d910839ae8865da8f8e70fffb0cba869f961",
205
- "loanToValue": 0.7,
206
- "liquidationThreshold": 0.75
207
- },
208
- "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf": {
209
- "priceFeed": "0x2665701293fcbeb223d11a08d826563edcce423a",
210
- "loanToValue": 0.8,
211
- "liquidationThreshold": 0.85
212
- },
213
- "0x18084fba666a33d37592fa2633fd49a74dd93a88": {
214
- "priceFeed": "0x8350b7de6a6a2c1368e7d4bd968190e13e354297",
215
- "loanToValue": 0.76,
216
- "liquidationThreshold": 0.81
217
- },
218
- "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
219
- "priceFeed": "0x7de363b6bf0a892b94a1cd0c9df76826bfc14228",
220
- "loanToValue": 0.82,
221
- "liquidationThreshold": 0.87
222
- },
223
- "0xa3931d71877c0e7a3148cb7eb4463524fec27fbd": {
224
- "priceFeed": "0x31b844dbc7cdbaa27d22fd6d54986836d023bf3f",
225
- "loanToValue": 0.88,
226
- "liquidationThreshold": 0.92
227
- }
228
- }
229
54
  }
230
55
  }
231
56
  }
@@ -12,18 +12,18 @@ COMPOUND_V3_POLYGON = {
12
12
  "assets": {
13
13
  "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619": {
14
14
  "priceFeed": "0xf9680d99d6c9589e2a93a78a04a279e509205945",
15
- "loanToValue": 0.8,
16
- "liquidationThreshold": 0.85
15
+ "loanToValue": 0.775,
16
+ "liquidationThreshold": 0.825
17
17
  },
18
18
  "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6": {
19
19
  "priceFeed": "0xde31f8bfbd8c84b5360cfacca3539b938dd78ae6",
20
- "loanToValue": 0.75,
21
- "liquidationThreshold": 0.85
20
+ "loanToValue": 0.7,
21
+ "liquidationThreshold": 0.75
22
22
  },
23
23
  "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270": {
24
24
  "priceFeed": "0xab594600376ec9fd91f8e885dadf0ce036862de0",
25
25
  "loanToValue": 0.65,
26
- "liquidationThreshold": 0.8
26
+ "liquidationThreshold": 0.7
27
27
  },
28
28
  "0xfa68fb4628dff1028cfec22b4162fccd0d45efb6": {
29
29
  "priceFeed": "0x5d37e4b374e6907de8fc7fb33ee3b0af403c7403",
@@ -36,36 +36,6 @@ COMPOUND_V3_POLYGON = {
36
36
  "liquidationThreshold": 0.65
37
37
  }
38
38
  }
39
- },
40
- "0xc2132d05d31c914a87c6611c10748aeb04b58e8f": {
41
- "comet": "0xaeb318360f27748acb200ce616e389a6c9409a07",
42
- "assets": {
43
- "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270": {
44
- "priceFeed": "0xab594600376ec9fd91f8e885dadf0ce036862de0",
45
- "loanToValue": 0.65,
46
- "liquidationThreshold": 0.8
47
- },
48
- "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619": {
49
- "priceFeed": "0xf9680d99d6c9589e2a93a78a04a279e509205945",
50
- "loanToValue": 0.8,
51
- "liquidationThreshold": 0.85
52
- },
53
- "0xfa68fb4628dff1028cfec22b4162fccd0d45efb6": {
54
- "priceFeed": "0x5d37e4b374e6907de8fc7fb33ee3b0af403c7403",
55
- "loanToValue": 0.6,
56
- "liquidationThreshold": 0.7
57
- },
58
- "0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4": {
59
- "priceFeed": "0x97371df4492605486e23da797fa68e55fc38a13f",
60
- "loanToValue": 0.6,
61
- "liquidationThreshold": 0.7
62
- },
63
- "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6": {
64
- "priceFeed": "0xde31f8bfbd8c84b5360cfacca3539b938dd78ae6",
65
- "loanToValue": 0.75,
66
- "liquidationThreshold": 0.85
67
- }
68
- }
69
39
  }
70
40
  }
71
41
  }
@@ -3,9 +3,9 @@ import time
3
3
 
4
4
  from web3 import Web3
5
5
 
6
- from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
7
- from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
8
- from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
6
+ from defi_services.abis.lending.aave_v2_and_forlks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
7
+ from defi_services.abis.lending.aave_v2_and_forlks.lending_pool_abi import LENDING_POOL_ABI
8
+ from defi_services.abis.lending.aave_v2_and_forlks.oracle_abi import ORACLE_ABI
9
9
  from defi_services.abis.lending.morpho.morpho_aave_v2_comptroller_abi import MORPHO_AAVE_V2_COMPTROLLER
10
10
  from defi_services.abis.lending.morpho.morpho_aave_v2_lens_abi import MORPHO_AAVE_V2_LENS_ABI
11
11
  from defi_services.abis.token.erc20_abi import ERC20_ABI
@@ -3,8 +3,8 @@ import time
3
3
 
4
4
  from web3 import Web3
5
5
 
6
- from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
7
- from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
6
+ from defi_services.abis.lending.aave_v2_and_forlks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
7
+ from defi_services.abis.lending.aave_v2_and_forlks.oracle_abi import ORACLE_ABI
8
8
  from defi_services.abis.lending.aave.aave_v3.aave_v3_lending_pool_abi import AAVE_V3_LENDING_POOL_ABI
9
9
  from defi_services.abis.lending.morpho.morpho_aave_v3_comptroller_abi import MORPHO_AAVE_V3_COMPTROLLER_ABI
10
10
  from defi_services.abis.token.erc20_abi import ERC20_ABI
@@ -1,15 +1,11 @@
1
1
  import logging
2
2
 
3
- from defi_services.abis.lending.radiant_v2.radiant_reward_converter import RADIANT_REWARD_CONVERTER_ABI
4
3
  from defi_services.abis.lending.radiant_v2.radiant_v2_incentive_abi import RADIANT_V2_INCENTIVE_ABI
5
- from defi_services.abis.token.erc20_abi import ERC20_ABI
6
4
  from defi_services.constants.chain_constant import Chain
7
5
  from defi_services.constants.entities.lending_constant import Lending
8
6
  from defi_services.jobs.queriers.state_querier import StateQuerier
9
7
  from defi_services.services.lending.lending_info.arbitrum.radiant_arbitrum import RADIANT_ARB
10
- from defi_services.services.lending.lending_info.base.radiant_v2_base import RADIANT_BASE
11
8
  from defi_services.services.lending.lending_info.bsc.radiant_bsc import RADIANT_BSC
12
- from defi_services.services.lending.lending_info.ethereum.radiant_eth import RADIANT_ETH
13
9
  from defi_services.services.lending.valas_services import ValasStateService
14
10
  from defi_services.utils.apy import apr_to_apy
15
11
 
@@ -19,9 +15,7 @@ logger = logging.getLogger("Radiant Lending Pool State Service")
19
15
  class RadiantInfo:
20
16
  mapping = {
21
17
  Chain.arbitrum: RADIANT_ARB,
22
- Chain.bsc: RADIANT_BSC,
23
- Chain.ethereum: RADIANT_ETH,
24
- Chain.base: RADIANT_BASE
18
+ Chain.bsc: RADIANT_BSC
25
19
  }
26
20
 
27
21
 
@@ -71,55 +65,19 @@ class RadiantStateService(ValasStateService):
71
65
  block_number: int = "latest"
72
66
  ):
73
67
  rpc_calls = {}
74
- if self.chain_id != Chain.base:
75
- key = f"allPendingRewards_{self.name}_{wallet}_{block_number}".lower()
76
- rpc_calls[key] = self.get_function_incentive_info(
77
- "allPendingRewards", [wallet], block_number)
78
- else:
79
- # key = f"viewPendingRewards_{self.name}_{wallet}_{block_number}".lower()
80
- # rpc_calls[key] = self.get_function_reward_converter_info(
81
- # "viewPendingRewards", [wallet], block_number)
82
- for token in self.pool_info.get('rewardToken'):
83
- key = f"decimals_{token}"
84
- rpc_calls[key] = self.state_service.get_function_info(
85
- token, ERC20_ABI, "decimals"
86
- )
68
+ key = f"allPendingRewards_{self.name}_{wallet}_{block_number}".lower()
69
+ rpc_calls[key] = self.get_function_incentive_info(
70
+ "allPendingRewards", [wallet], block_number)
87
71
 
88
72
  return rpc_calls
89
73
 
90
74
  def calculate_rewards_balance(
91
75
  self, wallet: str, reserves_info: dict, decoded_data: dict, block_number: int = "latest"):
92
- if self.chain_id != Chain.base:
93
- reward_token = self.pool_info['rewardToken']
94
- key = f"allPendingRewards_{self.name}_{wallet}_{block_number}".lower()
95
- rewards = decoded_data.get(key) / 10 ** 18
96
- result = {
97
- reward_token: {"amount": rewards}
98
- }
99
- else:
100
- # key = f"viewPendingRewards_{self.name}_{wallet}_{block_number}".lower()
101
- # rewards = decoded_data.get(key)
102
- result = {}
103
- w3 = self.state_service.get_w3()
104
- contract = w3.eth.contract(w3.to_checksum_address(
105
- self.pool_info.get('rewardConverter')), abi=RADIANT_REWARD_CONVERTER_ABI
106
- )
107
- rewards = contract.functions.viewPendingRewards(w3.to_checksum_address(wallet)).call()
108
- amts = rewards[1]
109
- tokens = rewards[0]
110
- for idx in range(len(tokens)):
111
- amount = amts[idx]
112
- token = tokens[idx].lower()
113
- if token not in self.pool_info.get('rewardToken', []):
114
- continue
115
- decimal_key = f"decimals_{token}"
116
- result.update({
117
- token.lower(): {"amount": amount / 10**decoded_data.get(decimal_key)}
118
- })
76
+ reward_token = self.pool_info['rewardToken']
77
+ key = f"allPendingRewards_{self.name}_{wallet}_{block_number}".lower()
78
+ rewards = decoded_data.get(key) / 10 ** 18
79
+ result = {
80
+ reward_token: {"amount": rewards}
81
+ }
119
82
 
120
83
  return result
121
-
122
- def get_function_reward_converter_info(self, fn_name: str, fn_paras=None, block_number: int = 'latest'):
123
- return self.state_service.get_function_info(
124
- self.pool_info['rewardConverter'], self.incentive_abi, fn_name, fn_paras, block_number
125
- )
@@ -3,8 +3,8 @@ import time
3
3
 
4
4
  from web3 import Web3
5
5
 
6
- from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
7
- from defi_services.abis.lending.aave_v2_and_forks.staked_incentives_abi import STAKED_INCENTIVES_ABI
6
+ from defi_services.abis.lending.aave_v2_and_forlks.oracle_abi import ORACLE_ABI
7
+ from defi_services.abis.lending.aave_v2_and_forlks.staked_incentives_abi import STAKED_INCENTIVES_ABI
8
8
  from defi_services.abis.lending.trava.trava_lending_pool_abi import TRAVA_LENDING_POOL_ABI
9
9
  from defi_services.abis.token.erc20_abi import ERC20_ABI
10
10
  from defi_services.constants.chain_constant import Chain
@@ -3,9 +3,9 @@ import time
3
3
 
4
4
  from web3 import Web3
5
5
 
6
- from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
7
- from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
8
- from defi_services.abis.lending.aave_v2_and_forks.uwu_incentives_abi import UWU_INCENTIVES_ABI
6
+ from defi_services.abis.lending.aave_v2_and_forlks.lending_pool_abi import LENDING_POOL_ABI
7
+ from defi_services.abis.lending.aave_v2_and_forlks.oracle_abi import ORACLE_ABI
8
+ from defi_services.abis.lending.aave_v2_and_forlks.uwu_incentives_abi import UWU_INCENTIVES_ABI
9
9
  from defi_services.abis.token.erc20_abi import ERC20_ABI
10
10
  from defi_services.constants.chain_constant import Chain
11
11
  from defi_services.constants.entities.lending_constant import Lending
@@ -3,8 +3,8 @@ import time
3
3
 
4
4
  from web3 import Web3
5
5
 
6
- from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
7
- from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
6
+ from defi_services.abis.lending.aave_v2_and_forlks.lending_pool_abi import LENDING_POOL_ABI
7
+ from defi_services.abis.lending.aave_v2_and_forlks.oracle_abi import ORACLE_ABI
8
8
  from defi_services.abis.lending.valas.chef_incentives_controller import CHEF_INCENTIVES_CONTROLLER
9
9
  from defi_services.abis.lending.valas.valas_multi_fee_distribution import VALAS_MULTI_FEE_DISTRIBUTION
10
10
  from defi_services.abis.token.erc20_abi import ERC20_ABI
@@ -151,22 +151,16 @@ class VenusStateService(CompoundStateService):
151
151
 
152
152
  def calculate_rewards_balance(
153
153
  self, wallet: str, reserves_info: dict, decoded_data: dict, block_number: int = "latest"):
154
- if not self.pool_info.get('lensAddress'):
155
- return {}
156
-
157
154
  w3 = self.state_service.get_w3()
158
- contract = w3.eth.contract(address=w3.to_checksum_address(self.pool_info.get("lensAddress")), abi=self.lens_abi)
155
+ contract = w3.eth.contract(address=w3.to_checksum_address(self.pool_info.get("lensAddress")), abi = self.lens_abi)
159
156
  # get_reward_id = f"pendingRewards_{self.name}_{wallet}_{block_number}".lower()
160
- return_data = contract.functions.pendingRewards(
161
- w3.to_checksum_address(wallet),
162
- w3.to_checksum_address(self.pool_info.get("comptrollerAddress"))).call(block_identifier=block_number)
163
-
157
+ return_data = contract.functions.pendingRewards(w3.to_checksum_address(wallet), w3.to_checksum_address(self.pool_info.get("comptrollerAddress"))).call(block_identifier=block_number)
164
158
  rewards = return_data[2]
165
159
  for item in return_data[-1]:
166
160
  rewards += item[-1]
167
161
  reward_token = self.pool_info.get("rewardToken")
168
162
  result = {
169
- reward_token: {"amount": rewards / 10 ** 18}
163
+ reward_token: {"amount": rewards/10**18}
170
164
  }
171
165
  return result
172
166