@curvefi/api 2.69.0 → 2.69.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.
- package/lib/constants/gas.d.ts +8 -8
- package/lib/constants/gas.js +8 -8
- package/lib/pools/PoolTemplate.js +6 -2
- package/lib/utils.js +3 -3
- package/package.json +1 -1
package/lib/constants/gas.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export declare const GAS_STRATEGIES: {
|
|
2
2
|
readonly economy: {
|
|
3
|
-
readonly percentile:
|
|
3
|
+
readonly percentile: 20;
|
|
4
4
|
readonly baseFeeMulBps: 11000;
|
|
5
5
|
readonly tipMulBps: 9400;
|
|
6
|
-
readonly
|
|
6
|
+
readonly minTipMainnet: 0;
|
|
7
7
|
readonly legacyGasPriceMulBps: 10000;
|
|
8
8
|
readonly fallbackTipMulBps: 10000;
|
|
9
9
|
};
|
|
10
10
|
readonly standard: {
|
|
11
|
-
readonly percentile:
|
|
12
|
-
readonly baseFeeMulBps:
|
|
11
|
+
readonly percentile: 50;
|
|
12
|
+
readonly baseFeeMulBps: 12500;
|
|
13
13
|
readonly tipMulBps: 10000;
|
|
14
|
-
readonly
|
|
14
|
+
readonly minTipMainnet: 2000000000;
|
|
15
15
|
readonly legacyGasPriceMulBps: 11000;
|
|
16
16
|
readonly fallbackTipMulBps: 15000;
|
|
17
17
|
};
|
|
18
18
|
readonly aggressive: {
|
|
19
|
-
readonly percentile:
|
|
20
|
-
readonly baseFeeMulBps:
|
|
19
|
+
readonly percentile: 80;
|
|
20
|
+
readonly baseFeeMulBps: 13000;
|
|
21
21
|
readonly tipMulBps: 10200;
|
|
22
|
-
readonly
|
|
22
|
+
readonly minTipMainnet: 4000000000;
|
|
23
23
|
readonly legacyGasPriceMulBps: 12500;
|
|
24
24
|
readonly fallbackTipMulBps: 20000;
|
|
25
25
|
};
|
package/lib/constants/gas.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export const GAS_STRATEGIES = {
|
|
2
2
|
economy: {
|
|
3
|
-
percentile:
|
|
3
|
+
percentile: 20,
|
|
4
4
|
baseFeeMulBps: 11000, // baseFee × 1.10
|
|
5
5
|
tipMulBps: 9400, // median tip × 0.94
|
|
6
|
-
|
|
6
|
+
minTipMainnet: 0, // 0 gwei
|
|
7
7
|
legacyGasPriceMulBps: 10000, // gasPrice × 1.00
|
|
8
8
|
fallbackTipMulBps: 10000, // tip × 1.00
|
|
9
9
|
},
|
|
10
10
|
standard: {
|
|
11
|
-
percentile:
|
|
12
|
-
baseFeeMulBps:
|
|
11
|
+
percentile: 50,
|
|
12
|
+
baseFeeMulBps: 12500, // baseFee × 1.25
|
|
13
13
|
tipMulBps: 10000, // median tip × 1.00
|
|
14
|
-
|
|
14
|
+
minTipMainnet: 2000000000, // tip floor = baseFee × 0.05 (mainnet only)
|
|
15
15
|
legacyGasPriceMulBps: 11000, // gasPrice × 1.10
|
|
16
16
|
fallbackTipMulBps: 15000, // tip × 1.50
|
|
17
17
|
},
|
|
18
18
|
aggressive: {
|
|
19
|
-
percentile:
|
|
20
|
-
baseFeeMulBps:
|
|
19
|
+
percentile: 80,
|
|
20
|
+
baseFeeMulBps: 13000, // baseFee × 1.3
|
|
21
21
|
tipMulBps: 10200, // median tip × 1.06
|
|
22
|
-
|
|
22
|
+
minTipMainnet: 4000000000, // 4 gwei
|
|
23
23
|
legacyGasPriceMulBps: 12500, // gasPrice × 1.25
|
|
24
24
|
fallbackTipMulBps: 20000, // tip × 2.00
|
|
25
25
|
},
|
|
@@ -319,9 +319,13 @@ export class PoolTemplate extends CorePool {
|
|
|
319
319
|
}
|
|
320
320
|
const tokenInfo = yield curve.multicallProvider.all(tokenInfoCalls);
|
|
321
321
|
for (let i = 0; i < tokens.length; i++) {
|
|
322
|
-
|
|
322
|
+
const rawDec = tokenInfo[(i * 2) + 1];
|
|
323
|
+
curve.constants.DECIMALS[tokens[i]] = Number(rawDec);
|
|
323
324
|
}
|
|
324
|
-
return tokens.map((token, i) =>
|
|
325
|
+
return tokens.map((token, i) => {
|
|
326
|
+
const rawDec = tokenInfo[(i * 2) + 1];
|
|
327
|
+
return { token, symbol: tokenInfo[i * 2], decimals: Number(rawDec) };
|
|
328
|
+
});
|
|
325
329
|
}
|
|
326
330
|
else if ('claimable_reward(address)' in gaugeContract) { // gauge_synthetix
|
|
327
331
|
const rewardContract = curve.contracts[this.sRewardContract].contract;
|
package/lib/utils.js
CHANGED
|
@@ -605,9 +605,9 @@ export function computeEip1559Fees(history, strategy, chainId) {
|
|
|
605
605
|
const medianTip = medianBigInt(nonZeroTips);
|
|
606
606
|
let tip = (medianTip * BigInt(strategyConfig.tipMulBps)) / BigInt(10000);
|
|
607
607
|
if (chainId === MAINNET_CHAIN_ID) {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
608
|
+
tip = tip > BigInt(strategyConfig.minTipMainnet)
|
|
609
|
+
? tip
|
|
610
|
+
: BigInt(strategyConfig.minTipMainnet);
|
|
611
611
|
}
|
|
612
612
|
return { maxPriorityFeePerGas: tip, maxFeePerGas: adjustedBase + tip };
|
|
613
613
|
}
|