Skip to content

INTERNAL_ERROR occurs for LINK→USDC pair when using V4 protocol #1206

@Akira-Taniguchi

Description

@Akira-Taniguchi

Issue Summary

When using Universal Router v2.0 to enable V4 protocol, quote retrieval fails for specific token pairs (LINK→USDC) with an INTERNAL_ERROR.

Steps to Reproduce

curl --request GET 'https://[API_ENDPOINT]/quote?tokenInAddress=0x514910771af9ca656af840dff83e8264ecf986ca&tokenInChainId=1&tokenOutAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&tokenOutChainId=1&amount=1000000000000000000000&type=exactIn&protocols=v3,v4' -H 'x-universal-router-version: 2.0'

Expected Behavior

A successful quote response should be returned.

Actual Behavior

{
  "errorCode": "INTERNAL_ERROR",
  "detail": "Unexpected error",
  "id": "25610"
}

Environment

  • Chain ID: 1 (Ethereum Mainnet)
  • Token In: LINK (0x514910771af9ca656af840dff83e8264ecf986ca)
  • Token Out: USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)
  • Amount: 1000 LINK
  • Universal Router Version: 2.0

Additional Information

  • The same configuration works successfully for LINK→USDT pair (takes ~8 seconds but completes)
  • CloudWatch logs show ChainId_1_V4Quoter_OptimisticCachedRoutestrue_QuoteUnknownReasonRetry metrics
  • Error occurs in v4-quoter.ts during V4 pool quote retrieval
  • Error message: "Failed to get 1 quotes. Reasons: Error"

Suspected Causes

The following V4 pool characteristics may be related:

  1. Insufficient liquidity in LINK→USDC V4 pool
  2. Impact of tick spacing configuration (LINK→USDC: 60)
  3. Timeout during V4 pool on-chain quote retrieval
  4. Gas estimation errors for specific token pairs

Expected Fix

We would like to see automatic fallback to V3 pools when V4 pool quote retrieval fails, improving the overall reliability of the routing API.

Workaround

Currently using the API without the x-universal-router-version: 2.0 header (defaults to v1.2 with V3 only) works reliably for the LINK→USDC pair.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions