@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.
@@ -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
  },
@@ -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
- curve.constants.DECIMALS[tokens[i]] = tokenInfo[(i * 2) + 1];
322
+ const rawDec = tokenInfo[(i * 2) + 1];
323
+ curve.constants.DECIMALS[tokens[i]] = Number(rawDec);
323
324
  }
324
- return tokens.map((token, i) => ({ token, symbol: tokenInfo[i * 2], decimals: tokenInfo[(i * 2) + 1] }));
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
- 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.2",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",