Closed 0xouzm closed 2 years ago
Hey! Your configs look correct. Can you check your logs in cloudwatch to see where where the error is from? I'm guessing the error is occurring during the RPC call. In that case, can you check infura logs?
Sorry , I have rolled back to the previous commit version: 468fbff, and happy to get the result, the log group has been deleted. After an afternoon of debugging, I am sure the s3 cache is working, the schedual time of poolcache and tokenlist cache are set at 15 min by default, but the avg request time of the query api still stuck at about 10 seconds, which is far slower than the official (https://api.uniswap.org/v1/quote) api, which is around 2~3 seconds per request. So I digged in to the smart-order-roter logs as following:
[
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"level": 30,
"event": {
"resource": "/quote",
"path": "/quote",
"httpMethod": "GET",
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"CloudFront-Forwarded-Proto": "https",
"CloudFront-Is-Desktop-Viewer": "true",
"CloudFront-Is-Mobile-Viewer": "false",
"CloudFront-Is-SmartTV-Viewer": "false",
"CloudFront-Is-Tablet-Viewer": "false",
"CloudFront-Viewer-Country": "US",
"Host": "xxxxx.execute-api.ap-southeast-1.amazonaws.com",
"origin": "https://app.uniswap.org",
"Postman-Token": "66b548d2-f8e0-460d-b0b5-eaec591b4b1a",
"User-Agent": "PostmanRuntime/7.29.0",
"Via": "1.1 d440a00f2a23058d6ebb4241e0a5ff0a.cloudfront.net (CloudFront)",
"X-Amz-Cf-Id": "lF4MKR5bOGbUnUJUbUjW9lCHdS-PMzUx5iR7WNbsjiViurOLlODFRw==",
"X-Amzn-Trace-Id": "Root=1-62a3261c-7a14d36f1b80b42c7a15d354",
"X-Forwarded-For": "199.19.107.6, 64.252.189.70",
"X-Forwarded-Port": "443",
"X-Forwarded-Proto": "https"
},
"multiValueHeaders": {
"Accept": [
"*/*"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Cache-Control": [
"no-cache"
],
"CloudFront-Forwarded-Proto": [
"https"
],
"CloudFront-Is-Desktop-Viewer": [
"true"
],
"CloudFront-Is-Mobile-Viewer": [
"false"
],
"CloudFront-Is-SmartTV-Viewer": [
"false"
],
"CloudFront-Is-Tablet-Viewer": [
"false"
],
"CloudFront-Viewer-Country": [
"US"
],
"Host": [
"xxxxx.execute-api.ap-southeast-1.amazonaws.com"
],
"origin": [
"https://app.uniswap.org"
],
"Postman-Token": [
"66b548d2-f8e0-460d-b0b5-eaec591b4b1a"
],
"User-Agent": [
"PostmanRuntime/7.29.0"
],
"Via": [
"1.1 d440a00f2a23058d6ebb4241e0a5ff0a.cloudfront.net (CloudFront)"
],
"X-Amz-Cf-Id": [
"lF4MKR5bOGbUnUJUbUjW9lCHdS-PMzUx5iR7WNbsjiViurOLlODFRw=="
],
"X-Amzn-Trace-Id": [
"Root=1-62a3261c-7a14d36f1b80b42c7a15d354"
],
"X-Forwarded-For": [
"199.19.107.6, 64.252.189.70"
],
"X-Forwarded-Port": [
"443"
],
"X-Forwarded-Proto": [
"https"
]
},
"queryStringParameters": {
"amount": "1000000000000",
"protocols": "v3",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"tokenInChainId": "1",
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenOutChainId": "1",
"type": "exactIn"
},
"multiValueQueryStringParameters": {
"amount": [
"1000000000000"
],
"protocols": [
"v3"
],
"tokenInAddress": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"tokenInChainId": [
"1"
],
"tokenOutAddress": [
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"tokenOutChainId": [
"1"
],
"type": [
"exactIn"
]
},
"pathParameters": null,
"stageVariables": null,
"requestContext": {
"resourceId": "vhgbo9",
"resourcePath": "/quote",
"httpMethod": "GET",
"extendedRequestId": "TgLkiFivSQ0FiLw=",
"requestTime": "10/Jun/2022:11:08:12 +0000",
"path": "/prod/quote",
"accountId": "358458194098",
"protocol": "HTTP/1.1",
"stage": "prod",
"domainPrefix": "xxxxx",
"requestTimeEpoch": 1654859292897,
"requestId": "9a0c91e7-0eef-4504-a952-e3e92633f295",
"identity": {
"cognitoIdentityPoolId": null,
"accountId": null,
"cognitoIdentityId": null,
"caller": null,
"sourceIp": "199.19.107.6",
"principalOrgId": null,
"accessKey": null,
"cognitoAuthenticationType": null,
"cognitoAuthenticationProvider": null,
"userArn": null,
"userAgent": "PostmanRuntime/7.29.0",
"user": null
},
"domainName": "xxxxx.execute-api.ap-southeast-1.amazonaws.com",
"apiId": "xxxxx"
},
"body": null,
"isBase64Encoded": false
},
"context": {
"callbackWaitsForEmptyEventLoop": true,
"functionVersion": "1",
"functionName": "RoutingAPIStack-RoutingLamb-RoutingLambda2C4DF0900-ANUuDtjZvAGV",
"memoryLimitInMB": "1024",
"logGroupName": "/aws/lambda/RoutingAPIStack-RoutingLamb-RoutingLambda2C4DF0900-ANUuDtjZvAGV",
"logStreamName": "2022/06/10/[1]2fc84cc23c36482992b5d75afab16459",
"invokedFunctionArn": "arn:aws:lambda:ap-southeast-1:358458194098:function:RoutingAPIStack-RoutingLamb-RoutingLambda2C4DF0900-ANUuDtjZvAGV:live",
"awsRequestId": "f5808ced-06a4-4f4f-93a8-9281962fe154"
},
"msg": "Request started.",
"time": "2022-06-10T11:08:12.943Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"msg": "Got input token from token list",
"time": "2022-06-10T11:08:12.944Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"msg": "Got input token from token list",
"time": "2022-06-10T11:08:12.944Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"amountIn": "1000000",
"token0Address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"token1Address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"token0Symbol": "WETH",
"token1Symbol": "USDT",
"tokenInSymbol": "USDT",
"tokenOutSymbol": "WETH",
"tokenPairSymbol": "USDT/WETH",
"tokenPairSymbolChain": "USDT/WETH/1",
"routingConfig": {
"v2PoolSelection": {
"topN": 3,
"topNDirectSwaps": 1,
"topNTokenInOut": 5,
"topNSecondHop": 2,
"topNWithEachBaseToken": 2,
"topNWithBaseToken": 6
},
"v3PoolSelection": {
"topN": 2,
"topNDirectSwaps": 2,
"topNTokenInOut": 3,
"topNSecondHop": 1,
"topNWithEachBaseToken": 3,
"topNWithBaseToken": 5
},
"maxSwapsPerPath": 3,
"minSplits": 1,
"maxSplits": 7,
"distributionPercent": 5,
"forceCrossProtocol": false,
"protocols": [
"V3"
]
},
"msg": "Exact In Swap: Give 1000000 USDT, Want: WETH. Chain: 1",
"time": "2022-06-10T11:08:12.944Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Gas station price local cache miss.",
"time": "2022-06-10T11:08:12.954Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"feeHistory": {
"baseFeePerGas": [
{
"type": "BigNumber",
"hex": "0x0869460f47"
},
{
"type": "BigNumber",
"hex": "0x0789a4b43d"
},
{
"type": "BigNumber",
"hex": "0x087ad0720b"
},
{
"type": "BigNumber",
"hex": "0x09553c6592"
},
{
"type": "BigNumber",
"hex": "0x08d322b4a4"
}
],
"gasUsedRatio": [
0.08457617353685368,
0.999928366189108,
0.9024696,
0.28218917560335666
],
"oldestBlock": {
"type": "BigNumber",
"hex": "0xe3eff1"
},
"reward": [
{
"type": "BigNumber",
"hex": "0x3b9aca00"
},
{
"type": "BigNumber",
"hex": "0x59682f00"
},
{
"type": "BigNumber",
"hex": "0x59682f00"
},
{
"type": "BigNumber",
"hex": "0x3b9aca00"
}
]
},
"feeHistoryReadable": {
"baseFeePerGas": [
"36125937479",
"32374043709",
"36420219403",
"40084727186",
"37902005412"
],
"oldestBlock": "14938097",
"reward": [
"1000000000",
"1500000000",
"1500000000",
"1000000000"
]
},
"nextBlockBaseFeePerGas": "37902005412",
"averagePriorityFeePerGas": "1250000000",
"msg": "Got fee history from provider and computed gas estimate",
"time": "2022-06-10T11:08:13.814Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Estimated gas price in wei: 39152005412 as of block 14938101",
"time": "2022-06-10T11:08:13.814Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Found 11 pools already in local cache. About to get liquidity and slot0s for 1 pools.",
"time": "2022-06-10T11:08:13.814Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Got liquidity and slot0s for 1 pools ",
"time": "2022-06-10T11:08:15.515Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"invalidPools": [
"WETH/USDT/0.01%"
],
"msg": "1 pools invalid after checking their slot0 and liquidity results. Dropping.",
"time": "2022-06-10T11:08:15.515Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"protocols": [
"V3"
],
"swapType": 0,
"msg": "Routing across V3",
"time": "2022-06-10T11:08:15.516Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Starting to get V3 quotes",
"time": "2022-06-10T11:08:15.516Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "In new AWS subgraph provider for protocol V3",
"time": "2022-06-10T11:08:15.516Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"subgraphPoolsSample": [
{
"id": "0x0001fcbba8eb491c3ccfeddc5a5caba1a98c4c28",
"token0": {
"id": "0xbef81556ef066ec840a540595c8d12f516b6378f"
},
"token1": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"feeTier": "10000",
"liquidity": "303015134493562686441",
"tvlETH": 0.01365551549733099,
"tvlUSD": 25.510117904012294
},
{
"id": "0x0002e63328169d7feea121f1e32e4f620abf0352",
"token0": {
"id": "0x0d438f3b5175bebc262bf23753c1e53d03432bde"
},
"token1": {
"id": "0x903bef1736cddf2a537176cf3c64579c3867a881"
},
"feeTier": "3000",
"liquidity": "15673931107413316",
"tvlETH": 27.932622980898838,
"tvlUSD": 49214.961482318744
},
{
"id": "0x000ea4a83acefdd62b1b43e9ccc281f442651520",
"token0": {
"id": "0x4fabb145d64652a948d72533023f6e7a623c7c53"
},
"token1": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"feeTier": "3000",
"liquidity": "5508168315607950206",
"tvlETH": 4.331843674316164,
"tvlUSD": 12690.219133863691
},
{
"id": "0x0025ade782cc2b2415d1e841a8d52ff5dce33dfe",
"token0": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"token1": {
"id": "0xea5b19c073f8074f9a8dcd693d01b6acb1c26ae4"
},
"feeTier": "3000",
"liquidity": "292918389273214376584",
"tvlETH": 1.2659860615921164,
"tvlUSD": 3443.6778412780213
},
{
"id": "0x0041426a64a85ef884387dc3a69f9df1fbb7f9d1",
"token0": {
"id": "0xa00055e6ee4d1f4169096ecb682f70caa8c29987"
},
"token1": {
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"feeTier": "3000",
"liquidity": "102614506583073056",
"tvlETH": 0.004641008378579046,
"tvlUSD": 12.032314
}
],
"msg": "Subgraph pools fetched from local cache for protocol V3. Num: 3049",
"time": "2022-06-10T11:08:15.516Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"samplePools": [
{
"id": "0x0001fcbba8eb491c3ccfeddc5a5caba1a98c4c28",
"token0": {
"id": "0xbef81556ef066ec840a540595c8d12f516b6378f"
},
"token1": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"feeTier": "10000",
"liquidity": "303015134493562686441",
"tvlETH": 0.01365551549733099,
"tvlUSD": 25.510117904012294
},
{
"id": "0x0002e63328169d7feea121f1e32e4f620abf0352",
"token0": {
"id": "0x0d438f3b5175bebc262bf23753c1e53d03432bde"
},
"token1": {
"id": "0x903bef1736cddf2a537176cf3c64579c3867a881"
},
"feeTier": "3000",
"liquidity": "15673931107413316",
"tvlETH": 27.932622980898838,
"tvlUSD": 49214.961482318744
},
{
"id": "0x000ea4a83acefdd62b1b43e9ccc281f442651520",
"token0": {
"id": "0x4fabb145d64652a948d72533023f6e7a623c7c53"
},
"token1": {
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"feeTier": "3000",
"liquidity": "5508168315607950206",
"tvlETH": 4.331843674316164,
"tvlUSD": 12690.219133863691
}
],
"msg": "Got all pools from V3 subgraph provider",
"time": "2022-06-10T11:08:15.516Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "After filtering blocked tokens went from 3049 to 3047.",
"time": "2022-06-10T11:08:15.536Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Getting the 9 tokens within the 14 V3 pools we are considering",
"time": "2022-06-10T11:08:15.579Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"addressesToFindInPrimary": [],
"msg": "Found 9 out of 9 tokens in local cache.",
"time": "2022-06-10T11:08:15.579Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"topByBaseWithTokenIn": [
"WETH/USDT/3000",
"USDC/USDT/100",
"WETH/USDT/500",
"WETH/USDT/10000",
"USDC/USDT/500"
],
"topByBaseWithTokenOut": [
"USDC/WETH/3000",
"USDC/WETH/500",
"WBTC/WETH/3000",
"WETH/USDT/3000",
"WBTC/WETH/500"
],
"topByTVL": [
"UMIIE/UMIIE2/500",
"DAI/USDC/100"
],
"topByTVLUsingTokenIn": [
"USDC/USDT/100",
"WETH/USDT/10000",
"1INCH/USDT/10000"
],
"topByTVLUsingTokenOut": [
"USDC/WETH/3000",
"USDC/WETH/500",
"WBTC/WETH/3000"
],
"topByTVLUsingTokenInSecondHops": [
"DAI/USDC/500"
],
"topByTVLUsingTokenOutSecondHops": [
"FRAX/USDC/500"
],
"top2DirectSwap": [
"WETH/USDT/3000",
"WETH/USDT/500"
],
"top2EthQuotePool": [],
"msg": "V3 Candidate Pools",
"time": "2022-06-10T11:08:15.579Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Found 14 pools already in local cache. About to get liquidity and slot0s for 0 pools.",
"time": "2022-06-10T11:08:15.579Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Running token validator on 14 pools",
"time": "2022-06-10T11:08:15.580Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Got token validation results for 0 tokens from cache. Getting 9 on-chain.",
"time": "2022-06-10T11:08:15.580Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"routes": [
"USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH",
"USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH",
"USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH",
"USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDT -- 1% [0xC5aF84701f98Fa483eCe78aF83F11b6C38ACA71D] --> WETH",
"USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH",
"USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH",
"USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH",
"USDT -- 1% [0xC5aF84701f98Fa483eCe78aF83F11b6C38ACA71D] --> WETH",
"USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH",
"USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH",
"USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDT -- 1% [0xC5aF84701f98Fa483eCe78aF83F11b6C38ACA71D] --> WETH",
"USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH",
"USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH"
],
"msg": "Computed 13 possible routes.",
"time": "2022-06-10T11:08:17.330Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Getting quotes for V3 for 13 routes with 20 amounts per route.",
"time": "2022-06-10T11:08:17.330Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "About to get 260 quotes in chunks of 130 [130,130] with a gas limit override of 705000 and block number: 14938100 [Original before offset: 14938100].",
"time": "2022-06-10T11:08:18.181Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Starting attempt: 1. Currently 0 success, 0 failed, 2 pending. Gas limit override: 705000 Block number override: [object Promise].",
"time": "2022-06-10T11:08:18.181Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"msg": "Got 260 successful quotes, 0 failed quotes. Took 0 attempt loops. Total calls made to provider: 2. Have retried for timeout: false",
"time": "2022-06-10T11:08:21.736Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"top5": [
"563.737008013838595316 (100.00% QuoteGasAdj[563.737008013838595316] Quote[563.746991775218655316] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH)",
"563.39967128045097124 (100.00% QuoteGasAdj[563.39967128045097124] Quote[563.41086875399880324] Gas[286000] = USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH)",
"562.169747258663853228 (100.00% QuoteGasAdj[562.169747258663853228] Quote[562.179731020043913228] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH)"
],
"onQueue": 40,
"msg": "Top 3 with 1 splits",
"time": "2022-06-10T11:08:21.780Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"top5": [
"563.806025515757583577 (90.00% QuoteGasAdj[507.430721968507915736] Quote[507.440705729887975736] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 10.00% QuoteGasAdj[56.375303547249667841] Quote[56.379727723861223841] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH)",
"563.798529552494725217 (95.00% QuoteGasAdj[535.58575964922223989] Quote[535.59574341060229989] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 5.00% QuoteGasAdj[28.212769903272485327] Quote[28.217194079884041327] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH)",
"563.755261989242623876 (85.00% QuoteGasAdj[479.271894207126857546] Quote[479.281877968506917546] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 15.00% QuoteGasAdj[84.48336778211576633] Quote[84.48779195872732233] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH)"
],
"onQueue": 180,
"msg": "Top 3 with 2 splits",
"time": "2022-06-10T11:08:21.798Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"top5": [
"563.815391312252876682 (85.00% QuoteGasAdj[479.271894207126857546] Quote[479.281877968506917546] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 10.00% QuoteGasAdj[56.375303547249667841] Quote[56.379727723861223841] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 5.00% QuoteGasAdj[28.168193557876351295] Quote[28.172617734487907295] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH)",
"563.811685429656752358 (90.00% QuoteGasAdj[507.430721968507915736] Quote[507.440705729887975736] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 5.00% QuoteGasAdj[28.212769903272485327] Quote[28.217194079884041327] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 5.00% QuoteGasAdj[28.168193557876351295] Quote[28.172617734487907295] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH)",
"563.810997056209030841 (80.00% QuoteGasAdj[451.10927559917641458] Quote[451.11925936055647458] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 10.00% QuoteGasAdj[56.375303547249667841] Quote[56.379727723861223841] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 10.00% QuoteGasAdj[56.32641790978294842] Quote[56.33084208639450442] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH)"
],
"onQueue": 408,
"msg": "Top 3 with 3 splits",
"time": "2022-06-10T11:08:21.817Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"top5": [
"563.802479071855143786 (85.00% QuoteGasAdj[479.271894207126857546] Quote[479.281877968506917546] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 5.00% QuoteGasAdj[28.212769903272485327] Quote[28.217194079884041327] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 5.00% QuoteGasAdj[28.168193557876351295] Quote[28.172617734487907295] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH, 5.00% QuoteGasAdj[28.149621403579449618] Quote[28.158391452791737618] Gas[224000] = USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH)",
"563.802394107881883334 (80.00% QuoteGasAdj[451.10927559917641458] Quote[451.11925936055647458] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 10.00% QuoteGasAdj[56.375303547249667841] Quote[56.379727723861223841] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 5.00% QuoteGasAdj[28.168193557876351295] Quote[28.172617734487907295] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH, 5.00% QuoteGasAdj[28.149621403579449618] Quote[28.158391452791737618] Gas[224000] = USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH)",
"563.794208238595457434 (75.00% QuoteGasAdj[422.942865377983391555] Quote[422.952849139363451555] Gas[255000] = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, 10.00% QuoteGasAdj[56.375303547249667841] Quote[56.379727723861223841] Gas[113000] = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, 10.00% QuoteGasAdj[56.32641790978294842] Quote[56.33084208639450442] Gas[113000] = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH, 5.00% QuoteGasAdj[28.149621403579449618] Quote[28.158391452791737618] Gas[224000] = USDT -- 0.05% [0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf] --> USDC -- 0.3% [0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8] --> WETH)"
],
"onQueue": 590,
"msg": "Top 3 with 4 splits",
"time": "2022-06-10T11:08:21.841Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"estimatedGasUsedUSD": "33.289861",
"normalizedUsdToken": {
"chainId": 1,
"decimals": 18,
"symbol": "DAI",
"name": "Dai Stablecoin",
"isNative": false,
"isToken": true,
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
},
"routeUSDGasEstimates": [
"85% USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH 17.648471",
"10% USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH 7.820695",
"5% USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH 7.820695"
],
"flatL1GasCostUSD": "0",
"msg": "USD gas estimates of best route",
"time": "2022-06-10T11:08:21.854Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000",
"type": "exactIn",
"level": 30,
"routes": "[V3] 85.00% = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, [V3] 10.00% = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, [V3] 5.00% = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH",
"numSplits": 3,
"quote": "563.834223426856048682",
"quoteGasAdjusted": "563.81",
"estimatedGasUSD": "33.28",
"estimatedGasToken": "0.01",
"msg": "Found best swap route. 3 split.",
"time": "2022-06-10T11:08:21.856Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"requestQueryParams": {
"amount": "1000000000000",
"protocols": [
"v3"
],
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"tokenInChainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenOutChainId": 1,
"type": "exactIn"
},
"msg": "Handler returned 200",
"time": "2022-06-10T11:08:21.859Z",
"v": 0
},
{
"name": "quote",
"requestId": "f5808ced-06a4-4f4f-93a8-9281962fe154",
"hostname": "169.254.152.185",
"pid": 13,
"quoteId": "f5808",
"tokenInAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": 1,
"tokenOutAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "1000000000000",
"type": "exactIn",
"level": 30,
"statusCode": 200,
"response": {
"blockNumber": "14938100",
"amount": "1000000000000",
"amountDecimals": "1000000",
"quote": "563834223426856048682",
"quoteDecimals": "563.834223426856048682",
"quoteGasAdjusted": "563815391312252876682",
"quoteGasAdjustedDecimals": "563.815391312252876682",
"gasUseEstimateQuote": "18832114603172000",
"gasUseEstimateQuoteDecimals": "0.018832114603172",
"gasUseEstimate": "481000",
"gasUseEstimateUSD": "33.289861",
"gasPriceWei": "39152005412",
"route": [
[
{
"type": "v3-pool",
"address": "0x3416cF6C708Da44DB2624D63ea0AAef7113527C6",
"tokenIn": {
"chainId": 1,
"decimals": "6",
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT"
},
"tokenOut": {
"chainId": 1,
"decimals": "6",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC"
},
"fee": "100",
"liquidity": "176462564160186116",
"sqrtRatioX96": "79260288204759816074168066547",
"tickCurrent": "8",
"amountIn": "850000000000"
},
{
"type": "v3-pool",
"address": "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
"tokenIn": {
"chainId": 1,
"decimals": "6",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC"
},
"tokenOut": {
"chainId": 1,
"decimals": "18",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "WETH"
},
"fee": "500",
"liquidity": "17578597635769984306",
"sqrtRatioX96": "1883834121643951821403053316292014",
"tickCurrent": "201539",
"amountOut": "479281877968506917546"
}
],
[
{
"type": "v3-pool",
"address": "0x11b815efB8f581194ae79006d24E0d814B7697F6",
"tokenIn": {
"chainId": 1,
"decimals": "6",
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT"
},
"tokenOut": {
"chainId": 1,
"decimals": "18",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "WETH"
},
"fee": "500",
"liquidity": "1224256926900723592",
"sqrtRatioX96": "3332640325185967999856055",
"tickCurrent": "-201537",
"amountIn": "100000000000",
"amountOut": "56379727723861223841"
}
],
[
{
"type": "v3-pool",
"address": "0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36",
"tokenIn": {
"chainId": 1,
"decimals": "6",
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT"
},
"tokenOut": {
"chainId": 1,
"decimals": "18",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "WETH"
},
"fee": "3000",
"liquidity": "4637394742920926679",
"sqrtRatioX96": "3332292167521119174147138",
"tickCurrent": "-201539",
"amountIn": "50000000000",
"amountOut": "28172617734487907295"
}
]
],
"routeString": "[V3] 85.00% = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC -- 0.05% [0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640] --> WETH, [V3] 10.00% = USDT -- 0.05% [0x11b815efB8f581194ae79006d24E0d814B7697F6] --> WETH, [V3] 5.00% = USDT -- 0.3% [0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36] --> WETH",
"quoteId": "f5808"
},
"msg": "Request ended. 200",
"time": "2022-06-10T11:08:21.859Z",
"v": 0
}
]
"msg": "Request started.",
"time": "2022-06-10T11:08:12.943Z",
-------------
"msg": "Got input token from token list",
"time": "2022-06-10T11:08:12.944Z",
-------------
"msg": "Got input token from token list",
"time": "2022-06-10T11:08:12.944Z",
-------------
"msg": "Exact In Swap: Give 1000000 USDT, Want: WETH. Chain: 1",
"time": "2022-06-10T11:08:12.944Z",
-------------
"msg": "Gas station price local cache miss.",
"time": "2022-06-10T11:08:12.954Z",
-------------
"msg": "Got fee history from provider and computed gas estimate",
"time": "2022-06-10T11:08:13.814Z",
-------------
"msg": "Estimated gas price in wei: 39152005412 as of block 14938101",
"time": "2022-06-10T11:08:13.814Z",
-------------
"msg": "Found 11 pools already in local cache. About to get liquidity and slot0s for 1 pools.",
"time": "2022-06-10T11:08:13.814Z",
-------------
"msg": "Got liquidity and slot0s for 1 pools ",
"time": "2022-06-10T11:08:15.515Z",
-------------
"msg": "1 pools invalid after checking their slot0 and liquidity results. Dropping.",
"time": "2022-06-10T11:08:15.515Z",
-------------
"msg": "Routing across V3",
"time": "2022-06-10T11:08:15.516Z",
-------------
"msg": "Starting to get V3 quotes",
"time": "2022-06-10T11:08:15.516Z",
-------------
"msg": "In new AWS subgraph provider for protocol V3",
"time": "2022-06-10T11:08:15.516Z",
-------------
"msg": "Subgraph pools fetched from local cache for protocol V3. Num: 3049",
"time": "2022-06-10T11:08:15.516Z",
-------------
"msg": "Got all pools from V3 subgraph provider",
"time": "2022-06-10T11:08:15.516Z",
-------------
"msg": "After filtering blocked tokens went from 3049 to 3047.",
"time": "2022-06-10T11:08:15.536Z",
-------------
"msg": "Getting the 9 tokens within the 14 V3 pools we are considering",
"time": "2022-06-10T11:08:15.579Z",
-------------
"msg": "Found 9 out of 9 tokens in local cache.",
"time": "2022-06-10T11:08:15.579Z",
-------------
"msg": "V3 Candidate Pools",
"time": "2022-06-10T11:08:15.579Z",
-------------
"msg": "Found 14 pools already in local cache. About to get liquidity and slot0s for 0 pools.",
"time": "2022-06-10T11:08:15.579Z",
-------------
"msg": "Running token validator on 14 pools",
"time": "2022-06-10T11:08:15.580Z",
-------------
"msg": "Got token validation results for 0 tokens from cache. Getting 9 on-chain.",
"time": "2022-06-10T11:08:15.580Z",
-------------
"msg": "Computed 13 possible routes.",
"time": "2022-06-10T11:08:17.330Z",
-------------
"msg": "Getting quotes for V3 for 13 routes with 20 amounts per route.",
"time": "2022-06-10T11:08:17.330Z",
-------------
"msg": "About to get 260 quotes in chunks of 130 [130,130] with a gas limit override of 705000 and block number: 14938100 [Original before offset: 14938100].",
"time": "2022-06-10T11:08:18.181Z",
-------------
"msg": "Starting attempt: 1. Currently 0 success, 0 failed, 2 pending. Gas limit override: 705000 Block number override: [object Promise].",
"time": "2022-06-10T11:08:18.181Z",
-------------
"msg": "Got 260 successful quotes, 0 failed quotes. Took 0 attempt loops. Total calls made to provider: 2. Have retried for timeout: false",
-------------
"time": "2022-06-10T11:08:21.736Z",
-------------
"msg": "Top 3 with 1 splits",
"time": "2022-06-10T11:08:21.780Z",
-------------
"msg": "Top 3 with 2 splits",
"time": "2022-06-10T11:08:21.798Z",
-------------
"msg": "Top 3 with 3 splits",
"time": "2022-06-10T11:08:21.817Z",
-------------
"msg": "Top 3 with 4 splits",
"time": "2022-06-10T11:08:21.841Z",
-------------
"msg": "USD gas estimates of best route",
"time": "2022-06-10T11:08:21.854Z",
-------------
"msg": "Found best swap route. 3 split.",
"time": "2022-06-10T11:08:21.856Z",
-------------
"msg": "Handler returned 200",
"time": "2022-06-10T11:08:21.859Z",
-------------
"msg": "Request ended. 200",
"time": "2022-06-10T11:08:21.859Z",
-------------
The requests are made of 35 different steps, some cache is mising, some sended multicall to the uni router to get the right data. I don't know how to compress the request time under 3 seconds, all of the requests seems resonable, but the official api is so quick, wondering if more different requests will cache more data to the node-cache module.
perhaps api.uniswap.org doesnt run it on a lambda?
no idea.
JinKind Ho @.***>于2022年7月2日 周六下午5:53写道:
perhaps api.uniswap.org doesnt run it on a lambda?
— Reply to this email directly, view it on GitHub https://github.com/Uniswap/routing-api/issues/49#issuecomment-1172871327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJH23C2CTZC7VFAU3ZGK4FLVSAGR5ANCNFSM5YMJQQLA . You are receiving this because you authored the thread.Message ID: @.***>
btw i am trying to deploy this too. and realised i faced the same issue after using commit 468fbff:
Getting internal_error: {"errorCode":"INTERNAL_ERROR","detail":"Unexpected error","id":"fee8f”}
any idea how do i fix this?
use the previous commit
JinKind Ho @.***>于2022年7月2日 周六下午11:41写道:
btw i am trying to deploy this too. and realised i faced the same issue after using commit 468fbff https://github.com/Uniswap/routing-api/commit/468fbffba36f20ad43249a872751c453e8417834 :
Getting internal_error: {"errorCode":"INTERNAL_ERROR","detail":"Unexpected error","id":"fee8f”}
any idea how do i fix this?
— Reply to this email directly, view it on GitHub https://github.com/Uniswap/routing-api/issues/49#issuecomment-1172917950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJH23CZ2X6O3GFLRBCDQOCLVSBPKPANCNFSM5YMJQQLA . You are receiving this because you authored the thread.Message ID: @.***>
Right my bad forgot to rebuild
@HoJinKind @0xouzm this should be fixed in the latest version. Check the updated README as env vars were renamed
@HoJinKind @0xouzm this should be fixed in the latest version. Check the updated README as env vars were renamed
Thanks
After deployed the stack, I got the url like:
Outputs: RoutingAPIStack.Url = https://xxxxxxx.execute-api.ap-southeast-1.amazonaws.com/prod/
BTW, this is my .env: THROTTLE_PER_FIVE_MINS = '' # Optional WEB_RPC_1 = "https://mainnet.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxx"
Then I send the query : curl --request GET 'https://xxxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/prod/quote?tokenInAddress=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&tokenInChainId=1&tokenOutAddress=0x1f9840a85d5af5bf1d1762f925bdaddc4201f984&tokenOutChainId=1&amount=100&type=exactIn'
Getting internal_error: {"errorCode":"INTERNAL_ERROR","detail":"Unexpected error","id":"fee8f"}
And the id is different each time I try to query the same params.
Is therr any configs I set wrongly? Branch: main commit: 98439fa