@gearbox-protocol/sdk 2.1.8 → 2.1.10
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.
- package/contracts/AdapterData.sol +10 -10
- package/contracts/PriceFeedDataLive.sol +211 -42
- package/lib/apy/convexAPY.d.ts +25 -16
- package/lib/apy/convexAPY.js +101 -71
- package/lib/contracts/contracts.d.ts +3 -0
- package/lib/contracts/contracts.js +30 -15
- package/lib/contracts/contractsRegister.d.ts +19 -8
- package/lib/contracts/contractsRegister.js +56 -27
- package/lib/core/creditManager.d.ts +1 -0
- package/lib/core/creditManager.js +13 -8
- package/lib/core/strategy.d.ts +5 -8
- package/lib/core/strategy.js +20 -39
- package/lib/core/strategy.spec.js +2 -5
- package/lib/oracles/pricefeedType.d.ts +3 -0
- package/lib/oracles/pricefeedType.js +3 -1
- package/lib/pathfinder/pathfinder.d.ts +3 -1
- package/lib/pathfinder/pathfinder.js +19 -10
- package/lib/tokens/gear.d.ts +1 -0
- package/lib/tokens/gear.js +7 -2
- package/lib/tokens/token.js +3 -6
- package/lib/utils/price.d.ts +1 -1
- package/package.json +1 -1
|
@@ -136,18 +136,18 @@ contract AdapterData {
|
|
|
136
136
|
);
|
|
137
137
|
curveAdapters.push(
|
|
138
138
|
CurveAdapter({
|
|
139
|
-
targetContract: Contracts.
|
|
139
|
+
targetContract: Contracts.CURVE_MIM_POOL,
|
|
140
140
|
adapterType: AdapterType.CURVE_V1_2ASSETS,
|
|
141
|
-
lpToken: Tokens.
|
|
142
|
-
basePool: Contracts.
|
|
141
|
+
lpToken: Tokens.MIM_3LP3CRV,
|
|
142
|
+
basePool: Contracts.CURVE_3CRV_POOL
|
|
143
143
|
})
|
|
144
144
|
);
|
|
145
145
|
curveAdapters.push(
|
|
146
146
|
CurveAdapter({
|
|
147
|
-
targetContract: Contracts.
|
|
147
|
+
targetContract: Contracts.CURVE_OHMFRAXBP_POOL,
|
|
148
148
|
adapterType: AdapterType.CURVE_V1_2ASSETS,
|
|
149
|
-
lpToken: Tokens.
|
|
150
|
-
basePool: Contracts.
|
|
149
|
+
lpToken: Tokens.OHMFRAXBP,
|
|
150
|
+
basePool: Contracts.NO_CONTRACT
|
|
151
151
|
})
|
|
152
152
|
);
|
|
153
153
|
curveAdapters.push(
|
|
@@ -246,16 +246,16 @@ contract AdapterData {
|
|
|
246
246
|
);
|
|
247
247
|
convexBasePoolAdapters.push(
|
|
248
248
|
ConvexBasePoolAdapter({
|
|
249
|
-
targetContract: Contracts.
|
|
249
|
+
targetContract: Contracts.CONVEX_MIM3CRV_POOL,
|
|
250
250
|
adapterType: AdapterType.CONVEX_V1_BASE_REWARD_POOL,
|
|
251
|
-
stakedToken: Tokens.
|
|
251
|
+
stakedToken: Tokens.stkcvxMIM_3LP3CRV
|
|
252
252
|
})
|
|
253
253
|
);
|
|
254
254
|
convexBasePoolAdapters.push(
|
|
255
255
|
ConvexBasePoolAdapter({
|
|
256
|
-
targetContract: Contracts.
|
|
256
|
+
targetContract: Contracts.CONVEX_OHMFRAXBP_POOL,
|
|
257
257
|
adapterType: AdapterType.CONVEX_V1_BASE_REWARD_POOL,
|
|
258
|
-
stakedToken: Tokens.
|
|
258
|
+
stakedToken: Tokens.stkcvxOHMFRAXBP
|
|
259
259
|
})
|
|
260
260
|
);
|
|
261
261
|
convexBasePoolAdapters.push(
|
|
@@ -11,6 +11,7 @@ import {TokensLib} from "./TokensLib.sol";
|
|
|
11
11
|
struct ChainlinkPriceFeedData {
|
|
12
12
|
Tokens token;
|
|
13
13
|
address priceFeed;
|
|
14
|
+
uint32 stalenessPeriod;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
struct CurvePriceFeedData {
|
|
@@ -71,97 +72,189 @@ contract PriceFeedDataLive {
|
|
|
71
72
|
constructor() {
|
|
72
73
|
// ------------------------ 1INCH ------------------------
|
|
73
74
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
74
|
-
ChainlinkPriceFeedData({
|
|
75
|
+
ChainlinkPriceFeedData({
|
|
76
|
+
token: Tokens._1INCH,
|
|
77
|
+
priceFeed: 0xc929ad75B72593967DE83E7F7Cda0493458261D9,
|
|
78
|
+
stalenessPeriod: 86400
|
|
79
|
+
})
|
|
75
80
|
);
|
|
76
81
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
77
|
-
ChainlinkPriceFeedData({
|
|
82
|
+
ChainlinkPriceFeedData({
|
|
83
|
+
token: Tokens._1INCH,
|
|
84
|
+
priceFeed: 0x4bC735Ef24bf286983024CAd5D03f0738865Aaef,
|
|
85
|
+
stalenessPeriod: 86400
|
|
86
|
+
})
|
|
78
87
|
);
|
|
79
88
|
|
|
80
89
|
// ------------------------ AAVE ------------------------
|
|
81
90
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
82
|
-
ChainlinkPriceFeedData({
|
|
91
|
+
ChainlinkPriceFeedData({
|
|
92
|
+
token: Tokens.AAVE,
|
|
93
|
+
priceFeed: 0x547a514d5e3769680Ce22B2361c10Ea13619e8a9,
|
|
94
|
+
stalenessPeriod: 86400
|
|
95
|
+
})
|
|
83
96
|
);
|
|
84
97
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
85
|
-
ChainlinkPriceFeedData({
|
|
98
|
+
ChainlinkPriceFeedData({
|
|
99
|
+
token: Tokens.AAVE,
|
|
100
|
+
priceFeed: 0xaD1d5344AaDE45F43E596773Bcc4c423EAbdD034,
|
|
101
|
+
stalenessPeriod: 86400
|
|
102
|
+
})
|
|
86
103
|
);
|
|
87
104
|
|
|
88
105
|
// ------------------------ COMP ------------------------
|
|
89
106
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
90
|
-
ChainlinkPriceFeedData({
|
|
107
|
+
ChainlinkPriceFeedData({
|
|
108
|
+
token: Tokens.COMP,
|
|
109
|
+
priceFeed: 0xdbd020CAeF83eFd542f4De03e3cF0C28A4428bd5,
|
|
110
|
+
stalenessPeriod: 86400
|
|
111
|
+
})
|
|
91
112
|
);
|
|
92
113
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
93
|
-
ChainlinkPriceFeedData({
|
|
114
|
+
ChainlinkPriceFeedData({
|
|
115
|
+
token: Tokens.COMP,
|
|
116
|
+
priceFeed: 0xe7C53FFd03Eb6ceF7d208bC4C13446c76d1E5884,
|
|
117
|
+
stalenessPeriod: 86400
|
|
118
|
+
})
|
|
94
119
|
);
|
|
95
120
|
|
|
96
121
|
// ------------------------ CRV ------------------------
|
|
97
122
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
98
|
-
ChainlinkPriceFeedData({
|
|
123
|
+
ChainlinkPriceFeedData({
|
|
124
|
+
token: Tokens.CRV,
|
|
125
|
+
priceFeed: 0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f,
|
|
126
|
+
stalenessPeriod: 86400
|
|
127
|
+
})
|
|
99
128
|
);
|
|
100
129
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
101
|
-
ChainlinkPriceFeedData({
|
|
130
|
+
ChainlinkPriceFeedData({
|
|
131
|
+
token: Tokens.CRV,
|
|
132
|
+
priceFeed: 0xaebDA2c976cfd1eE1977Eac079B4382acb849325,
|
|
133
|
+
stalenessPeriod: 86400
|
|
134
|
+
})
|
|
102
135
|
);
|
|
103
136
|
|
|
104
137
|
// ------------------------ DAI ------------------------
|
|
105
138
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
106
|
-
ChainlinkPriceFeedData({
|
|
139
|
+
ChainlinkPriceFeedData({
|
|
140
|
+
token: Tokens.DAI,
|
|
141
|
+
priceFeed: 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9,
|
|
142
|
+
stalenessPeriod: 86400
|
|
143
|
+
})
|
|
107
144
|
);
|
|
108
145
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
109
|
-
ChainlinkPriceFeedData({
|
|
146
|
+
ChainlinkPriceFeedData({
|
|
147
|
+
token: Tokens.DAI,
|
|
148
|
+
priceFeed: 0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB,
|
|
149
|
+
stalenessPeriod: 86400
|
|
150
|
+
})
|
|
110
151
|
);
|
|
111
152
|
|
|
112
153
|
// ------------------------ DPI ------------------------
|
|
113
154
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
114
|
-
ChainlinkPriceFeedData({
|
|
155
|
+
ChainlinkPriceFeedData({
|
|
156
|
+
token: Tokens.DPI,
|
|
157
|
+
priceFeed: 0xD2A593BF7594aCE1faD597adb697b5645d5edDB2,
|
|
158
|
+
stalenessPeriod: 86400
|
|
159
|
+
})
|
|
115
160
|
);
|
|
116
161
|
|
|
117
162
|
// ------------------------ FEI ------------------------
|
|
118
163
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
119
|
-
ChainlinkPriceFeedData({
|
|
164
|
+
ChainlinkPriceFeedData({
|
|
165
|
+
token: Tokens.FEI,
|
|
166
|
+
priceFeed: 0x31e0a88fecB6eC0a411DBe0e9E76391498296EE9,
|
|
167
|
+
stalenessPeriod: 86400
|
|
168
|
+
})
|
|
120
169
|
);
|
|
121
170
|
|
|
122
171
|
// ------------------------ GUSD ------------------------
|
|
123
172
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
124
|
-
ChainlinkPriceFeedData({
|
|
173
|
+
ChainlinkPriceFeedData({
|
|
174
|
+
token: Tokens.GUSD,
|
|
175
|
+
priceFeed: 0xa89f5d2365ce98B3cD68012b6f503ab1416245Fc,
|
|
176
|
+
stalenessPeriod: 86400
|
|
177
|
+
})
|
|
125
178
|
);
|
|
126
179
|
|
|
127
180
|
// ------------------------ LINK ------------------------
|
|
128
181
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
129
|
-
ChainlinkPriceFeedData({
|
|
182
|
+
ChainlinkPriceFeedData({
|
|
183
|
+
token: Tokens.LINK,
|
|
184
|
+
priceFeed: 0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c,
|
|
185
|
+
stalenessPeriod: 86400
|
|
186
|
+
})
|
|
130
187
|
);
|
|
131
188
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
132
|
-
ChainlinkPriceFeedData({
|
|
189
|
+
ChainlinkPriceFeedData({
|
|
190
|
+
token: Tokens.LINK,
|
|
191
|
+
priceFeed: 0x86E53CF1B870786351Da77A57575e79CB55812CB,
|
|
192
|
+
stalenessPeriod: 86400
|
|
193
|
+
})
|
|
133
194
|
);
|
|
134
195
|
|
|
135
196
|
// ------------------------ SNX ------------------------
|
|
136
197
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
137
|
-
ChainlinkPriceFeedData({
|
|
198
|
+
ChainlinkPriceFeedData({
|
|
199
|
+
token: Tokens.SNX,
|
|
200
|
+
priceFeed: 0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699,
|
|
201
|
+
stalenessPeriod: 86400
|
|
202
|
+
})
|
|
138
203
|
);
|
|
139
204
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
140
|
-
ChainlinkPriceFeedData({
|
|
205
|
+
ChainlinkPriceFeedData({
|
|
206
|
+
token: Tokens.SNX,
|
|
207
|
+
priceFeed: 0x054296f0D036b95531B4E14aFB578B80CFb41252,
|
|
208
|
+
stalenessPeriod: 86400
|
|
209
|
+
})
|
|
141
210
|
);
|
|
142
211
|
|
|
143
212
|
// ------------------------ UNI ------------------------
|
|
144
213
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
145
|
-
ChainlinkPriceFeedData({
|
|
214
|
+
ChainlinkPriceFeedData({
|
|
215
|
+
token: Tokens.UNI,
|
|
216
|
+
priceFeed: 0x553303d460EE0afB37EdFf9bE42922D8FF63220e,
|
|
217
|
+
stalenessPeriod: 86400
|
|
218
|
+
})
|
|
146
219
|
);
|
|
147
220
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
148
|
-
ChainlinkPriceFeedData({
|
|
221
|
+
ChainlinkPriceFeedData({
|
|
222
|
+
token: Tokens.UNI,
|
|
223
|
+
priceFeed: 0x9C917083fDb403ab5ADbEC26Ee294f6EcAda2720,
|
|
224
|
+
stalenessPeriod: 86400
|
|
225
|
+
})
|
|
149
226
|
);
|
|
150
227
|
|
|
151
228
|
// ------------------------ USDC ------------------------
|
|
152
229
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
153
|
-
ChainlinkPriceFeedData({
|
|
230
|
+
ChainlinkPriceFeedData({
|
|
231
|
+
token: Tokens.USDC,
|
|
232
|
+
priceFeed: 0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6,
|
|
233
|
+
stalenessPeriod: 86400
|
|
234
|
+
})
|
|
154
235
|
);
|
|
155
236
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
156
|
-
ChainlinkPriceFeedData({
|
|
237
|
+
ChainlinkPriceFeedData({
|
|
238
|
+
token: Tokens.USDC,
|
|
239
|
+
priceFeed: 0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3,
|
|
240
|
+
stalenessPeriod: 86400
|
|
241
|
+
})
|
|
157
242
|
);
|
|
158
243
|
|
|
159
244
|
// ------------------------ USDT ------------------------
|
|
160
245
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
161
|
-
ChainlinkPriceFeedData({
|
|
246
|
+
ChainlinkPriceFeedData({
|
|
247
|
+
token: Tokens.USDT,
|
|
248
|
+
priceFeed: 0x3E7d1eAB13ad0104d2750B8863b489D65364e32D,
|
|
249
|
+
stalenessPeriod: 86400
|
|
250
|
+
})
|
|
162
251
|
);
|
|
163
252
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
164
|
-
ChainlinkPriceFeedData({
|
|
253
|
+
ChainlinkPriceFeedData({
|
|
254
|
+
token: Tokens.USDT,
|
|
255
|
+
priceFeed: 0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7,
|
|
256
|
+
stalenessPeriod: 86400
|
|
257
|
+
})
|
|
165
258
|
);
|
|
166
259
|
|
|
167
260
|
// ------------------------ WBTC ------------------------
|
|
@@ -182,18 +275,34 @@ contract PriceFeedDataLive {
|
|
|
182
275
|
|
|
183
276
|
// ------------------------ WETH ------------------------
|
|
184
277
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
185
|
-
ChainlinkPriceFeedData({
|
|
278
|
+
ChainlinkPriceFeedData({
|
|
279
|
+
token: Tokens.WETH,
|
|
280
|
+
priceFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419,
|
|
281
|
+
stalenessPeriod: 86400
|
|
282
|
+
})
|
|
186
283
|
);
|
|
187
284
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
188
|
-
ChainlinkPriceFeedData({
|
|
285
|
+
ChainlinkPriceFeedData({
|
|
286
|
+
token: Tokens.WETH,
|
|
287
|
+
priceFeed: 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612,
|
|
288
|
+
stalenessPeriod: 86400
|
|
289
|
+
})
|
|
189
290
|
);
|
|
190
291
|
|
|
191
292
|
// ------------------------ YFI ------------------------
|
|
192
293
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
193
|
-
ChainlinkPriceFeedData({
|
|
294
|
+
ChainlinkPriceFeedData({
|
|
295
|
+
token: Tokens.YFI,
|
|
296
|
+
priceFeed: 0xA027702dbb89fbd58938e4324ac03B58d812b0E1,
|
|
297
|
+
stalenessPeriod: 86400
|
|
298
|
+
})
|
|
194
299
|
);
|
|
195
300
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
196
|
-
ChainlinkPriceFeedData({
|
|
301
|
+
ChainlinkPriceFeedData({
|
|
302
|
+
token: Tokens.YFI,
|
|
303
|
+
priceFeed: 0x745Ab5b69E01E2BE1104Ca84937Bb71f96f5fB21,
|
|
304
|
+
stalenessPeriod: 86400
|
|
305
|
+
})
|
|
197
306
|
);
|
|
198
307
|
|
|
199
308
|
// ------------------------ STETH ------------------------
|
|
@@ -210,18 +319,34 @@ contract PriceFeedDataLive {
|
|
|
210
319
|
|
|
211
320
|
// ------------------------ CVX ------------------------
|
|
212
321
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
213
|
-
ChainlinkPriceFeedData({
|
|
322
|
+
ChainlinkPriceFeedData({
|
|
323
|
+
token: Tokens.CVX,
|
|
324
|
+
priceFeed: 0xd962fC30A72A84cE50161031391756Bf2876Af5D,
|
|
325
|
+
stalenessPeriod: 86400
|
|
326
|
+
})
|
|
214
327
|
);
|
|
215
328
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
216
|
-
ChainlinkPriceFeedData({
|
|
329
|
+
ChainlinkPriceFeedData({
|
|
330
|
+
token: Tokens.CVX,
|
|
331
|
+
priceFeed: 0x851175a919f36c8e30197c09a9A49dA932c2CC00,
|
|
332
|
+
stalenessPeriod: 86400
|
|
333
|
+
})
|
|
217
334
|
);
|
|
218
335
|
|
|
219
336
|
// ------------------------ FRAX ------------------------
|
|
220
337
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
221
|
-
ChainlinkPriceFeedData({
|
|
338
|
+
ChainlinkPriceFeedData({
|
|
339
|
+
token: Tokens.FRAX,
|
|
340
|
+
priceFeed: 0xB9E1E3A9feFf48998E45Fa90847ed4D467E8BcfD,
|
|
341
|
+
stalenessPeriod: 86400
|
|
342
|
+
})
|
|
222
343
|
);
|
|
223
344
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
224
|
-
ChainlinkPriceFeedData({
|
|
345
|
+
ChainlinkPriceFeedData({
|
|
346
|
+
token: Tokens.FRAX,
|
|
347
|
+
priceFeed: 0x0809E3d38d1B4214958faf06D8b1B1a2b73f2ab8,
|
|
348
|
+
stalenessPeriod: 86400
|
|
349
|
+
})
|
|
225
350
|
);
|
|
226
351
|
|
|
227
352
|
// ------------------------ LUSD ------------------------
|
|
@@ -242,15 +367,27 @@ contract PriceFeedDataLive {
|
|
|
242
367
|
|
|
243
368
|
// ------------------------ sUSD ------------------------
|
|
244
369
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
245
|
-
ChainlinkPriceFeedData({
|
|
370
|
+
ChainlinkPriceFeedData({
|
|
371
|
+
token: Tokens.sUSD,
|
|
372
|
+
priceFeed: 0xad35Bd71b9aFE6e4bDc266B345c198eaDEf9Ad94,
|
|
373
|
+
stalenessPeriod: 86400
|
|
374
|
+
})
|
|
246
375
|
);
|
|
247
376
|
|
|
248
377
|
// ------------------------ FXS ------------------------
|
|
249
378
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
250
|
-
ChainlinkPriceFeedData({
|
|
379
|
+
ChainlinkPriceFeedData({
|
|
380
|
+
token: Tokens.FXS,
|
|
381
|
+
priceFeed: 0x6Ebc52C8C1089be9eB3945C4350B68B8E4C2233f,
|
|
382
|
+
stalenessPeriod: 86400
|
|
383
|
+
})
|
|
251
384
|
);
|
|
252
385
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
253
|
-
ChainlinkPriceFeedData({
|
|
386
|
+
ChainlinkPriceFeedData({
|
|
387
|
+
token: Tokens.FXS,
|
|
388
|
+
priceFeed: 0x36a121448D74Fa81450c992A1a44B9b7377CD3a5,
|
|
389
|
+
stalenessPeriod: 86400
|
|
390
|
+
})
|
|
254
391
|
);
|
|
255
392
|
|
|
256
393
|
// ------------------------ LDO ------------------------
|
|
@@ -279,25 +416,45 @@ contract PriceFeedDataLive {
|
|
|
279
416
|
|
|
280
417
|
// ------------------------ MIM ------------------------
|
|
281
418
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
282
|
-
ChainlinkPriceFeedData({
|
|
419
|
+
ChainlinkPriceFeedData({
|
|
420
|
+
token: Tokens.MIM,
|
|
421
|
+
priceFeed: 0x7A364e8770418566e3eb2001A96116E6138Eb32F,
|
|
422
|
+
stalenessPeriod: 86400
|
|
423
|
+
})
|
|
283
424
|
);
|
|
284
425
|
|
|
285
426
|
// ------------------------ SPELL ------------------------
|
|
286
427
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
287
|
-
ChainlinkPriceFeedData({
|
|
428
|
+
ChainlinkPriceFeedData({
|
|
429
|
+
token: Tokens.SPELL,
|
|
430
|
+
priceFeed: 0x8c110B94C5f1d347fAcF5E1E938AB2db60E3c9a8,
|
|
431
|
+
stalenessPeriod: 86400
|
|
432
|
+
})
|
|
288
433
|
);
|
|
289
434
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
290
|
-
ChainlinkPriceFeedData({
|
|
435
|
+
ChainlinkPriceFeedData({
|
|
436
|
+
token: Tokens.SPELL,
|
|
437
|
+
priceFeed: 0x383b3624478124697BEF675F07cA37570b73992f,
|
|
438
|
+
stalenessPeriod: 86400
|
|
439
|
+
})
|
|
291
440
|
);
|
|
292
441
|
|
|
293
442
|
// ------------------------ GMX ------------------------
|
|
294
443
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
295
|
-
ChainlinkPriceFeedData({
|
|
444
|
+
ChainlinkPriceFeedData({
|
|
445
|
+
token: Tokens.GMX,
|
|
446
|
+
priceFeed: 0xDB98056FecFff59D032aB628337A4887110df3dB,
|
|
447
|
+
stalenessPeriod: 86400
|
|
448
|
+
})
|
|
296
449
|
);
|
|
297
450
|
|
|
298
451
|
// ------------------------ ARB ------------------------
|
|
299
452
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
300
|
-
ChainlinkPriceFeedData({
|
|
453
|
+
ChainlinkPriceFeedData({
|
|
454
|
+
token: Tokens.ARB,
|
|
455
|
+
priceFeed: 0xb2A824043730FE05F3DA2efaFa1CBbe83fa548D6,
|
|
456
|
+
stalenessPeriod: 86400
|
|
457
|
+
})
|
|
301
458
|
);
|
|
302
459
|
|
|
303
460
|
// ------------------------ SHIB ------------------------
|
|
@@ -344,15 +501,27 @@ contract PriceFeedDataLive {
|
|
|
344
501
|
|
|
345
502
|
// ------------------------ RDNT ------------------------
|
|
346
503
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
347
|
-
ChainlinkPriceFeedData({
|
|
504
|
+
ChainlinkPriceFeedData({
|
|
505
|
+
token: Tokens.RDNT,
|
|
506
|
+
priceFeed: 0x20d0Fcab0ECFD078B036b6CAf1FaC69A6453b352,
|
|
507
|
+
stalenessPeriod: 86400
|
|
508
|
+
})
|
|
348
509
|
);
|
|
349
510
|
|
|
350
511
|
// ------------------------ BAL ------------------------
|
|
351
512
|
chainlinkPriceFeedsByNetwork[1].push(
|
|
352
|
-
ChainlinkPriceFeedData({
|
|
513
|
+
ChainlinkPriceFeedData({
|
|
514
|
+
token: Tokens.BAL,
|
|
515
|
+
priceFeed: 0xdF2917806E30300537aEB49A7663062F4d1F2b5F,
|
|
516
|
+
stalenessPeriod: 86400
|
|
517
|
+
})
|
|
353
518
|
);
|
|
354
519
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
355
|
-
ChainlinkPriceFeedData({
|
|
520
|
+
ChainlinkPriceFeedData({
|
|
521
|
+
token: Tokens.BAL,
|
|
522
|
+
priceFeed: 0xBE5eA816870D11239c543F84b71439511D70B94f,
|
|
523
|
+
stalenessPeriod: 86400
|
|
524
|
+
})
|
|
356
525
|
);
|
|
357
526
|
|
|
358
527
|
// ------------------------ yvDAI ------------------------
|
package/lib/apy/convexAPY.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigNumber } from "ethers";
|
|
2
|
-
import { ConvexPoolContract, ConvexPoolParams } from "../contracts/contracts";
|
|
2
|
+
import { ConvexPoolContract, ConvexPoolParams, CurveGEARPoolParams, CurveParams, CurveSteCRVPoolParams } from "../contracts/contracts";
|
|
3
3
|
import { NetworkType } from "../core/chains";
|
|
4
4
|
import { CurveLPToken } from "../tokens/curveLP";
|
|
5
5
|
import { SupportedToken } from "../tokens/token";
|
|
@@ -12,30 +12,39 @@ export interface GetConvexAPYBulkProps {
|
|
|
12
12
|
generated: GetConvexAPYBulkCallsReturns;
|
|
13
13
|
response: Array<BigNumber>;
|
|
14
14
|
}
|
|
15
|
-
export declare function getConvexAPYBulk(
|
|
15
|
+
export declare function getConvexAPYBulk(props: GetConvexAPYBulkProps): bigint[];
|
|
16
|
+
interface PoolInfo {
|
|
17
|
+
cvxPool: ConvexPoolParams;
|
|
18
|
+
cvxPoolAddress: string;
|
|
19
|
+
cvxExtraPools: string[];
|
|
20
|
+
crvPoolAddress: string;
|
|
21
|
+
crvToken: CurveLPToken;
|
|
22
|
+
crvPool: CrvParams;
|
|
23
|
+
crvLpPrice: Array<string>;
|
|
24
|
+
tokenList: Record<SupportedToken, string>;
|
|
25
|
+
}
|
|
26
|
+
type CrvParams = CurveParams | CurveSteCRVPoolParams | CurveGEARPoolParams;
|
|
16
27
|
type GetConvexAPYBulkCallsReturns = ReturnType<typeof getConvexAPYBulkCalls>;
|
|
17
28
|
export interface GetConvexAPYBulkCallsProps {
|
|
18
29
|
pools: Array<ConvexPoolContract>;
|
|
19
30
|
networkType: NetworkType;
|
|
20
31
|
}
|
|
21
32
|
export declare function getConvexAPYBulkCalls({ pools, networkType, }: GetConvexAPYBulkCallsProps): {
|
|
22
|
-
poolsInfo:
|
|
23
|
-
calls: [MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/curve/ICurvePool").ICurvePoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IConvexToken").IConvexTokenInterface>, ...MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>[]][];
|
|
33
|
+
poolsInfo: PoolInfo[];
|
|
34
|
+
calls: [MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/curve/ICurvePool").ICurvePoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IConvexToken").IConvexTokenInterface>, ...(MCall<any> | MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>)[]][];
|
|
24
35
|
};
|
|
25
|
-
export declare function getCVXMintAmount(crvAmount: bigint, cvxSupply: bigint): bigint;
|
|
26
36
|
export interface CalculateConvexAPYProps {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
underlying: CurveLPToken;
|
|
37
|
+
cvxPoolRate: bigint;
|
|
38
|
+
cvxPoolSupply: bigint;
|
|
39
|
+
cvxTokenSupply: bigint;
|
|
40
|
+
cvxPoolRewardsFinish: bigint;
|
|
41
|
+
cvxExtraRewards: Array<bigint>;
|
|
42
|
+
cvxExtraRewardsFinish: Array<bigint>;
|
|
43
|
+
crvVPrice: bigint;
|
|
44
|
+
crvLpPrice: Array<bigint>;
|
|
45
|
+
info: PoolInfo;
|
|
37
46
|
getTokenPrice: GetTokenPriceCallback;
|
|
38
47
|
curveAPY: CurveAPYResult;
|
|
39
|
-
tokenList: Record<SupportedToken, string>;
|
|
40
48
|
}
|
|
49
|
+
export declare function getCVXMintAmount(crvAmount: bigint, cvxTokenSupply: bigint): bigint;
|
|
41
50
|
export {};
|