Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: live switch avax quote for 100 percent
We check the following metrics before we decide to increase traffic switch on AVAX: - Is AVAX still sampling at 10%, meanwhile live traffic switched at 1%? Based on the [metrics](https://us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#metricsV2?graph=~(metrics~(~(~(expression~'*28m1*2bm2*29*2f*28m1*2bm2*2bm3*2bm4*29*2a100~label~'AVAX*20sampling*20percent~id~'e1~period~900))~(~(expression~'*28m5*2bm6*29*2f*28m5*2bm6*2bm7*2bm8*29*2a100~label~'AVAX*20traffic*20switch*20percent~id~'e2~period~900))~(~'Uniswap~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_SAMPLING_CHAIN_ID_43114~'Service~'RoutingAPI~(id~'m1~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_SAMPLING_CHAIN_ID_43114~'.~'.~(id~'m2~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_TOTAL_CHAIN_ID_43114~'.~'.~(id~'m3~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_TOTAL_CHAIN_ID_43114~'.~'.~(id~'m4~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_CURRENT_CHAIN_ID_43114~'.~'.~(id~'m7~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_CURRENT_CHAIN_ID_43114~'.~'.~(id~'m8~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_TARGET_CHAIN_ID_43114~'.~'.~(id~'m5~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_TARGET_CHAIN_ID_43114~'.~'.~(id~'m6~visible~false)))~view~'timeSeries~stacked~false~region~'us-east-2~period~900~stat~'Sum~start~'-PT24H~end~'P0D)&query=~'*7bUniswap*2cService*7d*20_TRAFFIC_TARGET_CHAIN_ID_), this appears to be the same: <img width="1286" alt="Screenshot 2024-04-23 at 9 36 12 AM" src="https://github.com/Uniswap/routing-api/assets/91580504/4dbf5cd2-4657-4e6c-961c-63c794bd08f3"> - Is the success rate on the AVAX endpoint and on each AVAX RPC call consistent? AVAX endpoint shows the consistently high success rate: <img width="728" alt="Screenshot 2024-04-23 at 9 58 54 AM" src="https://github.com/Uniswap/routing-api/assets/91580504/0669bea0-5123-46c4-8248-09a2a01c1593"> - Is the latency on the AVAX endpoint consistent? AVAX latency does not change after live switch: <img width="724" alt="Screenshot 2024-04-23 at 9 59 52 AM" src="https://github.com/Uniswap/routing-api/assets/91580504/71a1b926-7c52-404b-9998-3499b013179e"> - Is the RPC call volume only slightly up after quote shadow sampling on AVAX? [AVAX RPC call volume](https://us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#metricsV2?graph=~(metrics~(~(~'Uniswap~'ChainId_43114_V3QuoterQuoteLatency~'Service~'RoutingAPI~(visible~false))~(~'.~'ChainId_43114_ShadowV3QuoterQuoteLatency~'.~'.~(visible~false))~(~'.~'RPC_GATEWAY_43114_INFURA_call_SUCCESS~'.~'.)~(~'.~'RPC_GATEWAY_43114_QUIKNODE_call_FAILED~'.~'.~(visible~false))~(~'.~'RPC_GATEWAY_43114_QUIKNODE_call_SUCCESS~'.~'.)~(~'.~'RPC_GATEWAY_43114_INFURA_call_FAILED~'.~'.~(visible~false)))~view~'timeSeries~stacked~false~region~'us-east-2~start~'-PT12H~end~'P0D~period~60~stat~'Sum)&query=~'*7bUniswap*2cService*7d*2042220*20RPC*20CALL) only shows minimum increase, which is important because when we live switch, we don't expect to see any further more RPC calls due to our optimized implementations: <img width="1286" alt="Screenshot 2024-04-23 at 10 00 57 AM" src="https://github.com/Uniswap/routing-api/assets/91580504/46d03555-62d4-468a-b160-e1895a47e578"> - Is the quote accuracy always 100% between new v3 quoter and current v3 quoter? The [accuracy comparison](https://us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#metricsV2?graph=~(metrics~(~(~(expression~'*28m7*2bm8*29*2f*28m7*2bm8*2bm9*2bm10*29*2a100~label~'Expression1~id~'e1~period~60))~(~'Uniswap~'ChainId_42220_V3QuoterQuoteLatency~'Service~'RoutingAPI~(visible~false~id~'m1))~(~'.~'ChainId_42220_ShadowV3QuoterQuoteLatency~'.~'.~(visible~false~id~'m2))~(~'.~'RPC_GATEWAY_42220_INFURA_call_SUCCESS~'.~'.~(visible~false~id~'m3))~(~'.~'RPC_GATEWAY_42220_QUIKNODE_call_FAILED~'.~'.~(visible~false~id~'m4))~(~'.~'RPC_GATEWAY_42220_QUIKNODE_call_SUCCESS~'.~'.~(visible~false~id~'m5))~(~'.~'RPC_GATEWAY_42220_INFURA_call_FAILED~'.~'.~(visible~false~id~'m6))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_CURRENT_AND_TARGET_QUOTES_MATCH_CHAIN_ID_43114~'.~'.~(id~'m7~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_CURRENT_AND_TARGET_QUOTES_MATCH_CHAIN_ID_43114~'.~'.~(id~'m8~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_IN_TRAFFIC_CURRENT_AND_TARGET_QUOTES_MISMATCH_CHAIN_ID_43114~'.~'.~(id~'m9~visible~false))~(~'.~'ON_CHAIN_QUOTE_PROVIDER_EXACT_OUT_TRAFFIC_CURRENT_AND_TARGET_QUOTES_MISMATCH_CHAIN_ID_43114~'.~'.~(id~'m10~visible~false)))~view~'timeSeries~stacked~false~region~'us-east-2~start~'-PT3H~end~'P0D~period~60~stat~'Sum)&query=~'*7bUniswap*2cService*7d*2042220) shows it's always at 100%: <img width="1288" alt="Screenshot 2024-04-23 at 10 02 40 AM" src="https://github.com/Uniswap/routing-api/assets/91580504/a8bad331-b316-436a-b422-41af34ae545d">
- Loading branch information