From 38a94d549d4c3bb9a9dc866d211e3370d69b719a Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Fri, 29 Aug 2025 14:43:20 -0700 Subject: [PATCH 1/2] fix: increase unichain gas batch size --- lib/util/onChainQuoteProviderConfigs.ts | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/util/onChainQuoteProviderConfigs.ts b/lib/util/onChainQuoteProviderConfigs.ts index f91a83033a..d52cc685f4 100644 --- a/lib/util/onChainQuoteProviderConfigs.ts +++ b/lib/util/onChainQuoteProviderConfigs.ts @@ -154,8 +154,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 1320, + gasLimitPerCall: 100_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -242,8 +242,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 1320, + gasLimitPerCall: 100_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -331,8 +331,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 1320, + gasLimitPerCall: 100_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -414,8 +414,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 1320, + gasLimitPerCall: 100_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -508,8 +508,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 660, + gasLimitPerCall: 200_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -596,8 +596,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 660, + gasLimitPerCall: 200_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -685,8 +685,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 660, + gasLimitPerCall: 200_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -757,8 +757,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 660, + gasLimitPerCall: 200_000, quoteMinSuccessRate: 0.1, }, // TODO: once monad-testnet has view-quoter, optimize muilcallChunk and gasLimitPerCall From 92be625a46cef2baf06bea1b20ddda3333e16626 Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:47:07 -0700 Subject: [PATCH 2/2] fix: adjust the batch size according to prod stats --- lib/util/onChainQuoteProviderConfigs.ts | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/util/onChainQuoteProviderConfigs.ts b/lib/util/onChainQuoteProviderConfigs.ts index d52cc685f4..ca9a9a9fcf 100644 --- a/lib/util/onChainQuoteProviderConfigs.ts +++ b/lib/util/onChainQuoteProviderConfigs.ts @@ -154,8 +154,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 1320, - gasLimitPerCall: 100_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -242,8 +242,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 1320, - gasLimitPerCall: 100_000, + multicallChunk: 160, + gasLimitPerCall: 600_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -314,8 +314,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain-sepolia has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN_SEPOLIA]: { - multicallChunk: 80, - gasLimitPerCall: 1_200_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once monad-testnet has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -331,8 +331,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 1320, - gasLimitPerCall: 100_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -414,8 +414,8 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol]: { }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 1320, - gasLimitPerCall: 100_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -508,8 +508,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 660, - gasLimitPerCall: 200_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -596,8 +596,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 660, - gasLimitPerCall: 200_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -685,8 +685,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 660, - gasLimitPerCall: 200_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once soneium has view-quoter, optimize muilcallChunk and gasLimitPerCall @@ -757,8 +757,8 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol in Protocol] }, // TODO: once unichain has view-quoter, optimize muilcallChunk and gasLimitPerCall [ChainId.UNICHAIN]: { - multicallChunk: 660, - gasLimitPerCall: 200_000, + multicallChunk: 400, + gasLimitPerCall: 240_000, quoteMinSuccessRate: 0.1, }, // TODO: once monad-testnet has view-quoter, optimize muilcallChunk and gasLimitPerCall