@curvefi/api 2.69.4 → 2.69.5
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 +3 -3
- package/lib/constants/gas.js +3 -3
- package/lib/utils.js +2 -3
- package/package.json +1 -1
package/lib/constants/gas.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const GAS_STRATEGIES: {
|
|
|
3
3
|
readonly percentile: 20;
|
|
4
4
|
readonly baseFeeMulBps: 11000;
|
|
5
5
|
readonly tipMulBps: 9400;
|
|
6
|
-
readonly
|
|
6
|
+
readonly minTipBaseFeeBps: 500;
|
|
7
7
|
readonly legacyGasPriceMulBps: 10000;
|
|
8
8
|
readonly fallbackTipMulBps: 10000;
|
|
9
9
|
};
|
|
@@ -11,7 +11,7 @@ export declare const GAS_STRATEGIES: {
|
|
|
11
11
|
readonly percentile: 50;
|
|
12
12
|
readonly baseFeeMulBps: 12500;
|
|
13
13
|
readonly tipMulBps: 10000;
|
|
14
|
-
readonly
|
|
14
|
+
readonly minTipBaseFeeBps: 500;
|
|
15
15
|
readonly legacyGasPriceMulBps: 11000;
|
|
16
16
|
readonly fallbackTipMulBps: 15000;
|
|
17
17
|
};
|
|
@@ -19,7 +19,7 @@ export declare const GAS_STRATEGIES: {
|
|
|
19
19
|
readonly percentile: 80;
|
|
20
20
|
readonly baseFeeMulBps: 13000;
|
|
21
21
|
readonly tipMulBps: 10200;
|
|
22
|
-
readonly
|
|
22
|
+
readonly minTipBaseFeeBps: 500;
|
|
23
23
|
readonly legacyGasPriceMulBps: 12500;
|
|
24
24
|
readonly fallbackTipMulBps: 20000;
|
|
25
25
|
};
|
package/lib/constants/gas.js
CHANGED
|
@@ -3,7 +3,7 @@ export const GAS_STRATEGIES = {
|
|
|
3
3
|
percentile: 20,
|
|
4
4
|
baseFeeMulBps: 11000, // baseFee × 1.10
|
|
5
5
|
tipMulBps: 9400, // median tip × 0.94
|
|
6
|
-
|
|
6
|
+
minTipBaseFeeBps: 500, // min tip = baseFee × 5%
|
|
7
7
|
legacyGasPriceMulBps: 10000, // gasPrice × 1.00
|
|
8
8
|
fallbackTipMulBps: 10000, // tip × 1.00
|
|
9
9
|
},
|
|
@@ -11,7 +11,7 @@ export const GAS_STRATEGIES = {
|
|
|
11
11
|
percentile: 50,
|
|
12
12
|
baseFeeMulBps: 12500, // baseFee × 1.25
|
|
13
13
|
tipMulBps: 10000, // median tip × 1.00
|
|
14
|
-
|
|
14
|
+
minTipBaseFeeBps: 500, // min tip = baseFee × 5%
|
|
15
15
|
legacyGasPriceMulBps: 11000, // gasPrice × 1.10
|
|
16
16
|
fallbackTipMulBps: 15000, // tip × 1.50
|
|
17
17
|
},
|
|
@@ -19,7 +19,7 @@ export const GAS_STRATEGIES = {
|
|
|
19
19
|
percentile: 80,
|
|
20
20
|
baseFeeMulBps: 13000, // baseFee × 1.3
|
|
21
21
|
tipMulBps: 10200, // median tip × 1.06
|
|
22
|
-
|
|
22
|
+
minTipBaseFeeBps: 500, // min tip = baseFee × 5%
|
|
23
23
|
legacyGasPriceMulBps: 12500, // gasPrice × 1.25
|
|
24
24
|
fallbackTipMulBps: 20000, // tip × 2.00
|
|
25
25
|
},
|
package/lib/utils.js
CHANGED
|
@@ -605,9 +605,8 @@ 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
|
-
: BigInt(strategyConfig.minTipMainnet);
|
|
608
|
+
const minTip = (latestBase * BigInt(strategyConfig.minTipBaseFeeBps)) / BigInt(10000);
|
|
609
|
+
tip = tip > minTip ? tip : minTip;
|
|
611
610
|
}
|
|
612
611
|
return { maxPriorityFeePerGas: tip, maxFeePerGas: adjustedBase + tip };
|
|
613
612
|
}
|