Skip to content

Commit

Permalink
Disable hop sources to avoid excess inaccuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz committed Nov 25, 2020
1 parent b7a74c4 commit 2c924bb
Showing 1 changed file with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1026,15 +1026,9 @@ export class SamplerOperations {
});
return sushiOps;
case ERC20BridgeSource.CryptoCom:
const cryptoComOps = [
this.getCryptoComSellQuotes([takerToken, makerToken], takerFillAmounts),
];
intermediateTokens.forEach(t => {
cryptoComOps.push(
this.getCryptoComSellQuotes([takerToken, t, makerToken], takerFillAmounts),
);
});
return cryptoComOps;
// Currently we avoid intermediate swaps as in effect the price at sample time
// is often arbed back to price parity with Uniswap/Sushi
return this.getCryptoComSellQuotes([takerToken, makerToken], takerFillAmounts);
case ERC20BridgeSource.Kyber:
return getKyberReserveIdsForPair(takerToken, makerToken).map(reserveId =>
this.getKyberSellQuotes(reserveId, makerToken, takerToken, takerFillAmounts),
Expand Down Expand Up @@ -1149,15 +1143,9 @@ export class SamplerOperations {
});
return sushiOps;
case ERC20BridgeSource.CryptoCom:
const cryptoComOps = [
this.getCryptoComBuyQuotes([takerToken, makerToken], makerFillAmounts),
];
intermediateTokens.forEach(t => {
cryptoComOps.push(
this.getCryptoComBuyQuotes([takerToken, t, makerToken], makerFillAmounts),
);
});
return cryptoComOps;
// Currently we avoid intermediate swaps as in effect the price at sample time
// is often arbed back to price parity with Uniswap/Sushi
return this.getCryptoComBuyQuotes([takerToken, makerToken], makerFillAmounts);
case ERC20BridgeSource.Kyber:
return getKyberReserveIdsForPair(takerToken, makerToken).map(reserveId =>
this.getKyberBuyQuotes(reserveId, makerToken, takerToken, makerFillAmounts),
Expand Down

0 comments on commit 2c924bb

Please sign in to comment.