@paraswap/dex-lib 3.11.6-fluid-dex-changes.0 → 3.11.7-cables.0

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.
@@ -810,17 +810,17 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
810
810
 
811
811
  // Check if all reserves of collateral pool are greater than 0
812
812
  const colPoolEnabled =
813
- token0RealReserves > BigInt(0) &&
814
- token1RealReserves > BigInt(0) &&
815
- token0ImaginaryReserves > BigInt(0) &&
816
- token1ImaginaryReserves > BigInt(0);
813
+ token0RealReserves > 0n &&
814
+ token1RealReserves > 0n &&
815
+ token0ImaginaryReserves > 0n &&
816
+ token1ImaginaryReserves > 0n;
817
817
 
818
818
  // Check if all reserves of debt pool are greater than 0
819
819
  const debtPoolEnabled =
820
- debtToken0RealReserves > BigInt(0) &&
821
- debtToken1RealReserves > BigInt(0) &&
822
- debtToken0ImaginaryReserves > BigInt(0) &&
823
- debtToken1ImaginaryReserves > BigInt(0);
820
+ debtToken0RealReserves > 0n &&
821
+ debtToken1RealReserves > 0n &&
822
+ debtToken0ImaginaryReserves > 0n &&
823
+ debtToken1ImaginaryReserves > 0n;
824
824
 
825
825
  let colReserveIn: bigint,
826
826
  colReserveOut: bigint,
@@ -904,7 +904,6 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
904
904
  debtIReserveIn,
905
905
  debtIReserveOut,
906
906
  );
907
- // amountInDebt = (amountInDebt * 10n ** 6n) / (10n ** 6n - fee);
908
907
  amountInDebt = this.applyFeeForBuy(amountInDebt, fee);
909
908
  if (amountOut > debtReserveOut) {
910
909
  return 2n ** 256n - 1n;
@@ -920,7 +919,6 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
920
919
  colIReserveIn,
921
920
  colIReserveOut,
922
921
  );
923
- // amountInCollateral = (amountInCollateral * 10n ** 6n) / (10n ** 6n - fee);
924
922
  amountInCollateral = this.applyFeeForBuy(amountInCollateral, fee);
925
923
  if (amountOut > colReserveOut) {
926
924
  return 2n ** 256n - 1n;
@@ -934,7 +932,6 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
934
932
  amountInCollateral = this.getAmountIn(a, colIReserveIn, colIReserveOut);
935
933
  const amountOutDebtAdjusted = amountOut - a;
936
934
 
937
- // amountInCollateral = (amountInCollateral * 10n ** 6n) / (10n ** 6n - fee);
938
935
  amountInCollateral = this.applyFeeForBuy(amountInCollateral, fee);
939
936
 
940
937
  amountInDebt = this.getAmountIn(
@@ -943,7 +940,6 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
943
940
  debtIReserveOut,
944
941
  );
945
942
 
946
- // (amountInDebt * 10n ** 6n) / (10n ** 6n - fee);
947
943
  amountInDebt = this.applyFeeForBuy(amountInDebt, fee);
948
944
  if (amountOutDebt > debtReserveOut || a > colReserveOut) {
949
945
  return 2n ** 256n - 1n;
package/src/dex/index.ts CHANGED
@@ -94,6 +94,7 @@ import { LitePsm } from './lite-psm/lite-psm';
94
94
  import { UsualBond } from './usual-bond/usual-bond';
95
95
  import { StkGHO } from './stkgho/stkgho';
96
96
  import { SkyConverter } from './sky-converter/sky-converter';
97
+ import { Cables } from './cables/cables';
97
98
 
98
99
  const LegacyDexes = [
99
100
  CurveV2,
@@ -182,6 +183,7 @@ const Dexes = [
182
183
  UsualBond,
183
184
  StkGHO,
184
185
  SkyConverter,
186
+ Cables,
185
187
  FluidDex,
186
188
  ];
187
189
 
@@ -1844,7 +1844,7 @@ export const Holders: {
1844
1844
  BETS: '0x8cc2284c90d05578633418f9cde104f402375a65',
1845
1845
  HATCHY: '0x14ec295ec8def851ec6e2959df872dd24e422631',
1846
1846
  USDCe: '0x3a2434c698f8d79af1f5a9e43013157ca8b11a66',
1847
- USDC: '0xcc2da711D621A4491b338CAC88B9C0954db3e75B',
1847
+ USDC: '0x64b4dE1b00EF830f3CC2FD68ee056aAD76C45BF6',
1848
1848
  USDTe: '0x84d34f4f83a87596cd3fb6887cff8f17bf5a7b83',
1849
1849
  WETHe: '0x9bdB521a97E95177BF252C253E256A60C3e14447',
1850
1850
  POPS: '0x5268c2331658cb0b2858cfa9db27d8f22f5434bc',
@@ -1860,7 +1860,7 @@ export const Holders: {
1860
1860
  TSD: '0x691A89db352B72dDb249bFe16503494eC0D920A4',
1861
1861
  THO: '0xc40d16c47394a506d451475c8a7c46c1175c1da1',
1862
1862
  aAvaUSDT: '0x50B1Ba98Cf117c9682048D56628B294ebbAA4ec2',
1863
- USDT: '0x0d0707963952f2fba59dd06f2b425ace40b492fe',
1863
+ USDT: '0xCddc5d0Ebeb71a08ffF26909AA6c0d4e256b4fE1',
1864
1864
  aAvaWAVAX: '0x1B18Df70863636AEe4BfBAb6F7C70ceBCA9bA404',
1865
1865
  oldFRAX: '0x4e3376018add04ebe4c46bf6f924ddec8c67aa7b',
1866
1866
  newFRAX: '0x4e3376018add04ebe4c46bf6f924ddec8c67aa7b',