@paraswap/dex-lib 3.4.2-balancer-v2-single-swap.0 → 3.4.2

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 (110) hide show
  1. package/README.md +377 -377
  2. package/build/config.js +9 -5
  3. package/build/config.js.map +1 -1
  4. package/build/dex/algebra/algebra.js +25 -25
  5. package/build/dex/balancer-v1/balancer-v1.js +34 -34
  6. package/build/dex/balancer-v2/balancer-v2.d.ts +1 -1
  7. package/build/dex/balancer-v2/balancer-v2.js +65 -78
  8. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  9. package/build/dex/camelot/camelot.js +27 -27
  10. package/build/dex/kyberdmm/kyberdmm.js +27 -27
  11. package/build/dex/pancakeswap-v3/pancakeswap-v3.js +25 -25
  12. package/build/dex/solidly/solidly.js +27 -27
  13. package/build/dex/solidly-v3/solidly-v3.js +25 -25
  14. package/build/dex/swaap-v2/config.js +15 -0
  15. package/build/dex/swaap-v2/config.js.map +1 -1
  16. package/build/dex/uniswap-v2/uniswap-v2.js +26 -26
  17. package/build/dex/uniswap-v3/uniswap-v3.js +25 -25
  18. package/funding.json +5 -5
  19. package/package.json +1 -1
  20. package/src/config.ts +500 -496
  21. package/src/constants.ts +67 -67
  22. package/src/dex/aave-v2/aave-v2.ts +409 -409
  23. package/src/dex/aave-v3/aave-v3.ts +320 -320
  24. package/src/dex/algebra/algebra.ts +1180 -1180
  25. package/src/dex/angle-staked-stable/angle-staked-stable.ts +347 -347
  26. package/src/dex/augustus-rfq.ts +180 -180
  27. package/src/dex/bProtocol/bProtocol.ts +108 -108
  28. package/src/dex/balancer-v1/balancer-v1.ts +572 -572
  29. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +1699 -1699
  30. package/src/dex/balancer-v2/balancer-v2.ts +1669 -1701
  31. package/src/dex/bancor/bancor.ts +128 -128
  32. package/src/dex/camelot/camelot.ts +873 -873
  33. package/src/dex/compound/compound.ts +107 -107
  34. package/src/dex/curve-v1/config.ts +1179 -1179
  35. package/src/dex/curve-v1/curve-v1-e2e.test.ts +507 -507
  36. package/src/dex/curve-v1/curve-v1.ts +1315 -1315
  37. package/src/dex/curve-v1-factory/config.ts +1018 -1018
  38. package/src/dex/curve-v1-factory/curve-v1-factory.ts +1288 -1288
  39. package/src/dex/curve-v2/curve-v2.ts +440 -440
  40. package/src/dex/dexalot/dexalot.ts +1100 -1100
  41. package/src/dex/dodo-v1/dodo-v1.ts +132 -132
  42. package/src/dex/dodo-v2.ts +266 -266
  43. package/src/dex/etherfi.ts +239 -239
  44. package/src/dex/generic-rfq/generic-rfq.ts +431 -431
  45. package/src/dex/gmx/gmx.ts +321 -321
  46. package/src/dex/hashflow/hashflow.ts +1135 -1135
  47. package/src/dex/idex.ts +254 -254
  48. package/src/dex/index.ts +357 -357
  49. package/src/dex/jarvis-v6/jarvis-v6.ts +509 -509
  50. package/src/dex/jarvis.ts +262 -262
  51. package/src/dex/kyberdmm/kyberdmm.ts +649 -649
  52. package/src/dex/lido/lido.ts +110 -110
  53. package/src/dex/maker-psm/maker-psm.ts +592 -592
  54. package/src/dex/maverick-v1/maverick-v1.ts +537 -537
  55. package/src/dex/nerve/config.ts +635 -635
  56. package/src/dex/nerve/nerve-e2e.test.ts +731 -731
  57. package/src/dex/nerve/nerve-events.test.ts +911 -911
  58. package/src/dex/nerve/nerve.ts +467 -467
  59. package/src/dex/onebit/onebit.ts +113 -113
  60. package/src/dex/pancakeswap-v3/pancakeswap-v3.ts +1150 -1150
  61. package/src/dex/paraswap-limit-orders/config.ts +60 -60
  62. package/src/dex/paraswap-limit-orders/paraswap-limit-orders-e2e.test.ts +137 -137
  63. package/src/dex/paraswap-limit-orders/paraswap-limit-orders-integration.test.ts +328 -328
  64. package/src/dex/paraswap-limit-orders/paraswap-limit-orders.ts +631 -631
  65. package/src/dex/polygon-migrator/polygon-migrator.ts +194 -194
  66. package/src/dex/quick-perps/quick-perps.ts +337 -337
  67. package/src/dex/quickswap/config.ts +16 -16
  68. package/src/dex/quickswap/quickswap-e2e.test.ts +384 -384
  69. package/src/dex/smoothy/smoothy.ts +110 -110
  70. package/src/dex/solidly/config.ts +225 -225
  71. package/src/dex/solidly/solidly-e2e.test.ts +1421 -1421
  72. package/src/dex/solidly/solidly-integration.test.ts +1753 -1753
  73. package/src/dex/solidly/solidly.ts +687 -687
  74. package/src/dex/solidly-v3/solidly-v3.ts +968 -968
  75. package/src/dex/spark/spark.ts +284 -284
  76. package/src/dex/stable-pool/stable-pool.ts +129 -129
  77. package/src/dex/swaap-v2/config.ts +15 -0
  78. package/src/dex/swaap-v2/swaap-v2-e2e.test.ts +233 -17
  79. package/src/dex/swaap-v2/swaap-v2-integration.test.ts +1 -1
  80. package/src/dex/swaap-v2/swaap-v2.ts +1056 -1056
  81. package/src/dex/swell/swell.ts +312 -312
  82. package/src/dex/synthetix/synthetix.ts +420 -420
  83. package/src/dex/trader-joe-v2.1/trader-joe-v2.1.ts +180 -180
  84. package/src/dex/uniswap-v2/config.ts +637 -637
  85. package/src/dex/uniswap-v2/constants.ts +58 -58
  86. package/src/dex/uniswap-v2/uniswap-v2-e2e-avalanche.test.ts +1257 -1257
  87. package/src/dex/uniswap-v2/uniswap-v2-e2e-base.test.ts +42 -42
  88. package/src/dex/uniswap-v2/uniswap-v2-e2e-bsc.test.ts +1295 -1295
  89. package/src/dex/uniswap-v2/uniswap-v2-e2e-mainnet.test.ts +1834 -1834
  90. package/src/dex/uniswap-v2/uniswap-v2-e2e-polygon.test.ts +871 -871
  91. package/src/dex/uniswap-v2/uniswap-v2.ts +1117 -1117
  92. package/src/dex/uniswap-v3/uniswap-v3.ts +1501 -1501
  93. package/src/dex/uniswap-v3.ts +242 -242
  94. package/src/dex/weth/config.ts +73 -73
  95. package/src/dex/weth/weth.ts +230 -230
  96. package/src/dex/wombat/wombat.ts +467 -467
  97. package/src/dex/woo-fi-v2/woo-fi-v2.ts +529 -529
  98. package/src/dex/wsteth/wsteth.ts +304 -304
  99. package/src/dex/zerox/index.ts +328 -328
  100. package/src/executor/Executor01BytecodeBuilder.ts +474 -474
  101. package/src/executor/Executor02BytecodeBuilder.ts +1392 -1392
  102. package/src/executor/ExecutorBytecodeBuilder.ts +390 -390
  103. package/src/executor/ExecutorDetector.ts +131 -131
  104. package/src/executor/constants.ts +66 -66
  105. package/src/executor/executor01-bytecode-builder-e2e.test.ts +1478 -1478
  106. package/src/executor/utils.ts +62 -62
  107. package/src/router/simpleswap.ts +366 -366
  108. package/src/types.ts +342 -342
  109. package/tests/constants-e2e.ts +1632 -1622
  110. package/tests/generate-new-limit-order.ts +107 -107
@@ -1,1018 +1,1018 @@
1
- import {
2
- CustomImplementationNames,
3
- CustomPoolConfig,
4
- DexParams,
5
- FactoryImplementationNames,
6
- FactoryPoolImplementations,
7
- ImplementationNames,
8
- } from './types';
9
- import { DexConfigMap, AdapterMappings } from '../../types';
10
- import { Network, SwapSide } from '../../constants';
11
- import { normalizeAddress } from '../../utils';
12
- import { FACTORY_MAX_PLAIN_COINS } from './constants';
13
-
14
- // stable ng factories addresses are taken from https://github.com/curvefi/curve-api/blob/main/constants/configs/configs.js
15
- const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
16
- CurveV1Factory: {
17
- [Network.MAINNET]: {
18
- factories: [
19
- {
20
- address: '0xB9fC157394Af804a3578134A6585C0dc9cc990d4',
21
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
22
- },
23
- {
24
- address: '0x4f8846ae9380b90d2e71d5e3d042dff3e7ebb40d',
25
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
26
- },
27
- {
28
- address: '0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf', // factory stable ng
29
- isStableNg: true,
30
- },
31
- ],
32
- stateUpdatePeriodMs: 5 * 1000,
33
- disabledPools: new Set([
34
- '0x28B0Cf1baFB707F2c6826d10caf6DD901a6540C5', // It is rug pool token
35
- ]),
36
- disabledImplementations: new Set([]),
37
- factoryPoolImplementations: {
38
- '0x2f956eee002b0debd468cf2e0490d1aec65e027f': {
39
- name: ImplementationNames.FACTORY_V1_META_BTC,
40
- address: '0x2f956eee002b0debd468cf2e0490d1aec65e027f',
41
- basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
42
- },
43
- '0x5f890841f657d90e081babdb532a05996af79fe6': {
44
- name: ImplementationNames.FACTORY_V1_META_USD,
45
- address: '0x5f890841f657d90e081babdb532a05996af79fe6',
46
- basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
47
- },
48
- '0xc6a8466d128fbfd34ada64a9fffce325d57c9a52': {
49
- name: ImplementationNames.FACTORY_META_BTC,
50
- address: '0xc6a8466d128fbfd34ada64a9fffce325d57c9a52',
51
- basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
52
- },
53
- '0xc4c78b08fa0c3d0a312605634461a88184ecd630': {
54
- name: ImplementationNames.FACTORY_META_BTC_BALANCES,
55
- address: '0xc4c78b08fa0c3d0a312605634461a88184ecd630',
56
- basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
57
- },
58
- '0xecaaecd9d2193900b424774133b1f51ae0f29d9e': {
59
- name: ImplementationNames.FACTORY_META_BTC_REN,
60
- address: '0xecaaecd9d2193900b424774133b1f51ae0f29d9e',
61
- basePoolAddress: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
62
- },
63
- '0x40fd58d44cfe63e8517c9bb3ac98676838ea56a8': {
64
- name: ImplementationNames.FACTORY_META_BTC_BALANCES_REN,
65
- address: '0x40fd58d44cfe63e8517c9bb3ac98676838ea56a8',
66
- basePoolAddress: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
67
- },
68
- '0x213be373fdff327658139c7df330817dad2d5bbe': {
69
- name: ImplementationNames.FACTORY_META_USD,
70
- address: '0x213be373fdff327658139c7df330817dad2d5bbe',
71
- basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
72
- },
73
- '0x55aa9bf126bcabf0bdc17fa9e39ec9239e1ce7a9': {
74
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
75
- address: '0x55aa9bf126bcabf0bdc17fa9e39ec9239e1ce7a9',
76
- basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
77
- },
78
- '0x33bb0e62d5e8c688e645dd46dfb48cd613250067': {
79
- name: ImplementationNames.FACTORY_META_USD_FRAX_USDC,
80
- address: '0x33bb0e62d5e8c688e645dd46dfb48cd613250067',
81
- basePoolAddress: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
82
- },
83
- '0x2eb24483ef551da247ab87cf18e1cc980073032d': {
84
- name: ImplementationNames.FACTORY_META_USD_BALANCES_FRAX_USDC,
85
- address: '0x2eb24483ef551da247ab87cf18e1cc980073032d',
86
- basePoolAddress: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
87
- },
88
- '0x008cfa89df5b0c780ca3462fc2602d7f8c7ac315': {
89
- name: ImplementationNames.FACTORY_META_BTC_SBTC2,
90
- address: '0x008cfa89df5b0c780ca3462fc2602d7f8c7ac315',
91
- basePoolAddress: '0xf253f83AcA21aAbD2A20553AE0BF7F65C755A07F',
92
- },
93
- '0xabc533ebcdded41215c46ee078c5818b5b0a252f': {
94
- name: ImplementationNames.FACTORY_META_BTC_BALANCES_SBTC2,
95
- address: '0xabc533ebcdded41215c46ee078c5818b5b0a252f',
96
- basePoolAddress: '0xf253f83AcA21aAbD2A20553AE0BF7F65C755A07F',
97
- },
98
- '0xc629a01ec23ab04e1050500a3717a2a5c0701497': {
99
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
100
- address: '0xc629a01ec23ab04e1050500a3717a2a5c0701497',
101
- customGasCost: 130_000,
102
- },
103
- '0x94b4dfd9ba5865cc931195c99a2db42f3fc5d45b': {
104
- name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA,
105
- address: '0x94b4dfd9ba5865cc931195c99a2db42f3fc5d45b',
106
- customGasCost: 130_000,
107
- },
108
- '0x847ee1227a9900b73aeeb3a47fac92c52fd54ed9': {
109
- name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
110
- address: '0x847ee1227a9900b73aeeb3a47fac92c52fd54ed9',
111
- customGasCost: 130_000,
112
- isStoreRateSupported: true,
113
- },
114
- '0x1713141278648a4edd5b027fdbd448bb4a13ac0f': {
115
- name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
116
- address: '0x1713141278648a4edd5b027fdbd448bb4a13ac0f',
117
- customGasCost: 130_000,
118
- isStoreRateSupported: true,
119
- },
120
- '0x24d937143d3f5cf04c72ba112735151a8cae2262': {
121
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
122
- address: '0x24d937143d3f5cf04c72ba112735151a8cae2262',
123
- },
124
- '0x6523ac15ec152cb70a334230f6c5d62c5bd963f1': {
125
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
126
- address: '0x6523ac15ec152cb70a334230f6c5d62c5bd963f1',
127
- },
128
- '0x6326debbaa15bcfe603d831e7d75f4fc10d9b43e': {
129
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
130
- address: '0x6326debbaa15bcfe603d831e7d75f4fc10d9b43e',
131
- },
132
- '0x4a4d7868390ef5cac51cda262888f34bd3025c3f': {
133
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
134
- address: '0x4a4d7868390ef5cac51cda262888f34bd3025c3f',
135
- },
136
- '0x50b085f2e5958c4a87baf93a8ab79f6bec068494': {
137
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
138
- address: '0x50b085f2e5958c4a87baf93a8ab79f6bec068494',
139
- },
140
- '0x9b52f13df69d79ec5aab6d1ace3157d29b409cc3': {
141
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
142
- address: '0x9b52f13df69d79ec5aab6d1ace3157d29b409cc3',
143
- },
144
- '0x8c1ab78601c259e1b43f19816923609dc7d7de9b': {
145
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
146
- address: '0x8c1ab78601c259e1b43f19816923609dc7d7de9b',
147
- },
148
- '0xe5f4b89e0a16578b3e0e7581327bdb4c712e44de': {
149
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
150
- address: '0xe5f4b89e0a16578b3e0e7581327bdb4c712e44de',
151
- },
152
- '0xd35B58386705CE75CE6d09842E38E9BE9CDe5bF6': {
153
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
154
- address: '0xd35B58386705CE75CE6d09842E38E9BE9CDe5bF6',
155
- },
156
- '0x5bd47ea4494e0f8de6e3ca10f1c05f55b72466b8': {
157
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
158
- address: '0x5bd47ea4494e0f8de6e3ca10f1c05f55b72466b8',
159
- },
160
- '0x88855cdF2b0A8413D470B86952E726684de915be': {
161
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
162
- address: '0x88855cdF2b0A8413D470B86952E726684de915be',
163
- },
164
- '0xad4753d045d3aed5c1a6606dfb6a7d7ad67c1ad7': {
165
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
166
- address: '0xad4753d045d3aed5c1a6606dfb6a7d7ad67c1ad7',
167
- },
168
- '0x67fe41A94e779CcFa22cff02cc2957DC9C0e4286': {
169
- name: ImplementationNames.FACTORY_PLAIN_2_CRV_EMA,
170
- address: '0x67fe41A94e779CcFa22cff02cc2957DC9C0e4286',
171
- liquidityApiSlug: '/factory-crvusd',
172
- },
173
- '0xdcc91f930b42619377c200ba05b7513f2958b202': {
174
- name: ImplementationNames.FACTORY_STABLE_NG,
175
- address: '0xdcc91f930b42619377c200ba05b7513f2958b202',
176
- liquidityApiSlug: '/factory-stable-ng',
177
- isStoreRateSupported: true,
178
- },
179
- '0x933f4769dcc27fc7345d9d5975ae48ec4d0f829c': {
180
- name: ImplementationNames.FACTORY_STABLE_NG,
181
- address: '0x933f4769dcc27fc7345d9d5975ae48ec4d0f829c',
182
- liquidityApiSlug: '/factory-stable-ng',
183
- isStoreRateSupported: true,
184
- },
185
- '0xede71f77d7c900dca5892720e76316c6e575f0f7': {
186
- name: ImplementationNames.FACTORY_STABLE_NG,
187
- address: '0xede71f77d7c900dca5892720e76316c6e575f0f7',
188
- liquidityApiSlug: '/factory-stable-ng',
189
- isStoreRateSupported: true,
190
- },
191
- '0xdd7ebb1c49780519dd9755b8b1a23a6f42ce099e': {
192
- name: ImplementationNames.FACTORY_STABLE_NG,
193
- address: '0xdd7ebb1c49780519dd9755b8b1a23a6f42ce099e',
194
- liquidityApiSlug: '/factory-stable-ng',
195
- isStoreRateSupported: true,
196
- },
197
- },
198
- customPools: {
199
- '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2': {
200
- name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_FRAX,
201
- address: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
202
- lpTokenAddress: '0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC',
203
- liquidityApiSlug: '/main',
204
- coinsInputType: 'uint256',
205
- balancesInputType: 'uint256',
206
- useForPricing: false,
207
- },
208
- '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714': {
209
- name: CustomImplementationNames.CUSTOM_PLAIN_3COIN_SBTC,
210
- address: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
211
- lpTokenAddress: '0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3',
212
- liquidityApiSlug: '/main',
213
- coinsInputType: 'int128',
214
- balancesInputType: 'int128',
215
- useForPricing: false,
216
- },
217
- '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7': {
218
- name: CustomImplementationNames.CUSTOM_PLAIN_3COIN_THREE,
219
- address: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
220
- lpTokenAddress: '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
221
- liquidityApiSlug: '/main',
222
- coinsInputType: 'uint256',
223
- balancesInputType: 'uint256',
224
- useForPricing: false,
225
- },
226
- '0x93054188d876f558f4a66B2EF1d97d16eDf0895B': {
227
- name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_RENBTC,
228
- address: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
229
- lpTokenAddress: '0x49849C98ae39Fff122806C06791Fa73784FB3675',
230
- liquidityApiSlug: '/main',
231
- coinsInputType: 'int128',
232
- balancesInputType: 'int128',
233
- useForPricing: false,
234
- },
235
- '0xf253f83aca21aabd2a20553ae0bf7f65c755a07f': {
236
- name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_WBTC,
237
- address: '0xf253f83aca21aabd2a20553ae0bf7f65c755a07f',
238
- lpTokenAddress: '0x051d7e5609917Bd9b73f04BAc0DED8Dd46a74301',
239
- liquidityApiSlug: '/main',
240
- coinsInputType: 'uint256',
241
- balancesInputType: 'uint256',
242
- useForPricing: true,
243
- },
244
- },
245
- },
246
- [Network.POLYGON]: {
247
- factories: [
248
- {
249
- address: '0x722272D36ef0Da72FF51c5A65Db7b870E2e8D4ee',
250
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
251
- },
252
- {
253
- address: '0x1764ee18e8B3ccA4787249Ceb249356192594585', // factory stable ng
254
- isStableNg: true,
255
- },
256
- ],
257
- stateUpdatePeriodMs: 2 * 1000,
258
- disabledPools: new Set([
259
- '0x666Dc3b4baBfd063FaF965BD020024AF0dC51B64',
260
- '0x88C4D6534165510b2E2CAF0A130d4F70aA4B6d71',
261
- '0xE4199bC5C5C1F63dbA47B56B6dB7144C51CF0bF8',
262
- '0xdaedd59fa2c5c63d46a3bae5ed115247df9eb6ec',
263
- '0x3ce39825ab258693cedb8daf1db441627d011371',
264
- '0x632F9Be4Bf42e0dBb461CFcC0CF788538a49ED6D',
265
- '0x1197Ae7F43695Be80127365b494E8BF850f4752A',
266
- '0x40caB7C05fc1686e198C8d6d6aA4aaCF77BE8590',
267
- '0x64FFf0e27c223097c824f9d9278eFD5B55c3430e',
268
- ]),
269
- disabledImplementations: new Set([]),
270
- factoryPoolImplementations: {
271
- '0x571FF5b7b346F706aa48d696a9a4a288e9Bb4091': {
272
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
273
- address: '0x571FF5b7b346F706aa48d696a9a4a288e9Bb4091',
274
- },
275
- '0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9': {
276
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
277
- address: '0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9',
278
- },
279
- '0xAe00f57663F4C85FC948B13963cd4627dAF01061': {
280
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
281
- address: '0xAe00f57663F4C85FC948B13963cd4627dAF01061',
282
- },
283
- '0x8101e6760130be2c8ace79643ab73500571b7162': {
284
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
285
- address: '0x8101e6760130be2c8ace79643ab73500571b7162',
286
- },
287
- '0x493084ca44c779af27a416ac1f71e3823bf21b53': {
288
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
289
- address: '0x493084ca44c779af27a416ac1f71e3823bf21b53',
290
- },
291
- '0x9b4ed6f8904e976146b3dc0233cd48cf81835240': {
292
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
293
- address: '0x9b4ed6f8904e976146b3dc0233cd48cf81835240',
294
- },
295
- '0xa9134fae98f92217f457918505375ae91fdc5e3c': {
296
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
297
- address: '0xa9134fae98f92217f457918505375ae91fdc5e3c',
298
- },
299
- '0xcc9fd96c26c450dd4580893aff75efd5cb6c12fc': {
300
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
301
- address: '0xcc9fd96c26c450dd4580893aff75efd5cb6c12fc',
302
- },
303
- '0x991b05d5316fa3a2c053f84658b84987cd5c9970': {
304
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
305
- address: '0x991b05d5316fa3a2c053f84658b84987cd5c9970',
306
- },
307
- '0xC7c46488566b9ef9B981b87E328939CaA5ca152f': {
308
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
309
- address: '0xC7c46488566b9ef9B981b87E328939CaA5ca152f',
310
- },
311
- '0xf31bcdf0b9a5ecd7ab463eb905551fbc32e51856': {
312
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
313
- address: '0xf31bcdf0b9a5ecd7ab463eb905551fbc32e51856',
314
- },
315
- '0xAc273d5b4FC06625d8b1abA3BE8De15bDFb8E39f': {
316
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
317
- address: '0xAc273d5b4FC06625d8b1abA3BE8De15bDFb8E39f',
318
- },
319
- '0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c': {
320
- name: ImplementationNames.FACTORY_META_USD,
321
- address: '0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c',
322
- basePoolAddress: '0x445FE580eF8d70FF569aB36e80c647af338db351',
323
- },
324
- '0x39fE1824f98CD828050D7c51dA443E84121c7cf1': {
325
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
326
- address: '0x39fE1824f98CD828050D7c51dA443E84121c7cf1',
327
- basePoolAddress: '0x445FE580eF8d70FF569aB36e80c647af338db351',
328
- },
329
- '0xC05EB760A135d3D0c839f1141423002681157a17': {
330
- name: ImplementationNames.FACTORY_META_BTC,
331
- address: '0xC05EB760A135d3D0c839f1141423002681157a17',
332
- basePoolAddress: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
333
- },
334
- '0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc': {
335
- name: ImplementationNames.FACTORY_META_BTC_BALANCES,
336
- address: '0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc',
337
- basePoolAddress: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
338
- },
339
- '0xe265fc390e9129b7e337da23cd42e00c34da2ce3': {
340
- name: ImplementationNames.FACTORY_STABLE_NG,
341
- address: '0xe265fc390e9129b7e337da23cd42e00c34da2ce3',
342
- liquidityApiSlug: '/factory-stable-ng',
343
- isStoreRateSupported: true,
344
- },
345
- '0xa7ba18eefcd9513230987ec2fab6711af5abd9c2': {
346
- name: ImplementationNames.FACTORY_STABLE_NG,
347
- address: '0xa7ba18eefcd9513230987ec2fab6711af5abd9c2',
348
- liquidityApiSlug: '/factory-stable-ng',
349
- isStoreRateSupported: true,
350
- },
351
- },
352
- customPools: {
353
- '0x445FE580eF8d70FF569aB36e80c647af338db351': {
354
- name: CustomImplementationNames.CUSTOM_POLYGON_3COIN_LENDING,
355
- address: '0x445FE580eF8d70FF569aB36e80c647af338db351',
356
- lpTokenAddress: '0xe7a24ef0c5e95ffb0f6684b813a78f2a3ad7d171',
357
- liquidityApiSlug: '/main',
358
- coinsInputType: 'uint256',
359
- balancesInputType: 'uint256',
360
- useForPricing: false,
361
- },
362
- '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67': {
363
- name: CustomImplementationNames.CUSTOM_POLYGON_2COIN_LENDING,
364
- address: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
365
- lpTokenAddress: '0xf8a57c1d3b9629b77b6726a042ca48990a84fb49',
366
- liquidityApiSlug: '/main',
367
- coinsInputType: 'uint256',
368
- balancesInputType: 'uint256',
369
- useForPricing: false,
370
- },
371
- },
372
- },
373
- [Network.FANTOM]: {
374
- factories: [
375
- {
376
- address: '0x686d67265703D1f124c45E33d47d794c566889Ba',
377
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
378
- },
379
- {
380
- address: '0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b', // factory stable ng
381
- isStableNg: true,
382
- },
383
- ],
384
- stateUpdatePeriodMs: 2 * 1000,
385
- disabledPools: new Set([]),
386
- disabledImplementations: new Set([]),
387
- factoryPoolImplementations: {
388
- '0x61E10659fe3aa93d036d099405224E4Ac24996d0': {
389
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
390
- address: '0x61E10659fe3aa93d036d099405224E4Ac24996d0',
391
- },
392
- '0xd9Acb0BAeeD77C99305017821167674Cc7e82f7a': {
393
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
394
- address: '0xd9Acb0BAeeD77C99305017821167674Cc7e82f7a',
395
- },
396
- '0xE6358f6a45B502477e83CC1CDa759f540E4459ee': {
397
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
398
- address: '0xE6358f6a45B502477e83CC1CDa759f540E4459ee',
399
- },
400
- '0xAD4768F408dD170e62E074188D81A29AE31B8Fd8': {
401
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
402
- address: '0xAD4768F408dD170e62E074188D81A29AE31B8Fd8',
403
- },
404
- '0x3cABd83bCa606768939B843f91df8f4963dBC079': {
405
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
406
- address: '0x3cABd83bCa606768939B843f91df8f4963dBC079',
407
- },
408
- '0xD1602F68CC7C4c7B59D686243EA35a9C73B0c6a2': {
409
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
410
- address: '0xD1602F68CC7C4c7B59D686243EA35a9C73B0c6a2',
411
- },
412
- '0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a': {
413
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
414
- address: '0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a',
415
- },
416
- '0x7Ee25A34C921E4009B726cC6be0643fd6a39DbfE': {
417
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
418
- address: '0x7Ee25A34C921E4009B726cC6be0643fd6a39DbfE',
419
- },
420
- '0xABE216918fFDa43B44e3FC09639Fd82fD3527D89': {
421
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
422
- address: '0xABE216918fFDa43B44e3FC09639Fd82fD3527D89',
423
- },
424
- '0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471': {
425
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
426
- address: '0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471',
427
- },
428
- '0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce': {
429
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
430
- address: '0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce',
431
- },
432
- '0x9D7C28226AA7142cBF234ab9aa9C203D095c528B': {
433
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
434
- address: '0x9D7C28226AA7142cBF234ab9aa9C203D095c528B',
435
- },
436
- '0xfCE359115dFe1533a2458650123F86C454BC0213': {
437
- name: ImplementationNames.FACTORY_META_USD,
438
- address: '0xfCE359115dFe1533a2458650123F86C454BC0213',
439
- basePoolAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
440
- },
441
- '0x09C62ad0694e3f1ad8cF8876aaBe56138C586f5F': {
442
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
443
- address: '0x09C62ad0694e3f1ad8cF8876aaBe56138C586f5F',
444
- basePoolAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
445
- },
446
- '0xC9438d8928486bD9621D326002F4672bF684187A': {
447
- name: ImplementationNames.FACTORY_META_BTC,
448
- address: '0xC9438d8928486bD9621D326002F4672bF684187A',
449
- basePoolAddress: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
450
- },
451
- '0x2b70A5B878665FfDB4A06Ba40a264d6c70f68F4B': {
452
- name: ImplementationNames.FACTORY_META_BTC_BALANCES,
453
- address: '0x2b70A5B878665FfDB4A06Ba40a264d6c70f68F4B',
454
- basePoolAddress: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
455
- },
456
- '0x210c806f6ae850279f7e298de749ec4b427d00dd': {
457
- name: ImplementationNames.FACTORY_META_USD,
458
- address: '0x210c806f6ae850279f7e298de749ec4b427d00dd',
459
- basePoolAddress: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
460
- },
461
- '0xf82162bb68ad5a168345bb7efb2faa0edcca5177': {
462
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
463
- address: '0xf82162bb68ad5a168345bb7efb2faa0edcca5177',
464
- basePoolAddress: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
465
- },
466
- '0x5702bdb1ec244704e3cbbaae11a0275ae5b07499': {
467
- name: ImplementationNames.FACTORY_STABLE_NG,
468
- address: '0x5702bdb1ec244704e3cbbaae11a0275ae5b07499',
469
- liquidityApiSlug: '/factory-stable-ng',
470
- isStoreRateSupported: true,
471
- },
472
- },
473
- customPools: {
474
- '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40': {
475
- name: CustomImplementationNames.CUSTOM_FANTOM_2COIN_USD,
476
- address: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
477
- lpTokenAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
478
- liquidityApiSlug: '/main',
479
- coinsInputType: 'uint256',
480
- balancesInputType: 'uint256',
481
- useForPricing: false,
482
- },
483
- '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604': {
484
- name: CustomImplementationNames.CUSTOM_FANTOM_2COIN_BTC,
485
- address: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
486
- lpTokenAddress: '0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858',
487
- liquidityApiSlug: '/main',
488
- coinsInputType: 'uint256',
489
- balancesInputType: 'uint256',
490
- useForPricing: false,
491
- },
492
- '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f': {
493
- name: CustomImplementationNames.CUSTOM_FANTOM_3COIN_LENDING,
494
- address: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
495
- lpTokenAddress: '0xD02a30d33153877BC20e5721ee53DeDEE0422B2F',
496
- liquidityApiSlug: '/main',
497
- coinsInputType: 'uint256',
498
- balancesInputType: 'uint256',
499
- useForPricing: false,
500
- },
501
- },
502
- },
503
- [Network.AVALANCHE]: {
504
- factories: [
505
- {
506
- address: '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
507
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
508
- },
509
- ],
510
- stateUpdatePeriodMs: 2 * 1000,
511
- // FIX: This must be removed when we go for full CurveV1 event based support
512
- disabledPools: new Set(['0x16a7da911a4dd1d83f3ff066fe28f3c792c50d90']),
513
- disabledImplementations: new Set([
514
- '0xa27f39e9c21b3376f43266e13ad5a5d6e9bdb320',
515
- '0x505c34ed8dbe96d2d5c7d83158aa844887770970',
516
- ]),
517
- factoryPoolImplementations: {
518
- '0x697434ca761d4f86b553784b69f4f37f5edf54df': {
519
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
520
- address: '0x697434ca761d4f86b553784b69f4f37f5edf54df',
521
- },
522
- '0xbdff0c27dd073c119ebcb1299a68a6a92ae607f0': {
523
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
524
- address: '0xbdff0c27dd073c119ebcb1299a68a6a92ae607f0',
525
- },
526
- '0x64448B78561690B70E17CBE8029a3e5c1bB7136e': {
527
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
528
- address: '0x64448B78561690B70E17CBE8029a3e5c1bB7136e',
529
- },
530
- '0x09672362833d8f703D5395ef3252D4Bfa51c15ca': {
531
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
532
- address: '0x09672362833d8f703D5395ef3252D4Bfa51c15ca',
533
- },
534
- '0x1de7f0866e2c4adAC7b457c58Cc25c8688CDa1f2': {
535
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
536
- address: '0x1de7f0866e2c4adAC7b457c58Cc25c8688CDa1f2',
537
- },
538
- '0x094d12e5b541784701FD8d65F11fc0598FBC6332': {
539
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
540
- address: '0x094d12e5b541784701FD8d65F11fc0598FBC6332',
541
- },
542
- '0xf1f85a74ad6c64315f85af52d3d46bf715236adc': {
543
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
544
- address: '0xf1f85a74ad6c64315f85af52d3d46bf715236adc',
545
- },
546
- '0xaa82ca713d94bba7a89ceab55314f9effeddc78c': {
547
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
548
- address: '0xaa82ca713d94bba7a89ceab55314f9effeddc78c',
549
- },
550
- '0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287': {
551
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
552
- address: '0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287',
553
- },
554
- '0x7d86446ddb609ed0f5f8684acf30380a356b2b4c': {
555
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
556
- address: '0x7d86446ddb609ed0f5f8684acf30380a356b2b4c',
557
- },
558
- '0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410': {
559
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
560
- address: '0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410',
561
- },
562
- '0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA': {
563
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
564
- address: '0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA',
565
- },
566
- '0xa237034249290de2b07988ac64b96f22c0e76fe0': {
567
- name: ImplementationNames.FACTORY_META_USD,
568
- address: '0xa237034249290de2b07988ac64b96f22c0e76fe0',
569
- basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
570
- },
571
- '0xc50c05ca1f8c2346664bd0d4a1eb6ac1da38414f': {
572
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
573
- address: '0xc50c05ca1f8c2346664bd0d4a1eb6ac1da38414f',
574
- basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
575
- },
576
- // Commented because these pools basics are not verified and looks very abandoned
577
- // '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320': {
578
- // name: ImplementationNames.FACTORY_META_BTC,
579
- // address: '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320',
580
- // },
581
- // '0x505C34ED8dBE96d2D5C7D83158aA844887770970': {
582
- // name: ImplementationNames.FACTORY_META_BTC_BALANCES,
583
- // address: '0x505C34ED8dBE96d2D5C7D83158aA844887770970',
584
- // },
585
- },
586
- customPools: {
587
- '0x7f90122BF0700F9E7e1F688fe926940E8839F353': {
588
- name: CustomImplementationNames.CUSTOM_AVALANCHE_3COIN_LENDING,
589
- address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
590
- lpTokenAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
591
- liquidityApiSlug: '/main',
592
- coinsInputType: 'uint256',
593
- balancesInputType: 'uint256',
594
- useForPricing: false,
595
- },
596
- // This contract is not verified. I think it is just abandoned. I am commenting both related
597
- // btc meta pools
598
- // ['']: {
599
- // name: '',
600
- // address: '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320',
601
- // lpTokenAddress: '',
602
- // liquidityApiSlug: '',
603
- // },
604
- },
605
- },
606
- [Network.ARBITRUM]: {
607
- factories: [
608
- {
609
- address: '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
610
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
611
- },
612
- {
613
- address: '0x9AF14D26075f142eb3F292D5065EB3faa646167b', // factory stable ng
614
- isStableNg: true,
615
- },
616
- ],
617
- stateUpdatePeriodMs: 2 * 1000,
618
- disabledPools: new Set([]),
619
- disabledImplementations: new Set([]),
620
- factoryPoolImplementations: {
621
- '0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62': {
622
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
623
- address: '0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62',
624
- },
625
- '0xD68970e266cE1A015953897C7055a5E0bC657Af8': {
626
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
627
- address: '0xD68970e266cE1A015953897C7055a5E0bC657Af8',
628
- },
629
- '0x7DA64233Fefb352f8F501B357c018158ED8aA455': {
630
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
631
- address: '0x7DA64233Fefb352f8F501B357c018158ED8aA455',
632
- },
633
- '0x0100fBf414071977B19fC38e6fc7c32FE444F5C9': {
634
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
635
- address: '0x0100fBf414071977B19fC38e6fc7c32FE444F5C9',
636
- },
637
- '0xe381C25de995d62b453aF8B931aAc84fcCaa7A62': {
638
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
639
- address: '0xe381C25de995d62b453aF8B931aAc84fcCaa7A62',
640
- },
641
- '0xc379bA7b8e1c6C48D64e1cf9dD602C97c9fD0F40': {
642
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
643
- address: '0xc379bA7b8e1c6C48D64e1cf9dD602C97c9fD0F40',
644
- },
645
- '0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0': {
646
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
647
- address: '0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0',
648
- },
649
- '0x8866414733F22295b7563f9C5299715D2D76CAf4': {
650
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
651
- address: '0x8866414733F22295b7563f9C5299715D2D76CAf4',
652
- },
653
- '0x8d53E5De033078367Ad91527c53abfd1Eb6bfa86': {
654
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
655
- address: '0x8d53E5De033078367Ad91527c53abfd1Eb6bfa86',
656
- },
657
- '0x2ac56cEBc2D27c9bB51a11773355E44371Eb88D3': {
658
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
659
- address: '0x2ac56cEBc2D27c9bB51a11773355E44371Eb88D3',
660
- },
661
- '0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08': {
662
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
663
- address: '0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08',
664
- },
665
- '0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF': {
666
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
667
- address: '0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF',
668
- },
669
- '0x09672362833d8f703D5395ef3252D4Bfa51c15ca': {
670
- name: ImplementationNames.FACTORY_META_USD,
671
- address: '0x09672362833d8f703D5395ef3252D4Bfa51c15ca',
672
- basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
673
- },
674
- '0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5': {
675
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
676
- address: '0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5',
677
- basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
678
- },
679
- '0x8DEb66a4A40E370355bEe35f12E55Fe9c755d686': {
680
- name: ImplementationNames.FACTORY_META_USD,
681
- address: '0x8DEb66a4A40E370355bEe35f12E55Fe9c755d686',
682
- basePoolAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
683
- },
684
- '0x3edE9b145F82e9e46C03f8A8F67B77aEE847b632': {
685
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
686
- address: '0x3edE9b145F82e9e46C03f8A8F67B77aEE847b632',
687
- basePoolAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
688
- },
689
- '0x094d12e5b541784701FD8d65F11fc0598FBC6332': {
690
- name: ImplementationNames.FACTORY_META_BTC,
691
- address: '0x094d12e5b541784701FD8d65F11fc0598FBC6332',
692
- basePoolAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
693
- },
694
- '0xF1f85a74AD6c64315F85af52d3d46bF715236ADc': {
695
- name: ImplementationNames.FACTORY_META_BTC_BALANCES,
696
- address: '0xF1f85a74AD6c64315F85af52d3d46bF715236ADc',
697
- basePoolAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
698
- },
699
- '0x73ec37618683c274d0bbf5f5726aa856b2bdab81': {
700
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
701
- address: '0x73ec37618683c274d0bbf5f5726aa856b2bdab81',
702
- customGasCost: 130_000,
703
- },
704
- '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5': {
705
- name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
706
- address: '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5',
707
- customGasCost: 130_000,
708
- isStoreRateSupported: true,
709
- },
710
- '0xf6841c27fe35ed7069189afd5b81513578afd7ff': {
711
- name: ImplementationNames.FACTORY_STABLE_NG,
712
- address: '0xf6841c27fe35ed7069189afd5b81513578afd7ff',
713
- liquidityApiSlug: '/factory-stable-ng',
714
- isStoreRateSupported: true,
715
- },
716
- '0xff02cbd91f57a778bab7218da562594a680b8b61': {
717
- name: ImplementationNames.FACTORY_STABLE_NG,
718
- address: '0xff02cbd91f57a778bab7218da562594a680b8b61',
719
- liquidityApiSlug: '/factory-stable-ng',
720
- isStoreRateSupported: true,
721
- },
722
- },
723
- customPools: {
724
- '0x7f90122BF0700F9E7e1F688fe926940E8839F353': {
725
- name: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_USD,
726
- address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
727
- lpTokenAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
728
- liquidityApiSlug: '/main',
729
- coinsInputType: 'uint256',
730
- balancesInputType: 'uint256',
731
- useForPricing: false,
732
- },
733
- '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5': {
734
- name: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC,
735
- address: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
736
- lpTokenAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
737
- liquidityApiSlug: '/factory',
738
- coinsInputType: 'uint256',
739
- balancesInputType: 'uint256',
740
- useForPricing: false,
741
- },
742
- '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb': {
743
- name: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_BTC,
744
- address: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
745
- lpTokenAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
746
- liquidityApiSlug: '/main',
747
- coinsInputType: 'uint256',
748
- balancesInputType: 'uint256',
749
- useForPricing: false,
750
- },
751
- },
752
- },
753
- [Network.OPTIMISM]: {
754
- factories: [
755
- {
756
- address: '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
757
- maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
758
- },
759
- {
760
- address: '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E', // factory stable ng
761
- isStableNg: true,
762
- },
763
- ],
764
- stateUpdatePeriodMs: 2 * 1000,
765
- disabledPools: new Set([]),
766
- disabledImplementations: new Set([]),
767
- factoryPoolImplementations: {
768
- '0xC2b1DF84112619D190193E48148000e3990Bf627': {
769
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
770
- address: '0xC2b1DF84112619D190193E48148000e3990Bf627',
771
- },
772
- '0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90': {
773
- name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
774
- address: '0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90',
775
- },
776
- '0x4f3E8F405CF5aFC05D68142F3783bDfE13811522': {
777
- name: ImplementationNames.FACTORY_PLAIN_2_ETH,
778
- address: '0x4f3E8F405CF5aFC05D68142F3783bDfE13811522',
779
- },
780
- '0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1': {
781
- name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
782
- address: '0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1',
783
- },
784
- '0x78D0fC2B9D5AE65512DB242e424a9c683F18c243': {
785
- name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
786
- address: '0x78D0fC2B9D5AE65512DB242e424a9c683F18c243',
787
- },
788
- '0x35796DAc54f144DFBAD1441Ec7C32313A7c29F39': {
789
- name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
790
- address: '0x35796DAc54f144DFBAD1441Ec7C32313A7c29F39',
791
- },
792
- '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb': {
793
- name: ImplementationNames.FACTORY_PLAIN_3_ETH,
794
- address: '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb',
795
- },
796
- '0x6D65b498cb23deAba52db31c93Da9BFFb340FB8F': {
797
- name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
798
- address: '0x6D65b498cb23deAba52db31c93Da9BFFb340FB8F',
799
- },
800
- '0x445FE580eF8d70FF569aB36e80c647af338db351': {
801
- name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
802
- address: '0x445FE580eF8d70FF569aB36e80c647af338db351',
803
- },
804
- '0xF6bDc2619FFDA72c537Cd9605e0A274Dc48cB1C9': {
805
- name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
806
- address: '0xF6bDc2619FFDA72c537Cd9605e0A274Dc48cB1C9',
807
- },
808
- '0x1AEf73d49Dedc4b1778d0706583995958Dc862e6': {
809
- name: ImplementationNames.FACTORY_PLAIN_4_ETH,
810
- address: '0x1AEf73d49Dedc4b1778d0706583995958Dc862e6',
811
- },
812
- '0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6': {
813
- name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
814
- address: '0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6',
815
- },
816
- '0x78CF256256C8089d68Cde634Cf7cDEFb39286470': {
817
- name: ImplementationNames.FACTORY_META_USD,
818
- address: '0x78CF256256C8089d68Cde634Cf7cDEFb39286470',
819
- basePoolAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
820
- },
821
- '0xADf698e4d8Df08b3E2c79682891636eF00F6e205': {
822
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
823
- address: '0xADf698e4d8Df08b3E2c79682891636eF00F6e205',
824
- basePoolAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
825
- },
826
- '0xe8269B33E47761f552E1a3070119560d5fa8bBD6': {
827
- name: ImplementationNames.FACTORY_META_USD,
828
- address: '0xe8269B33E47761f552E1a3070119560d5fa8bBD6',
829
- basePoolAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
830
- },
831
- '0x114C4042B11a2b16F58Fe1BFe847589a122F678a': {
832
- name: ImplementationNames.FACTORY_META_USD_BALANCES,
833
- address: '0x114C4042B11a2b16F58Fe1BFe847589a122F678a',
834
- basePoolAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
835
- },
836
- '0x73ec37618683c274d0bbf5f5726aa856b2bdab81': {
837
- name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
838
- address: '0x73ec37618683c274d0bbf5f5726aa856b2bdab81',
839
- customGasCost: 130_000,
840
- },
841
- '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5': {
842
- name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
843
- address: '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5',
844
- customGasCost: 130_000,
845
- isStoreRateSupported: true,
846
- },
847
- '0x635742dcc8313dcf8c904206037d962c042eafbd': {
848
- name: ImplementationNames.FACTORY_STABLE_NG,
849
- address: '0x635742dcc8313dcf8c904206037d962c042eafbd',
850
- liquidityApiSlug: '/factory-stable-ng',
851
- isStoreRateSupported: true,
852
- },
853
- },
854
- customPools: {
855
- '0x1337BedC9D22ecbe766dF105c9623922A27963EC': {
856
- name: CustomImplementationNames.CUSTOM_OPTIMISM_3COIN_USD,
857
- address: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
858
- lpTokenAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
859
- liquidityApiSlug: '/main',
860
- coinsInputType: 'uint256',
861
- balancesInputType: 'uint256',
862
- useForPricing: false,
863
- },
864
- '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7': {
865
- name: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC,
866
- address: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
867
- lpTokenAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
868
- liquidityApiSlug: '/factory',
869
- coinsInputType: 'uint256',
870
- balancesInputType: 'uint256',
871
- useForPricing: false,
872
- },
873
- },
874
- },
875
- },
876
- };
877
-
878
- export const Adapters: Record<number, AdapterMappings> = {
879
- [Network.MAINNET]: {
880
- [SwapSide.SELL]: [
881
- {
882
- name: 'Adapter01',
883
- index: 3,
884
- },
885
- ],
886
- },
887
- [Network.BSC]: {
888
- [SwapSide.SELL]: [
889
- // use for beltfi (deprecated)
890
- {
891
- name: 'BscAdapter01',
892
- index: 2,
893
- },
894
- ],
895
- },
896
- [Network.POLYGON]: {
897
- [SwapSide.SELL]: [
898
- {
899
- name: 'PolygonAdapter01',
900
- index: 3,
901
- },
902
- ],
903
- },
904
- [Network.AVALANCHE]: {
905
- [SwapSide.SELL]: [
906
- {
907
- name: 'AvalancheAdapter01',
908
- index: 5,
909
- },
910
- ],
911
- },
912
- [Network.FANTOM]: {
913
- [SwapSide.SELL]: [
914
- {
915
- name: 'FantomAdapter01',
916
- index: 3,
917
- },
918
- ],
919
- },
920
- [Network.ARBITRUM]: {
921
- [SwapSide.SELL]: [
922
- {
923
- name: 'ArbitrumAdapter01',
924
- index: 6,
925
- },
926
- ],
927
- },
928
- [Network.OPTIMISM]: {
929
- [SwapSide.SELL]: [
930
- {
931
- name: 'OptimismAdapter01',
932
- index: 5,
933
- },
934
- ],
935
- },
936
- };
937
-
938
- // This become quite ugly :(
939
- // I just wanted to make sure that every address is lowercased and it is not missed it config changes at some point
940
- const configAddressesNormalizer = (
941
- config: DexConfigMap<DexParams>,
942
- ): DexConfigMap<DexParams> => {
943
- for (const dexKey of Object.keys(config)) {
944
- for (const network of Object.keys(config[dexKey])) {
945
- const _config = config[dexKey][+network];
946
-
947
- // Normalize custom pool fields
948
- Object.keys(_config.customPools).forEach(p => {
949
- _config.customPools[p].address =
950
- _config.customPools[p].address.toLowerCase();
951
- _config.customPools[p].lpTokenAddress =
952
- _config.customPools[p].lpTokenAddress.toLowerCase();
953
- });
954
-
955
- const customPools = Object.entries(_config.customPools).reduce<
956
- Record<string, CustomPoolConfig>
957
- >((acc, [customPoolAddress, customPoolConfig]) => {
958
- const normalizedImplementation: CustomPoolConfig = {
959
- name: customPoolConfig.name,
960
- liquidityApiSlug: customPoolConfig.liquidityApiSlug,
961
- coinsInputType: customPoolConfig.coinsInputType,
962
- balancesInputType: customPoolConfig.balancesInputType,
963
- address: normalizeAddress(customPoolConfig.address),
964
- lpTokenAddress: normalizeAddress(customPoolConfig.lpTokenAddress),
965
- useForPricing: customPoolConfig.useForPricing,
966
- };
967
- acc[normalizeAddress(customPoolAddress)] = normalizedImplementation;
968
- return acc;
969
- }, {});
970
-
971
- // Had to recreate object to change key to lower case
972
- const factoryPoolImplementations = Object.entries(
973
- _config.factoryPoolImplementations,
974
- ).reduce<Record<string, FactoryPoolImplementations>>(
975
- (acc, [implementationAddress, implementationConfig]) => {
976
- const normalizedImplementation: FactoryPoolImplementations = {
977
- name: implementationConfig.name,
978
- address: normalizeAddress(implementationConfig.address),
979
- basePoolAddress: implementationConfig.basePoolAddress
980
- ? normalizeAddress(implementationConfig.basePoolAddress)
981
- : undefined,
982
- isStoreRateSupported: implementationConfig.isStoreRateSupported,
983
- liquidityApiSlug: implementationConfig.liquidityApiSlug,
984
- };
985
- acc[normalizeAddress(implementationAddress)] =
986
- normalizedImplementation;
987
- return acc;
988
- },
989
- {},
990
- );
991
-
992
- // Unite everything into top level config
993
- const normalizedConfig: DexParams = {
994
- factories: _config.factories
995
- ? _config.factories.map(e => ({
996
- ...e,
997
- address: e.address.toLowerCase(),
998
- }))
999
- : _config.factories,
1000
- stateUpdatePeriodMs: _config.stateUpdatePeriodMs,
1001
- factoryPoolImplementations,
1002
- customPools,
1003
- disabledPools: new Set(
1004
- Array.from(_config.disabledPools).map(normalizeAddress),
1005
- ),
1006
- disabledImplementations: new Set(
1007
- Array.from(_config.disabledImplementations).map(normalizeAddress),
1008
- ),
1009
- };
1010
- config[dexKey][+network] = normalizedConfig;
1011
- }
1012
- }
1013
- return config;
1014
- };
1015
-
1016
- configAddressesNormalizer(CurveV1FactoryConfig);
1017
-
1018
- export { CurveV1FactoryConfig };
1
+ import {
2
+ CustomImplementationNames,
3
+ CustomPoolConfig,
4
+ DexParams,
5
+ FactoryImplementationNames,
6
+ FactoryPoolImplementations,
7
+ ImplementationNames,
8
+ } from './types';
9
+ import { DexConfigMap, AdapterMappings } from '../../types';
10
+ import { Network, SwapSide } from '../../constants';
11
+ import { normalizeAddress } from '../../utils';
12
+ import { FACTORY_MAX_PLAIN_COINS } from './constants';
13
+
14
+ // stable ng factories addresses are taken from https://github.com/curvefi/curve-api/blob/main/constants/configs/configs.js
15
+ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
16
+ CurveV1Factory: {
17
+ [Network.MAINNET]: {
18
+ factories: [
19
+ {
20
+ address: '0xB9fC157394Af804a3578134A6585C0dc9cc990d4',
21
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
22
+ },
23
+ {
24
+ address: '0x4f8846ae9380b90d2e71d5e3d042dff3e7ebb40d',
25
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
26
+ },
27
+ {
28
+ address: '0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf', // factory stable ng
29
+ isStableNg: true,
30
+ },
31
+ ],
32
+ stateUpdatePeriodMs: 5 * 1000,
33
+ disabledPools: new Set([
34
+ '0x28B0Cf1baFB707F2c6826d10caf6DD901a6540C5', // It is rug pool token
35
+ ]),
36
+ disabledImplementations: new Set([]),
37
+ factoryPoolImplementations: {
38
+ '0x2f956eee002b0debd468cf2e0490d1aec65e027f': {
39
+ name: ImplementationNames.FACTORY_V1_META_BTC,
40
+ address: '0x2f956eee002b0debd468cf2e0490d1aec65e027f',
41
+ basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
42
+ },
43
+ '0x5f890841f657d90e081babdb532a05996af79fe6': {
44
+ name: ImplementationNames.FACTORY_V1_META_USD,
45
+ address: '0x5f890841f657d90e081babdb532a05996af79fe6',
46
+ basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
47
+ },
48
+ '0xc6a8466d128fbfd34ada64a9fffce325d57c9a52': {
49
+ name: ImplementationNames.FACTORY_META_BTC,
50
+ address: '0xc6a8466d128fbfd34ada64a9fffce325d57c9a52',
51
+ basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
52
+ },
53
+ '0xc4c78b08fa0c3d0a312605634461a88184ecd630': {
54
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES,
55
+ address: '0xc4c78b08fa0c3d0a312605634461a88184ecd630',
56
+ basePoolAddress: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
57
+ },
58
+ '0xecaaecd9d2193900b424774133b1f51ae0f29d9e': {
59
+ name: ImplementationNames.FACTORY_META_BTC_REN,
60
+ address: '0xecaaecd9d2193900b424774133b1f51ae0f29d9e',
61
+ basePoolAddress: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
62
+ },
63
+ '0x40fd58d44cfe63e8517c9bb3ac98676838ea56a8': {
64
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES_REN,
65
+ address: '0x40fd58d44cfe63e8517c9bb3ac98676838ea56a8',
66
+ basePoolAddress: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
67
+ },
68
+ '0x213be373fdff327658139c7df330817dad2d5bbe': {
69
+ name: ImplementationNames.FACTORY_META_USD,
70
+ address: '0x213be373fdff327658139c7df330817dad2d5bbe',
71
+ basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
72
+ },
73
+ '0x55aa9bf126bcabf0bdc17fa9e39ec9239e1ce7a9': {
74
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
75
+ address: '0x55aa9bf126bcabf0bdc17fa9e39ec9239e1ce7a9',
76
+ basePoolAddress: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
77
+ },
78
+ '0x33bb0e62d5e8c688e645dd46dfb48cd613250067': {
79
+ name: ImplementationNames.FACTORY_META_USD_FRAX_USDC,
80
+ address: '0x33bb0e62d5e8c688e645dd46dfb48cd613250067',
81
+ basePoolAddress: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
82
+ },
83
+ '0x2eb24483ef551da247ab87cf18e1cc980073032d': {
84
+ name: ImplementationNames.FACTORY_META_USD_BALANCES_FRAX_USDC,
85
+ address: '0x2eb24483ef551da247ab87cf18e1cc980073032d',
86
+ basePoolAddress: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
87
+ },
88
+ '0x008cfa89df5b0c780ca3462fc2602d7f8c7ac315': {
89
+ name: ImplementationNames.FACTORY_META_BTC_SBTC2,
90
+ address: '0x008cfa89df5b0c780ca3462fc2602d7f8c7ac315',
91
+ basePoolAddress: '0xf253f83AcA21aAbD2A20553AE0BF7F65C755A07F',
92
+ },
93
+ '0xabc533ebcdded41215c46ee078c5818b5b0a252f': {
94
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES_SBTC2,
95
+ address: '0xabc533ebcdded41215c46ee078c5818b5b0a252f',
96
+ basePoolAddress: '0xf253f83AcA21aAbD2A20553AE0BF7F65C755A07F',
97
+ },
98
+ '0xc629a01ec23ab04e1050500a3717a2a5c0701497': {
99
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
100
+ address: '0xc629a01ec23ab04e1050500a3717a2a5c0701497',
101
+ customGasCost: 130_000,
102
+ },
103
+ '0x94b4dfd9ba5865cc931195c99a2db42f3fc5d45b': {
104
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA,
105
+ address: '0x94b4dfd9ba5865cc931195c99a2db42f3fc5d45b',
106
+ customGasCost: 130_000,
107
+ },
108
+ '0x847ee1227a9900b73aeeb3a47fac92c52fd54ed9': {
109
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
110
+ address: '0x847ee1227a9900b73aeeb3a47fac92c52fd54ed9',
111
+ customGasCost: 130_000,
112
+ isStoreRateSupported: true,
113
+ },
114
+ '0x1713141278648a4edd5b027fdbd448bb4a13ac0f': {
115
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
116
+ address: '0x1713141278648a4edd5b027fdbd448bb4a13ac0f',
117
+ customGasCost: 130_000,
118
+ isStoreRateSupported: true,
119
+ },
120
+ '0x24d937143d3f5cf04c72ba112735151a8cae2262': {
121
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
122
+ address: '0x24d937143d3f5cf04c72ba112735151a8cae2262',
123
+ },
124
+ '0x6523ac15ec152cb70a334230f6c5d62c5bd963f1': {
125
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
126
+ address: '0x6523ac15ec152cb70a334230f6c5d62c5bd963f1',
127
+ },
128
+ '0x6326debbaa15bcfe603d831e7d75f4fc10d9b43e': {
129
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
130
+ address: '0x6326debbaa15bcfe603d831e7d75f4fc10d9b43e',
131
+ },
132
+ '0x4a4d7868390ef5cac51cda262888f34bd3025c3f': {
133
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
134
+ address: '0x4a4d7868390ef5cac51cda262888f34bd3025c3f',
135
+ },
136
+ '0x50b085f2e5958c4a87baf93a8ab79f6bec068494': {
137
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
138
+ address: '0x50b085f2e5958c4a87baf93a8ab79f6bec068494',
139
+ },
140
+ '0x9b52f13df69d79ec5aab6d1ace3157d29b409cc3': {
141
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
142
+ address: '0x9b52f13df69d79ec5aab6d1ace3157d29b409cc3',
143
+ },
144
+ '0x8c1ab78601c259e1b43f19816923609dc7d7de9b': {
145
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
146
+ address: '0x8c1ab78601c259e1b43f19816923609dc7d7de9b',
147
+ },
148
+ '0xe5f4b89e0a16578b3e0e7581327bdb4c712e44de': {
149
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
150
+ address: '0xe5f4b89e0a16578b3e0e7581327bdb4c712e44de',
151
+ },
152
+ '0xd35B58386705CE75CE6d09842E38E9BE9CDe5bF6': {
153
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
154
+ address: '0xd35B58386705CE75CE6d09842E38E9BE9CDe5bF6',
155
+ },
156
+ '0x5bd47ea4494e0f8de6e3ca10f1c05f55b72466b8': {
157
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
158
+ address: '0x5bd47ea4494e0f8de6e3ca10f1c05f55b72466b8',
159
+ },
160
+ '0x88855cdF2b0A8413D470B86952E726684de915be': {
161
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
162
+ address: '0x88855cdF2b0A8413D470B86952E726684de915be',
163
+ },
164
+ '0xad4753d045d3aed5c1a6606dfb6a7d7ad67c1ad7': {
165
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
166
+ address: '0xad4753d045d3aed5c1a6606dfb6a7d7ad67c1ad7',
167
+ },
168
+ '0x67fe41A94e779CcFa22cff02cc2957DC9C0e4286': {
169
+ name: ImplementationNames.FACTORY_PLAIN_2_CRV_EMA,
170
+ address: '0x67fe41A94e779CcFa22cff02cc2957DC9C0e4286',
171
+ liquidityApiSlug: '/factory-crvusd',
172
+ },
173
+ '0xdcc91f930b42619377c200ba05b7513f2958b202': {
174
+ name: ImplementationNames.FACTORY_STABLE_NG,
175
+ address: '0xdcc91f930b42619377c200ba05b7513f2958b202',
176
+ liquidityApiSlug: '/factory-stable-ng',
177
+ isStoreRateSupported: true,
178
+ },
179
+ '0x933f4769dcc27fc7345d9d5975ae48ec4d0f829c': {
180
+ name: ImplementationNames.FACTORY_STABLE_NG,
181
+ address: '0x933f4769dcc27fc7345d9d5975ae48ec4d0f829c',
182
+ liquidityApiSlug: '/factory-stable-ng',
183
+ isStoreRateSupported: true,
184
+ },
185
+ '0xede71f77d7c900dca5892720e76316c6e575f0f7': {
186
+ name: ImplementationNames.FACTORY_STABLE_NG,
187
+ address: '0xede71f77d7c900dca5892720e76316c6e575f0f7',
188
+ liquidityApiSlug: '/factory-stable-ng',
189
+ isStoreRateSupported: true,
190
+ },
191
+ '0xdd7ebb1c49780519dd9755b8b1a23a6f42ce099e': {
192
+ name: ImplementationNames.FACTORY_STABLE_NG,
193
+ address: '0xdd7ebb1c49780519dd9755b8b1a23a6f42ce099e',
194
+ liquidityApiSlug: '/factory-stable-ng',
195
+ isStoreRateSupported: true,
196
+ },
197
+ },
198
+ customPools: {
199
+ '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2': {
200
+ name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_FRAX,
201
+ address: '0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2',
202
+ lpTokenAddress: '0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC',
203
+ liquidityApiSlug: '/main',
204
+ coinsInputType: 'uint256',
205
+ balancesInputType: 'uint256',
206
+ useForPricing: false,
207
+ },
208
+ '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714': {
209
+ name: CustomImplementationNames.CUSTOM_PLAIN_3COIN_SBTC,
210
+ address: '0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714',
211
+ lpTokenAddress: '0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3',
212
+ liquidityApiSlug: '/main',
213
+ coinsInputType: 'int128',
214
+ balancesInputType: 'int128',
215
+ useForPricing: false,
216
+ },
217
+ '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7': {
218
+ name: CustomImplementationNames.CUSTOM_PLAIN_3COIN_THREE,
219
+ address: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
220
+ lpTokenAddress: '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
221
+ liquidityApiSlug: '/main',
222
+ coinsInputType: 'uint256',
223
+ balancesInputType: 'uint256',
224
+ useForPricing: false,
225
+ },
226
+ '0x93054188d876f558f4a66B2EF1d97d16eDf0895B': {
227
+ name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_RENBTC,
228
+ address: '0x93054188d876f558f4a66B2EF1d97d16eDf0895B',
229
+ lpTokenAddress: '0x49849C98ae39Fff122806C06791Fa73784FB3675',
230
+ liquidityApiSlug: '/main',
231
+ coinsInputType: 'int128',
232
+ balancesInputType: 'int128',
233
+ useForPricing: false,
234
+ },
235
+ '0xf253f83aca21aabd2a20553ae0bf7f65c755a07f': {
236
+ name: CustomImplementationNames.CUSTOM_PLAIN_2COIN_WBTC,
237
+ address: '0xf253f83aca21aabd2a20553ae0bf7f65c755a07f',
238
+ lpTokenAddress: '0x051d7e5609917Bd9b73f04BAc0DED8Dd46a74301',
239
+ liquidityApiSlug: '/main',
240
+ coinsInputType: 'uint256',
241
+ balancesInputType: 'uint256',
242
+ useForPricing: true,
243
+ },
244
+ },
245
+ },
246
+ [Network.POLYGON]: {
247
+ factories: [
248
+ {
249
+ address: '0x722272D36ef0Da72FF51c5A65Db7b870E2e8D4ee',
250
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
251
+ },
252
+ {
253
+ address: '0x1764ee18e8B3ccA4787249Ceb249356192594585', // factory stable ng
254
+ isStableNg: true,
255
+ },
256
+ ],
257
+ stateUpdatePeriodMs: 2 * 1000,
258
+ disabledPools: new Set([
259
+ '0x666Dc3b4baBfd063FaF965BD020024AF0dC51B64',
260
+ '0x88C4D6534165510b2E2CAF0A130d4F70aA4B6d71',
261
+ '0xE4199bC5C5C1F63dbA47B56B6dB7144C51CF0bF8',
262
+ '0xdaedd59fa2c5c63d46a3bae5ed115247df9eb6ec',
263
+ '0x3ce39825ab258693cedb8daf1db441627d011371',
264
+ '0x632F9Be4Bf42e0dBb461CFcC0CF788538a49ED6D',
265
+ '0x1197Ae7F43695Be80127365b494E8BF850f4752A',
266
+ '0x40caB7C05fc1686e198C8d6d6aA4aaCF77BE8590',
267
+ '0x64FFf0e27c223097c824f9d9278eFD5B55c3430e',
268
+ ]),
269
+ disabledImplementations: new Set([]),
270
+ factoryPoolImplementations: {
271
+ '0x571FF5b7b346F706aa48d696a9a4a288e9Bb4091': {
272
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
273
+ address: '0x571FF5b7b346F706aa48d696a9a4a288e9Bb4091',
274
+ },
275
+ '0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9': {
276
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
277
+ address: '0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9',
278
+ },
279
+ '0xAe00f57663F4C85FC948B13963cd4627dAF01061': {
280
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
281
+ address: '0xAe00f57663F4C85FC948B13963cd4627dAF01061',
282
+ },
283
+ '0x8101e6760130be2c8ace79643ab73500571b7162': {
284
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
285
+ address: '0x8101e6760130be2c8ace79643ab73500571b7162',
286
+ },
287
+ '0x493084ca44c779af27a416ac1f71e3823bf21b53': {
288
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
289
+ address: '0x493084ca44c779af27a416ac1f71e3823bf21b53',
290
+ },
291
+ '0x9b4ed6f8904e976146b3dc0233cd48cf81835240': {
292
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
293
+ address: '0x9b4ed6f8904e976146b3dc0233cd48cf81835240',
294
+ },
295
+ '0xa9134fae98f92217f457918505375ae91fdc5e3c': {
296
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
297
+ address: '0xa9134fae98f92217f457918505375ae91fdc5e3c',
298
+ },
299
+ '0xcc9fd96c26c450dd4580893aff75efd5cb6c12fc': {
300
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
301
+ address: '0xcc9fd96c26c450dd4580893aff75efd5cb6c12fc',
302
+ },
303
+ '0x991b05d5316fa3a2c053f84658b84987cd5c9970': {
304
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
305
+ address: '0x991b05d5316fa3a2c053f84658b84987cd5c9970',
306
+ },
307
+ '0xC7c46488566b9ef9B981b87E328939CaA5ca152f': {
308
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
309
+ address: '0xC7c46488566b9ef9B981b87E328939CaA5ca152f',
310
+ },
311
+ '0xf31bcdf0b9a5ecd7ab463eb905551fbc32e51856': {
312
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
313
+ address: '0xf31bcdf0b9a5ecd7ab463eb905551fbc32e51856',
314
+ },
315
+ '0xAc273d5b4FC06625d8b1abA3BE8De15bDFb8E39f': {
316
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
317
+ address: '0xAc273d5b4FC06625d8b1abA3BE8De15bDFb8E39f',
318
+ },
319
+ '0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c': {
320
+ name: ImplementationNames.FACTORY_META_USD,
321
+ address: '0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c',
322
+ basePoolAddress: '0x445FE580eF8d70FF569aB36e80c647af338db351',
323
+ },
324
+ '0x39fE1824f98CD828050D7c51dA443E84121c7cf1': {
325
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
326
+ address: '0x39fE1824f98CD828050D7c51dA443E84121c7cf1',
327
+ basePoolAddress: '0x445FE580eF8d70FF569aB36e80c647af338db351',
328
+ },
329
+ '0xC05EB760A135d3D0c839f1141423002681157a17': {
330
+ name: ImplementationNames.FACTORY_META_BTC,
331
+ address: '0xC05EB760A135d3D0c839f1141423002681157a17',
332
+ basePoolAddress: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
333
+ },
334
+ '0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc': {
335
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES,
336
+ address: '0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc',
337
+ basePoolAddress: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
338
+ },
339
+ '0xe265fc390e9129b7e337da23cd42e00c34da2ce3': {
340
+ name: ImplementationNames.FACTORY_STABLE_NG,
341
+ address: '0xe265fc390e9129b7e337da23cd42e00c34da2ce3',
342
+ liquidityApiSlug: '/factory-stable-ng',
343
+ isStoreRateSupported: true,
344
+ },
345
+ '0xa7ba18eefcd9513230987ec2fab6711af5abd9c2': {
346
+ name: ImplementationNames.FACTORY_STABLE_NG,
347
+ address: '0xa7ba18eefcd9513230987ec2fab6711af5abd9c2',
348
+ liquidityApiSlug: '/factory-stable-ng',
349
+ isStoreRateSupported: true,
350
+ },
351
+ },
352
+ customPools: {
353
+ '0x445FE580eF8d70FF569aB36e80c647af338db351': {
354
+ name: CustomImplementationNames.CUSTOM_POLYGON_3COIN_LENDING,
355
+ address: '0x445FE580eF8d70FF569aB36e80c647af338db351',
356
+ lpTokenAddress: '0xe7a24ef0c5e95ffb0f6684b813a78f2a3ad7d171',
357
+ liquidityApiSlug: '/main',
358
+ coinsInputType: 'uint256',
359
+ balancesInputType: 'uint256',
360
+ useForPricing: false,
361
+ },
362
+ '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67': {
363
+ name: CustomImplementationNames.CUSTOM_POLYGON_2COIN_LENDING,
364
+ address: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
365
+ lpTokenAddress: '0xf8a57c1d3b9629b77b6726a042ca48990a84fb49',
366
+ liquidityApiSlug: '/main',
367
+ coinsInputType: 'uint256',
368
+ balancesInputType: 'uint256',
369
+ useForPricing: false,
370
+ },
371
+ },
372
+ },
373
+ [Network.FANTOM]: {
374
+ factories: [
375
+ {
376
+ address: '0x686d67265703D1f124c45E33d47d794c566889Ba',
377
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
378
+ },
379
+ {
380
+ address: '0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b', // factory stable ng
381
+ isStableNg: true,
382
+ },
383
+ ],
384
+ stateUpdatePeriodMs: 2 * 1000,
385
+ disabledPools: new Set([]),
386
+ disabledImplementations: new Set([]),
387
+ factoryPoolImplementations: {
388
+ '0x61E10659fe3aa93d036d099405224E4Ac24996d0': {
389
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
390
+ address: '0x61E10659fe3aa93d036d099405224E4Ac24996d0',
391
+ },
392
+ '0xd9Acb0BAeeD77C99305017821167674Cc7e82f7a': {
393
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
394
+ address: '0xd9Acb0BAeeD77C99305017821167674Cc7e82f7a',
395
+ },
396
+ '0xE6358f6a45B502477e83CC1CDa759f540E4459ee': {
397
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
398
+ address: '0xE6358f6a45B502477e83CC1CDa759f540E4459ee',
399
+ },
400
+ '0xAD4768F408dD170e62E074188D81A29AE31B8Fd8': {
401
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
402
+ address: '0xAD4768F408dD170e62E074188D81A29AE31B8Fd8',
403
+ },
404
+ '0x3cABd83bCa606768939B843f91df8f4963dBC079': {
405
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
406
+ address: '0x3cABd83bCa606768939B843f91df8f4963dBC079',
407
+ },
408
+ '0xD1602F68CC7C4c7B59D686243EA35a9C73B0c6a2': {
409
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
410
+ address: '0xD1602F68CC7C4c7B59D686243EA35a9C73B0c6a2',
411
+ },
412
+ '0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a': {
413
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
414
+ address: '0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a',
415
+ },
416
+ '0x7Ee25A34C921E4009B726cC6be0643fd6a39DbfE': {
417
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
418
+ address: '0x7Ee25A34C921E4009B726cC6be0643fd6a39DbfE',
419
+ },
420
+ '0xABE216918fFDa43B44e3FC09639Fd82fD3527D89': {
421
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
422
+ address: '0xABE216918fFDa43B44e3FC09639Fd82fD3527D89',
423
+ },
424
+ '0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471': {
425
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
426
+ address: '0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471',
427
+ },
428
+ '0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce': {
429
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
430
+ address: '0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce',
431
+ },
432
+ '0x9D7C28226AA7142cBF234ab9aa9C203D095c528B': {
433
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
434
+ address: '0x9D7C28226AA7142cBF234ab9aa9C203D095c528B',
435
+ },
436
+ '0xfCE359115dFe1533a2458650123F86C454BC0213': {
437
+ name: ImplementationNames.FACTORY_META_USD,
438
+ address: '0xfCE359115dFe1533a2458650123F86C454BC0213',
439
+ basePoolAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
440
+ },
441
+ '0x09C62ad0694e3f1ad8cF8876aaBe56138C586f5F': {
442
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
443
+ address: '0x09C62ad0694e3f1ad8cF8876aaBe56138C586f5F',
444
+ basePoolAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
445
+ },
446
+ '0xC9438d8928486bD9621D326002F4672bF684187A': {
447
+ name: ImplementationNames.FACTORY_META_BTC,
448
+ address: '0xC9438d8928486bD9621D326002F4672bF684187A',
449
+ basePoolAddress: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
450
+ },
451
+ '0x2b70A5B878665FfDB4A06Ba40a264d6c70f68F4B': {
452
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES,
453
+ address: '0x2b70A5B878665FfDB4A06Ba40a264d6c70f68F4B',
454
+ basePoolAddress: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
455
+ },
456
+ '0x210c806f6ae850279f7e298de749ec4b427d00dd': {
457
+ name: ImplementationNames.FACTORY_META_USD,
458
+ address: '0x210c806f6ae850279f7e298de749ec4b427d00dd',
459
+ basePoolAddress: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
460
+ },
461
+ '0xf82162bb68ad5a168345bb7efb2faa0edcca5177': {
462
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
463
+ address: '0xf82162bb68ad5a168345bb7efb2faa0edcca5177',
464
+ basePoolAddress: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
465
+ },
466
+ '0x5702bdb1ec244704e3cbbaae11a0275ae5b07499': {
467
+ name: ImplementationNames.FACTORY_STABLE_NG,
468
+ address: '0x5702bdb1ec244704e3cbbaae11a0275ae5b07499',
469
+ liquidityApiSlug: '/factory-stable-ng',
470
+ isStoreRateSupported: true,
471
+ },
472
+ },
473
+ customPools: {
474
+ '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40': {
475
+ name: CustomImplementationNames.CUSTOM_FANTOM_2COIN_USD,
476
+ address: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
477
+ lpTokenAddress: '0x27E611FD27b276ACbd5Ffd632E5eAEBEC9761E40',
478
+ liquidityApiSlug: '/main',
479
+ coinsInputType: 'uint256',
480
+ balancesInputType: 'uint256',
481
+ useForPricing: false,
482
+ },
483
+ '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604': {
484
+ name: CustomImplementationNames.CUSTOM_FANTOM_2COIN_BTC,
485
+ address: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
486
+ lpTokenAddress: '0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858',
487
+ liquidityApiSlug: '/main',
488
+ coinsInputType: 'uint256',
489
+ balancesInputType: 'uint256',
490
+ useForPricing: false,
491
+ },
492
+ '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f': {
493
+ name: CustomImplementationNames.CUSTOM_FANTOM_3COIN_LENDING,
494
+ address: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
495
+ lpTokenAddress: '0xD02a30d33153877BC20e5721ee53DeDEE0422B2F',
496
+ liquidityApiSlug: '/main',
497
+ coinsInputType: 'uint256',
498
+ balancesInputType: 'uint256',
499
+ useForPricing: false,
500
+ },
501
+ },
502
+ },
503
+ [Network.AVALANCHE]: {
504
+ factories: [
505
+ {
506
+ address: '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
507
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
508
+ },
509
+ ],
510
+ stateUpdatePeriodMs: 2 * 1000,
511
+ // FIX: This must be removed when we go for full CurveV1 event based support
512
+ disabledPools: new Set(['0x16a7da911a4dd1d83f3ff066fe28f3c792c50d90']),
513
+ disabledImplementations: new Set([
514
+ '0xa27f39e9c21b3376f43266e13ad5a5d6e9bdb320',
515
+ '0x505c34ed8dbe96d2d5c7d83158aa844887770970',
516
+ ]),
517
+ factoryPoolImplementations: {
518
+ '0x697434ca761d4f86b553784b69f4f37f5edf54df': {
519
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
520
+ address: '0x697434ca761d4f86b553784b69f4f37f5edf54df',
521
+ },
522
+ '0xbdff0c27dd073c119ebcb1299a68a6a92ae607f0': {
523
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
524
+ address: '0xbdff0c27dd073c119ebcb1299a68a6a92ae607f0',
525
+ },
526
+ '0x64448B78561690B70E17CBE8029a3e5c1bB7136e': {
527
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
528
+ address: '0x64448B78561690B70E17CBE8029a3e5c1bB7136e',
529
+ },
530
+ '0x09672362833d8f703D5395ef3252D4Bfa51c15ca': {
531
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
532
+ address: '0x09672362833d8f703D5395ef3252D4Bfa51c15ca',
533
+ },
534
+ '0x1de7f0866e2c4adAC7b457c58Cc25c8688CDa1f2': {
535
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
536
+ address: '0x1de7f0866e2c4adAC7b457c58Cc25c8688CDa1f2',
537
+ },
538
+ '0x094d12e5b541784701FD8d65F11fc0598FBC6332': {
539
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
540
+ address: '0x094d12e5b541784701FD8d65F11fc0598FBC6332',
541
+ },
542
+ '0xf1f85a74ad6c64315f85af52d3d46bf715236adc': {
543
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
544
+ address: '0xf1f85a74ad6c64315f85af52d3d46bf715236adc',
545
+ },
546
+ '0xaa82ca713d94bba7a89ceab55314f9effeddc78c': {
547
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
548
+ address: '0xaa82ca713d94bba7a89ceab55314f9effeddc78c',
549
+ },
550
+ '0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287': {
551
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
552
+ address: '0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287',
553
+ },
554
+ '0x7d86446ddb609ed0f5f8684acf30380a356b2b4c': {
555
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
556
+ address: '0x7d86446ddb609ed0f5f8684acf30380a356b2b4c',
557
+ },
558
+ '0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410': {
559
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
560
+ address: '0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410',
561
+ },
562
+ '0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA': {
563
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
564
+ address: '0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA',
565
+ },
566
+ '0xa237034249290de2b07988ac64b96f22c0e76fe0': {
567
+ name: ImplementationNames.FACTORY_META_USD,
568
+ address: '0xa237034249290de2b07988ac64b96f22c0e76fe0',
569
+ basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
570
+ },
571
+ '0xc50c05ca1f8c2346664bd0d4a1eb6ac1da38414f': {
572
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
573
+ address: '0xc50c05ca1f8c2346664bd0d4a1eb6ac1da38414f',
574
+ basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
575
+ },
576
+ // Commented because these pools basics are not verified and looks very abandoned
577
+ // '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320': {
578
+ // name: ImplementationNames.FACTORY_META_BTC,
579
+ // address: '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320',
580
+ // },
581
+ // '0x505C34ED8dBE96d2D5C7D83158aA844887770970': {
582
+ // name: ImplementationNames.FACTORY_META_BTC_BALANCES,
583
+ // address: '0x505C34ED8dBE96d2D5C7D83158aA844887770970',
584
+ // },
585
+ },
586
+ customPools: {
587
+ '0x7f90122BF0700F9E7e1F688fe926940E8839F353': {
588
+ name: CustomImplementationNames.CUSTOM_AVALANCHE_3COIN_LENDING,
589
+ address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
590
+ lpTokenAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
591
+ liquidityApiSlug: '/main',
592
+ coinsInputType: 'uint256',
593
+ balancesInputType: 'uint256',
594
+ useForPricing: false,
595
+ },
596
+ // This contract is not verified. I think it is just abandoned. I am commenting both related
597
+ // btc meta pools
598
+ // ['']: {
599
+ // name: '',
600
+ // address: '0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320',
601
+ // lpTokenAddress: '',
602
+ // liquidityApiSlug: '',
603
+ // },
604
+ },
605
+ },
606
+ [Network.ARBITRUM]: {
607
+ factories: [
608
+ {
609
+ address: '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
610
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
611
+ },
612
+ {
613
+ address: '0x9AF14D26075f142eb3F292D5065EB3faa646167b', // factory stable ng
614
+ isStableNg: true,
615
+ },
616
+ ],
617
+ stateUpdatePeriodMs: 2 * 1000,
618
+ disabledPools: new Set([]),
619
+ disabledImplementations: new Set([]),
620
+ factoryPoolImplementations: {
621
+ '0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62': {
622
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
623
+ address: '0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62',
624
+ },
625
+ '0xD68970e266cE1A015953897C7055a5E0bC657Af8': {
626
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
627
+ address: '0xD68970e266cE1A015953897C7055a5E0bC657Af8',
628
+ },
629
+ '0x7DA64233Fefb352f8F501B357c018158ED8aA455': {
630
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
631
+ address: '0x7DA64233Fefb352f8F501B357c018158ED8aA455',
632
+ },
633
+ '0x0100fBf414071977B19fC38e6fc7c32FE444F5C9': {
634
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
635
+ address: '0x0100fBf414071977B19fC38e6fc7c32FE444F5C9',
636
+ },
637
+ '0xe381C25de995d62b453aF8B931aAc84fcCaa7A62': {
638
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
639
+ address: '0xe381C25de995d62b453aF8B931aAc84fcCaa7A62',
640
+ },
641
+ '0xc379bA7b8e1c6C48D64e1cf9dD602C97c9fD0F40': {
642
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
643
+ address: '0xc379bA7b8e1c6C48D64e1cf9dD602C97c9fD0F40',
644
+ },
645
+ '0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0': {
646
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
647
+ address: '0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0',
648
+ },
649
+ '0x8866414733F22295b7563f9C5299715D2D76CAf4': {
650
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
651
+ address: '0x8866414733F22295b7563f9C5299715D2D76CAf4',
652
+ },
653
+ '0x8d53E5De033078367Ad91527c53abfd1Eb6bfa86': {
654
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
655
+ address: '0x8d53E5De033078367Ad91527c53abfd1Eb6bfa86',
656
+ },
657
+ '0x2ac56cEBc2D27c9bB51a11773355E44371Eb88D3': {
658
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
659
+ address: '0x2ac56cEBc2D27c9bB51a11773355E44371Eb88D3',
660
+ },
661
+ '0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08': {
662
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
663
+ address: '0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08',
664
+ },
665
+ '0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF': {
666
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
667
+ address: '0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF',
668
+ },
669
+ '0x09672362833d8f703D5395ef3252D4Bfa51c15ca': {
670
+ name: ImplementationNames.FACTORY_META_USD,
671
+ address: '0x09672362833d8f703D5395ef3252D4Bfa51c15ca',
672
+ basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
673
+ },
674
+ '0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5': {
675
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
676
+ address: '0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5',
677
+ basePoolAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
678
+ },
679
+ '0x8DEb66a4A40E370355bEe35f12E55Fe9c755d686': {
680
+ name: ImplementationNames.FACTORY_META_USD,
681
+ address: '0x8DEb66a4A40E370355bEe35f12E55Fe9c755d686',
682
+ basePoolAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
683
+ },
684
+ '0x3edE9b145F82e9e46C03f8A8F67B77aEE847b632': {
685
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
686
+ address: '0x3edE9b145F82e9e46C03f8A8F67B77aEE847b632',
687
+ basePoolAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
688
+ },
689
+ '0x094d12e5b541784701FD8d65F11fc0598FBC6332': {
690
+ name: ImplementationNames.FACTORY_META_BTC,
691
+ address: '0x094d12e5b541784701FD8d65F11fc0598FBC6332',
692
+ basePoolAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
693
+ },
694
+ '0xF1f85a74AD6c64315F85af52d3d46bF715236ADc': {
695
+ name: ImplementationNames.FACTORY_META_BTC_BALANCES,
696
+ address: '0xF1f85a74AD6c64315F85af52d3d46bF715236ADc',
697
+ basePoolAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
698
+ },
699
+ '0x73ec37618683c274d0bbf5f5726aa856b2bdab81': {
700
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
701
+ address: '0x73ec37618683c274d0bbf5f5726aa856b2bdab81',
702
+ customGasCost: 130_000,
703
+ },
704
+ '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5': {
705
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
706
+ address: '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5',
707
+ customGasCost: 130_000,
708
+ isStoreRateSupported: true,
709
+ },
710
+ '0xf6841c27fe35ed7069189afd5b81513578afd7ff': {
711
+ name: ImplementationNames.FACTORY_STABLE_NG,
712
+ address: '0xf6841c27fe35ed7069189afd5b81513578afd7ff',
713
+ liquidityApiSlug: '/factory-stable-ng',
714
+ isStoreRateSupported: true,
715
+ },
716
+ '0xff02cbd91f57a778bab7218da562594a680b8b61': {
717
+ name: ImplementationNames.FACTORY_STABLE_NG,
718
+ address: '0xff02cbd91f57a778bab7218da562594a680b8b61',
719
+ liquidityApiSlug: '/factory-stable-ng',
720
+ isStoreRateSupported: true,
721
+ },
722
+ },
723
+ customPools: {
724
+ '0x7f90122BF0700F9E7e1F688fe926940E8839F353': {
725
+ name: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_USD,
726
+ address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
727
+ lpTokenAddress: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
728
+ liquidityApiSlug: '/main',
729
+ coinsInputType: 'uint256',
730
+ balancesInputType: 'uint256',
731
+ useForPricing: false,
732
+ },
733
+ '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5': {
734
+ name: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC,
735
+ address: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
736
+ lpTokenAddress: '0xC9B8a3FDECB9D5b218d02555a8Baf332E5B740d5',
737
+ liquidityApiSlug: '/factory',
738
+ coinsInputType: 'uint256',
739
+ balancesInputType: 'uint256',
740
+ useForPricing: false,
741
+ },
742
+ '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb': {
743
+ name: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_BTC,
744
+ address: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
745
+ lpTokenAddress: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
746
+ liquidityApiSlug: '/main',
747
+ coinsInputType: 'uint256',
748
+ balancesInputType: 'uint256',
749
+ useForPricing: false,
750
+ },
751
+ },
752
+ },
753
+ [Network.OPTIMISM]: {
754
+ factories: [
755
+ {
756
+ address: '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
757
+ maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
758
+ },
759
+ {
760
+ address: '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E', // factory stable ng
761
+ isStableNg: true,
762
+ },
763
+ ],
764
+ stateUpdatePeriodMs: 2 * 1000,
765
+ disabledPools: new Set([]),
766
+ disabledImplementations: new Set([]),
767
+ factoryPoolImplementations: {
768
+ '0xC2b1DF84112619D190193E48148000e3990Bf627': {
769
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
770
+ address: '0xC2b1DF84112619D190193E48148000e3990Bf627',
771
+ },
772
+ '0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90': {
773
+ name: ImplementationNames.FACTORY_PLAIN_2_BALANCES,
774
+ address: '0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90',
775
+ },
776
+ '0x4f3E8F405CF5aFC05D68142F3783bDfE13811522': {
777
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH,
778
+ address: '0x4f3E8F405CF5aFC05D68142F3783bDfE13811522',
779
+ },
780
+ '0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1': {
781
+ name: ImplementationNames.FACTORY_PLAIN_2_OPTIMIZED,
782
+ address: '0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1',
783
+ },
784
+ '0x78D0fC2B9D5AE65512DB242e424a9c683F18c243': {
785
+ name: ImplementationNames.FACTORY_PLAIN_3_BASIC,
786
+ address: '0x78D0fC2B9D5AE65512DB242e424a9c683F18c243',
787
+ },
788
+ '0x35796DAc54f144DFBAD1441Ec7C32313A7c29F39': {
789
+ name: ImplementationNames.FACTORY_PLAIN_3_BALANCES,
790
+ address: '0x35796DAc54f144DFBAD1441Ec7C32313A7c29F39',
791
+ },
792
+ '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb': {
793
+ name: ImplementationNames.FACTORY_PLAIN_3_ETH,
794
+ address: '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb',
795
+ },
796
+ '0x6D65b498cb23deAba52db31c93Da9BFFb340FB8F': {
797
+ name: ImplementationNames.FACTORY_PLAIN_3_OPTIMIZED,
798
+ address: '0x6D65b498cb23deAba52db31c93Da9BFFb340FB8F',
799
+ },
800
+ '0x445FE580eF8d70FF569aB36e80c647af338db351': {
801
+ name: ImplementationNames.FACTORY_PLAIN_4_BASIC,
802
+ address: '0x445FE580eF8d70FF569aB36e80c647af338db351',
803
+ },
804
+ '0xF6bDc2619FFDA72c537Cd9605e0A274Dc48cB1C9': {
805
+ name: ImplementationNames.FACTORY_PLAIN_4_BALANCES,
806
+ address: '0xF6bDc2619FFDA72c537Cd9605e0A274Dc48cB1C9',
807
+ },
808
+ '0x1AEf73d49Dedc4b1778d0706583995958Dc862e6': {
809
+ name: ImplementationNames.FACTORY_PLAIN_4_ETH,
810
+ address: '0x1AEf73d49Dedc4b1778d0706583995958Dc862e6',
811
+ },
812
+ '0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6': {
813
+ name: ImplementationNames.FACTORY_PLAIN_4_OPTIMIZED,
814
+ address: '0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6',
815
+ },
816
+ '0x78CF256256C8089d68Cde634Cf7cDEFb39286470': {
817
+ name: ImplementationNames.FACTORY_META_USD,
818
+ address: '0x78CF256256C8089d68Cde634Cf7cDEFb39286470',
819
+ basePoolAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
820
+ },
821
+ '0xADf698e4d8Df08b3E2c79682891636eF00F6e205': {
822
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
823
+ address: '0xADf698e4d8Df08b3E2c79682891636eF00F6e205',
824
+ basePoolAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
825
+ },
826
+ '0xe8269B33E47761f552E1a3070119560d5fa8bBD6': {
827
+ name: ImplementationNames.FACTORY_META_USD,
828
+ address: '0xe8269B33E47761f552E1a3070119560d5fa8bBD6',
829
+ basePoolAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
830
+ },
831
+ '0x114C4042B11a2b16F58Fe1BFe847589a122F678a': {
832
+ name: ImplementationNames.FACTORY_META_USD_BALANCES,
833
+ address: '0x114C4042B11a2b16F58Fe1BFe847589a122F678a',
834
+ basePoolAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
835
+ },
836
+ '0x73ec37618683c274d0bbf5f5726aa856b2bdab81': {
837
+ name: ImplementationNames.FACTORY_PLAIN_2_BASIC_EMA,
838
+ address: '0x73ec37618683c274d0bbf5f5726aa856b2bdab81',
839
+ customGasCost: 130_000,
840
+ },
841
+ '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5': {
842
+ name: ImplementationNames.FACTORY_PLAIN_2_ETH_EMA2,
843
+ address: '0x6f9fb833501f46cbe6f6a4b6cf32c834e5a5e8c5',
844
+ customGasCost: 130_000,
845
+ isStoreRateSupported: true,
846
+ },
847
+ '0x635742dcc8313dcf8c904206037d962c042eafbd': {
848
+ name: ImplementationNames.FACTORY_STABLE_NG,
849
+ address: '0x635742dcc8313dcf8c904206037d962c042eafbd',
850
+ liquidityApiSlug: '/factory-stable-ng',
851
+ isStoreRateSupported: true,
852
+ },
853
+ },
854
+ customPools: {
855
+ '0x1337BedC9D22ecbe766dF105c9623922A27963EC': {
856
+ name: CustomImplementationNames.CUSTOM_OPTIMISM_3COIN_USD,
857
+ address: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
858
+ lpTokenAddress: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
859
+ liquidityApiSlug: '/main',
860
+ coinsInputType: 'uint256',
861
+ balancesInputType: 'uint256',
862
+ useForPricing: false,
863
+ },
864
+ '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7': {
865
+ name: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC,
866
+ address: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
867
+ lpTokenAddress: '0x29A3d66B30Bc4AD674A4FDAF27578B64f6afbFe7',
868
+ liquidityApiSlug: '/factory',
869
+ coinsInputType: 'uint256',
870
+ balancesInputType: 'uint256',
871
+ useForPricing: false,
872
+ },
873
+ },
874
+ },
875
+ },
876
+ };
877
+
878
+ export const Adapters: Record<number, AdapterMappings> = {
879
+ [Network.MAINNET]: {
880
+ [SwapSide.SELL]: [
881
+ {
882
+ name: 'Adapter01',
883
+ index: 3,
884
+ },
885
+ ],
886
+ },
887
+ [Network.BSC]: {
888
+ [SwapSide.SELL]: [
889
+ // use for beltfi (deprecated)
890
+ {
891
+ name: 'BscAdapter01',
892
+ index: 2,
893
+ },
894
+ ],
895
+ },
896
+ [Network.POLYGON]: {
897
+ [SwapSide.SELL]: [
898
+ {
899
+ name: 'PolygonAdapter01',
900
+ index: 3,
901
+ },
902
+ ],
903
+ },
904
+ [Network.AVALANCHE]: {
905
+ [SwapSide.SELL]: [
906
+ {
907
+ name: 'AvalancheAdapter01',
908
+ index: 5,
909
+ },
910
+ ],
911
+ },
912
+ [Network.FANTOM]: {
913
+ [SwapSide.SELL]: [
914
+ {
915
+ name: 'FantomAdapter01',
916
+ index: 3,
917
+ },
918
+ ],
919
+ },
920
+ [Network.ARBITRUM]: {
921
+ [SwapSide.SELL]: [
922
+ {
923
+ name: 'ArbitrumAdapter01',
924
+ index: 6,
925
+ },
926
+ ],
927
+ },
928
+ [Network.OPTIMISM]: {
929
+ [SwapSide.SELL]: [
930
+ {
931
+ name: 'OptimismAdapter01',
932
+ index: 5,
933
+ },
934
+ ],
935
+ },
936
+ };
937
+
938
+ // This become quite ugly :(
939
+ // I just wanted to make sure that every address is lowercased and it is not missed it config changes at some point
940
+ const configAddressesNormalizer = (
941
+ config: DexConfigMap<DexParams>,
942
+ ): DexConfigMap<DexParams> => {
943
+ for (const dexKey of Object.keys(config)) {
944
+ for (const network of Object.keys(config[dexKey])) {
945
+ const _config = config[dexKey][+network];
946
+
947
+ // Normalize custom pool fields
948
+ Object.keys(_config.customPools).forEach(p => {
949
+ _config.customPools[p].address =
950
+ _config.customPools[p].address.toLowerCase();
951
+ _config.customPools[p].lpTokenAddress =
952
+ _config.customPools[p].lpTokenAddress.toLowerCase();
953
+ });
954
+
955
+ const customPools = Object.entries(_config.customPools).reduce<
956
+ Record<string, CustomPoolConfig>
957
+ >((acc, [customPoolAddress, customPoolConfig]) => {
958
+ const normalizedImplementation: CustomPoolConfig = {
959
+ name: customPoolConfig.name,
960
+ liquidityApiSlug: customPoolConfig.liquidityApiSlug,
961
+ coinsInputType: customPoolConfig.coinsInputType,
962
+ balancesInputType: customPoolConfig.balancesInputType,
963
+ address: normalizeAddress(customPoolConfig.address),
964
+ lpTokenAddress: normalizeAddress(customPoolConfig.lpTokenAddress),
965
+ useForPricing: customPoolConfig.useForPricing,
966
+ };
967
+ acc[normalizeAddress(customPoolAddress)] = normalizedImplementation;
968
+ return acc;
969
+ }, {});
970
+
971
+ // Had to recreate object to change key to lower case
972
+ const factoryPoolImplementations = Object.entries(
973
+ _config.factoryPoolImplementations,
974
+ ).reduce<Record<string, FactoryPoolImplementations>>(
975
+ (acc, [implementationAddress, implementationConfig]) => {
976
+ const normalizedImplementation: FactoryPoolImplementations = {
977
+ name: implementationConfig.name,
978
+ address: normalizeAddress(implementationConfig.address),
979
+ basePoolAddress: implementationConfig.basePoolAddress
980
+ ? normalizeAddress(implementationConfig.basePoolAddress)
981
+ : undefined,
982
+ isStoreRateSupported: implementationConfig.isStoreRateSupported,
983
+ liquidityApiSlug: implementationConfig.liquidityApiSlug,
984
+ };
985
+ acc[normalizeAddress(implementationAddress)] =
986
+ normalizedImplementation;
987
+ return acc;
988
+ },
989
+ {},
990
+ );
991
+
992
+ // Unite everything into top level config
993
+ const normalizedConfig: DexParams = {
994
+ factories: _config.factories
995
+ ? _config.factories.map(e => ({
996
+ ...e,
997
+ address: e.address.toLowerCase(),
998
+ }))
999
+ : _config.factories,
1000
+ stateUpdatePeriodMs: _config.stateUpdatePeriodMs,
1001
+ factoryPoolImplementations,
1002
+ customPools,
1003
+ disabledPools: new Set(
1004
+ Array.from(_config.disabledPools).map(normalizeAddress),
1005
+ ),
1006
+ disabledImplementations: new Set(
1007
+ Array.from(_config.disabledImplementations).map(normalizeAddress),
1008
+ ),
1009
+ };
1010
+ config[dexKey][+network] = normalizedConfig;
1011
+ }
1012
+ }
1013
+ return config;
1014
+ };
1015
+
1016
+ configAddressesNormalizer(CurveV1FactoryConfig);
1017
+
1018
+ export { CurveV1FactoryConfig };