diff --git a/packages/asset-swapper/CHANGELOG.json b/packages/asset-swapper/CHANGELOG.json index 369f78bc08..6e504e05a2 100644 --- a/packages/asset-swapper/CHANGELOG.json +++ b/packages/asset-swapper/CHANGELOG.json @@ -53,6 +53,10 @@ { "note": "Collapse `LiquidityProvider` into `DexForwarderBridge`", "pr": 2560 + }, + { + "note": "Added Curve `sUSD`", + "pr": 2563 } ] }, diff --git a/packages/asset-swapper/src/utils/market_operation_utils/constants.ts b/packages/asset-swapper/src/utils/market_operation_utils/constants.ts index e12c51c1f9..0800c90fb6 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/constants.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/constants.ts @@ -16,6 +16,7 @@ export const SELL_SOURCES = [ ERC20BridgeSource.CurveUsdcDaiUsdt, ERC20BridgeSource.CurveUsdcDaiUsdtTusd, ERC20BridgeSource.CurveUsdcDaiUsdtBusd, + ERC20BridgeSource.CurveUsdcDaiUsdtSusd, ]; /** @@ -30,6 +31,7 @@ export const BUY_SOURCES = [ ERC20BridgeSource.CurveUsdcDaiUsdt, ERC20BridgeSource.CurveUsdcDaiUsdtBusd, ERC20BridgeSource.CurveUsdcDaiUsdtTusd, + ERC20BridgeSource.CurveUsdcDaiUsdtSusd, ]; export const DEFAULT_GET_MARKET_ORDERS_OPTS: GetMarketOrdersOpts = { @@ -94,6 +96,16 @@ export const DEFAULT_CURVE_OPTS: { [source: string]: { version: number; curveAdd '0x4fabb145d64652a948d72533023f6e7a623c7c53', ], }, + [ERC20BridgeSource.CurveUsdcDaiUsdtSusd]: { + version: 1, + curveAddress: '0xa5407eae9ba41422680e2e00537571bcc53efbfd', + tokens: [ + '0x6b175474e89094c44da98b954eedeac495271d0f', + '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + '0xdac17f958d2ee523a2206206994597c13d831ec7', + '0x57ab1ec28d129707052df4df418d58a2d46d5f51', + ], + }, }; export const ERC20_PROXY_ID = '0xf47261b0'; diff --git a/packages/asset-swapper/src/utils/market_operation_utils/orders.ts b/packages/asset-swapper/src/utils/market_operation_utils/orders.ts index 5a9f81d195..3f118f0ab2 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/orders.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/orders.ts @@ -185,6 +185,7 @@ function getBridgeAddressFromSource(source: ERC20BridgeSource, opts: CreateOrder case ERC20BridgeSource.CurveUsdcDaiUsdt: case ERC20BridgeSource.CurveUsdcDaiUsdtTusd: case ERC20BridgeSource.CurveUsdcDaiUsdtBusd: + case ERC20BridgeSource.CurveUsdcDaiUsdtSusd: return opts.contractAddresses.curveBridge; case ERC20BridgeSource.LiquidityProvider: if (opts.liquidityProviderAddress === undefined) { diff --git a/packages/asset-swapper/src/utils/market_operation_utils/types.ts b/packages/asset-swapper/src/utils/market_operation_utils/types.ts index 5953b4e5c6..5f85b85891 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/types.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/types.ts @@ -33,8 +33,9 @@ export enum ERC20BridgeSource { CurveUsdcDai = 'Curve_USDC_DAI', CurveUsdcDaiUsdt = 'Curve_USDC_DAI_USDT', CurveUsdcDaiUsdtTusd = 'Curve_USDC_DAI_USDT_TUSD', - LiquidityProvider = 'LiquidityProvider', CurveUsdcDaiUsdtBusd = 'Curve_USDC_DAI_USDT_BUSD', + CurveUsdcDaiUsdtSusd = 'Curve_USDC_DAI_USDT_SUSD', + LiquidityProvider = 'LiquidityProvider', } // Internal `fillData` field for `Fill` objects. diff --git a/packages/asset-swapper/test/market_operation_utils_test.ts b/packages/asset-swapper/test/market_operation_utils_test.ts index 52224b27e3..43d4a5bbf3 100644 --- a/packages/asset-swapper/test/market_operation_utils_test.ts +++ b/packages/asset-swapper/test/market_operation_utils_test.ts @@ -251,6 +251,7 @@ describe('MarketOperationUtils tests', () => { [ERC20BridgeSource.CurveUsdcDaiUsdt]: _.times(NUM_SAMPLES, () => 0), [ERC20BridgeSource.CurveUsdcDaiUsdtTusd]: _.times(NUM_SAMPLES, () => 0), [ERC20BridgeSource.CurveUsdcDaiUsdtBusd]: _.times(NUM_SAMPLES, () => 0), + [ERC20BridgeSource.CurveUsdcDaiUsdtSusd]: _.times(NUM_SAMPLES, () => 0), [ERC20BridgeSource.LiquidityProvider]: _.times(NUM_SAMPLES, () => 0), };