Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Add Curve sUSD (#2563)
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz authored Apr 23, 2020
1 parent 456f8a9 commit 6063854
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/asset-swapper/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
{
"note": "Collapse `LiquidityProvider` into `DexForwarderBridge`",
"pr": 2560
},
{
"note": "Added Curve `sUSD`",
"pr": 2563
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const SELL_SOURCES = [
ERC20BridgeSource.CurveUsdcDaiUsdt,
ERC20BridgeSource.CurveUsdcDaiUsdtTusd,
ERC20BridgeSource.CurveUsdcDaiUsdtBusd,
ERC20BridgeSource.CurveUsdcDaiUsdtSusd,
];

/**
Expand All @@ -30,6 +31,7 @@ export const BUY_SOURCES = [
ERC20BridgeSource.CurveUsdcDaiUsdt,
ERC20BridgeSource.CurveUsdcDaiUsdtBusd,
ERC20BridgeSource.CurveUsdcDaiUsdtTusd,
ERC20BridgeSource.CurveUsdcDaiUsdtSusd,
];

export const DEFAULT_GET_MARKET_ORDERS_OPTS: GetMarketOrdersOpts = {
Expand Down Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions packages/asset-swapper/test/market_operation_utils_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};

Expand Down

0 comments on commit 6063854

Please sign in to comment.