feat: adjusting CURVE_CALL_GAS for SnowSwap, disabling yVaultUSDUnderlying pool for underlying tokens

This commit is contained in:
Romain Butteaud 2020-10-15 16:46:14 -07:00
parent 03bc15fbdf
commit b798556774
2 changed files with 14 additions and 13 deletions

View File

@ -37,7 +37,7 @@ contract CurveSampler is
/// @dev Base gas limit for Curve calls. Some Curves have multiple tokens
/// So a reasonable ceil is 150k per token. Biggest Curve has 4 tokens.
uint256 constant private CURVE_CALL_GAS = 600e3; // Was 600k for Curve but SnowSwap is using 1500k+
uint256 constant private CURVE_CALL_GAS = 2000e3; // Was 600k for Curve but SnowSwap is using 1500k+
/// @dev Sample sell quotes from Curve.
/// @param curveInfo Curve information specific to this token pair.

View File

@ -218,18 +218,19 @@ export const MAINNET_SNOWSWAP_INFOS: { [name: string]: CurveInfo } = {
'0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a', // yTUSD
],
},
yVaultUSDUnderlying: {
exchangeFunctionSelector: CurveFunctionSelectors.exchange_underlying,
sellQuoteFunctionSelector: CurveFunctionSelectors.get_dy_underlying,
buyQuoteFunctionSelector: CurveFunctionSelectors.get_dx_underlying,
poolAddress: '0x4571753311e37ddb44faa8fb78a6df9a6e3c6c0b',
tokens: [
'0x6b175474e89094c44da98b954eedeac495271d0f', // DAI
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC
'0xdac17f958d2ee523a2206206994597c13d831ec7', // USDT
'0x0000000000085d4780b73119b644ae5ecd22b376', // TUSD
],
},
// Gas is too high for these underlying tokens (3M+)
// yVaultUSDUnderlying: {
// exchangeFunctionSelector: CurveFunctionSelectors.exchange_underlying,
// sellQuoteFunctionSelector: CurveFunctionSelectors.get_dy_underlying,
// buyQuoteFunctionSelector: CurveFunctionSelectors.get_dx_underlying,
// poolAddress: '0x4571753311e37ddb44faa8fb78a6df9a6e3c6c0b',
// tokens: [
// '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI
// '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC
// '0xdac17f958d2ee523a2206206994597c13d831ec7', // USDT
// '0x0000000000085d4780b73119b644ae5ecd22b376', // TUSD
// ],
// },
};
export const MAINNET_KYBER_RESERVE_IDS: { [name: string]: string } = {