Add Kyber DMM as a liquidity source (#194)

* Add Kyber DMM as a liquidity source

* update changelog
This commit is contained in:
mzhu25
2021-04-07 10:08:19 -07:00
committed by GitHub
parent 5a15044ead
commit 6045f777ab
7 changed files with 48 additions and 28 deletions

View File

@@ -68,6 +68,7 @@ const DEFAULT_EXCLUDED = [
ERC20BridgeSource.PancakeSwap,
ERC20BridgeSource.BakerySwap,
ERC20BridgeSource.MakerPsm,
ERC20BridgeSource.KyberDmm,
];
const BUY_SOURCES = BUY_SOURCE_FILTER_BY_CHAIN_ID[ChainId.Mainnet].sources;
const SELL_SOURCES = SELL_SOURCE_FILTER_BY_CHAIN_ID[ChainId.Mainnet].sources;
@@ -282,32 +283,12 @@ describe('MarketOperationUtils tests', () => {
[source: string]: Numberish[];
}
const ZERO_RATES: RatesBySource = {
[ERC20BridgeSource.Native]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Eth2Dai]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Uniswap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Kyber]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.UniswapV2]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Balancer]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Bancor]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Curve]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.LiquidityProvider]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.MStable]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Mooniswap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Swerve]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.SnowSwap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.SushiSwap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.MultiHop]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Shell]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Cream]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Dodo]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.DodoV2]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.CryptoCom]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.Linkswap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.PancakeSwap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.BakerySwap]: _.times(NUM_SAMPLES, () => 0),
[ERC20BridgeSource.MakerPsm]: _.times(NUM_SAMPLES, () => 0),
};
const ZERO_RATES: RatesBySource = Object.assign(
{},
...Object.values(ERC20BridgeSource).map(source => ({
[source]: _.times(NUM_SAMPLES, () => 0),
})),
);
const DEFAULT_RATES: RatesBySource = {
...ZERO_RATES,
@@ -372,6 +353,7 @@ describe('MarketOperationUtils tests', () => {
[ERC20BridgeSource.Uniswap]: { router: randomAddress() },
[ERC20BridgeSource.Eth2Dai]: { router: randomAddress() },
[ERC20BridgeSource.MakerPsm]: {},
[ERC20BridgeSource.KyberDmm]: { tokenAddressPath: [] },
};
const DEFAULT_OPS = {