@curvefi/api 2.69.0 → 2.69.1

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.
@@ -1,25 +1,25 @@
1
1
  export declare const GAS_STRATEGIES: {
2
2
  readonly economy: {
3
- readonly percentile: 10;
3
+ readonly percentile: 20;
4
4
  readonly baseFeeMulBps: 11000;
5
5
  readonly tipMulBps: 9400;
6
- readonly minTipBaseFractionBps: 300;
6
+ readonly minTipMainnet: 0;
7
7
  readonly legacyGasPriceMulBps: 10000;
8
8
  readonly fallbackTipMulBps: 10000;
9
9
  };
10
10
  readonly standard: {
11
- readonly percentile: 20;
12
- readonly baseFeeMulBps: 12000;
11
+ readonly percentile: 50;
12
+ readonly baseFeeMulBps: 12500;
13
13
  readonly tipMulBps: 10000;
14
- readonly minTipBaseFractionBps: 500;
14
+ readonly minTipMainnet: 2000000000;
15
15
  readonly legacyGasPriceMulBps: 11000;
16
16
  readonly fallbackTipMulBps: 15000;
17
17
  };
18
18
  readonly aggressive: {
19
- readonly percentile: 30;
20
- readonly baseFeeMulBps: 12500;
19
+ readonly percentile: 80;
20
+ readonly baseFeeMulBps: 13000;
21
21
  readonly tipMulBps: 10200;
22
- readonly minTipBaseFractionBps: 700;
22
+ readonly minTipMainnet: 4000000000;
23
23
  readonly legacyGasPriceMulBps: 12500;
24
24
  readonly fallbackTipMulBps: 20000;
25
25
  };
@@ -1,25 +1,25 @@
1
1
  export const GAS_STRATEGIES = {
2
2
  economy: {
3
- percentile: 10,
3
+ percentile: 20,
4
4
  baseFeeMulBps: 11000, // baseFee × 1.10
5
5
  tipMulBps: 9400, // median tip × 0.94
6
- minTipBaseFractionBps: 300, // tip floor = baseFee × 0.03 (mainnet only)
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: 20,
12
- baseFeeMulBps: 12000, // baseFee × 1.20
11
+ percentile: 50,
12
+ baseFeeMulBps: 12500, // baseFee × 1.25
13
13
  tipMulBps: 10000, // median tip × 1.00
14
- minTipBaseFractionBps: 500, // tip floor = baseFee × 0.05 (mainnet only)
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: 30,
20
- baseFeeMulBps: 12500, // baseFee × 1.25
19
+ percentile: 80,
20
+ baseFeeMulBps: 13000, // baseFee × 1.3
21
21
  tipMulBps: 10200, // median tip × 1.06
22
- minTipBaseFractionBps: 700, // tip floor = baseFee × 0.07 (mainnet only)
22
+ minTipMainnet: 4000000000, // 4 gwei
23
23
  legacyGasPriceMulBps: 12500, // gasPrice × 1.25
24
24
  fallbackTipMulBps: 20000, // tip × 2.00
25
25
  },
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
- const minTip = (latestBase * BigInt(strategyConfig.minTipBaseFractionBps)) / BigInt(10000);
609
- if (tip < minTip)
610
- tip = minTip;
608
+ tip = tip > BigInt(strategyConfig.minTipMainnet)
609
+ ? tip
610
+ : BigInt(strategyConfig.minTipMainnet);
611
611
  }
612
612
  return { maxPriorityFeePerGas: tip, maxFeePerGas: adjustedBase + tip };
613
613
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.69.0",
3
+ "version": "2.69.1",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",