这是indexloc提供的服务,不要输入任何密码
Skip to content

Bug Report | Uniswap router and clmm swaps fail on Celo #548

@gglucass

Description

@gglucass

Describe the bug

When using the Celo network, when I try to swap a token on Uniswap it fails. Both when using the router option, and when using the clmm option directly. Below I'll dump logs for both.

----- using uniswap/clmm it seems the token approval is not detected correctly, possibly because it resolves the pair use Uniswap's NFT token manager rather than the actual pool -----

2025-11-03 05:41:14 | info | 	Getting available DEX connectors and networks
2025-11-03 05:41:14 | info | 	Available connectors: jupiter, meteora, raydium, uniswap, 0x, pancakeswap, pancakeswap-sol
2025-11-03 05:41:14 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:41:17 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:41:17 | info | 	Finding clmm pool for USDGLO-USDC on celo
2025-11-03 05:41:17 | info | 	Resolved tokens: USDGLO (0x4F604735c1cF31399C6E711D5962b2B3E0225AD3), USDC (0xcebA9300f2b948710d2653dD7B07f33A8B32118C)
2025-11-03 05:41:17 | info | 	Found clmm pool at 0xc1f7313d996b740e8740ef49add3177535431a72
2025-11-03 05:41:17 | info | 	formatSwapQuote: poolAddress=0xc1f7313d996b740e8740ef49add3177535431a72, baseToken=USDGLO, quoteToken=USDC, amount=1, side=SELL, network=celo
2025-11-03 05:41:17 | info | 	Base token: USDGLO, address=0x4F604735c1cF31399C6E711D5962b2B3E0225AD3, decimals=18
2025-11-03 05:41:17 | info | 	Quote token: USDC, address=0xcebA9300f2b948710d2653dD7B07f33A8B32118C, decimals=6
2025-11-03 05:41:18 | info | 	Quote result: estimatedAmountIn=1, estimatedAmountOut=0.999954
2025-11-03 05:41:18 | info | 	Balance changes: baseTokenBalanceChange=-1, quoteTokenBalanceChange=0.999954
2025-11-03 05:41:18 | info | 	Gas price from provider: 25001000000
2025-11-03 05:41:18 | info | 	Gas cost: 0.0050002 ETH
2025-11-03 05:41:18 | info | 	Gas price in Gwei: 25.001
2025-11-03 05:41:18 | info | 	Getting configuration for namespace: uniswap
2025-11-03 05:41:18 | info | 	Using network gas price: 25.0010 GWEI
2025-11-03 05:41:18 | info | 	Estimated: 25.001 GWEI for network celo
2025-11-03 05:41:19 | debug | 	Token balance for USDGLO: 471000000000000000000
2025-11-03 05:41:19 | debug | 	Token balance for USDC: 162000000
2025-11-03 05:41:45 | info | 	Loading tokens for ethereum/celo using TokenService
2025-11-03 05:41:45 | info | 	Loaded 9 tokens for ethereum/celo
2025-11-03 05:41:45 | info | 	Finding clmm pool for USDGLO-USDC on celo
2025-11-03 05:41:45 | info | 	Resolved tokens: USDGLO (0x4F604735c1cF31399C6E711D5962b2B3E0225AD3), USDC (0xcebA9300f2b948710d2653dD7B07f33A8B32118C)
2025-11-03 05:41:45 | info | 	Found clmm pool at 0xc1f7313d996b740e8740ef49add3177535431a72
2025-11-03 05:41:45 | info | 	Base token: USDGLO, address=0x4F604735c1cF31399C6E711D5962b2B3E0225AD3, decimals=18
2025-11-03 05:41:45 | info | 	Quote token: USDC, address=0xcebA9300f2b948710d2653dD7B07f33A8B32118C, decimals=6
2025-11-03 05:41:45 | info | 	Using network gas price: 25.0010 GWEI
2025-11-03 05:41:45 | info | 	Estimated: 25.001 GWEI for network celo
2025-11-03 05:41:45 | info | 	Getting configuration for namespace: ethereum-celo
2025-11-03 05:41:45 | info | 	Getting configuration for namespace: ethereum-celo
2025-11-03 05:41:45 | info | 	Executing swap using SwapRouter02:
2025-11-03 05:41:45 | info | 	Router address: 0x5615CDAb10dc425a742d643d949a7F474C01abc4
2025-11-03 05:41:45 | info | 	Pool address: 0xc1f7313d996b740e8740ef49add3177535431a72
2025-11-03 05:41:45 | info | 	Input token: 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3
2025-11-03 05:41:45 | info | 	Output token: 0xcebA9300f2b948710d2653dD7B07f33A8B32118C
2025-11-03 05:41:45 | info | 	Side: SELL
2025-11-03 05:41:45 | info | 	Fee tier: 100
2025-11-03 05:41:45 | info | 	Current allowance: 0 USDGLO
2025-11-03 05:41:45 | info | 	Amount needed: 1 USDGLO
2025-11-03 05:41:45 | error | 	Insufficient allowance for USDGLO
2025-11-03 05:41:46 | debug | 	Token balance for USDGLO: 471000000000000000000
2025-11-03 05:41:46 | debug | 	Token balance for USDC: 162000000

----- using uniswap/router it seems to want to check the pricing on UniswapV2 as well as UniswapV3, but as there's no UniswapV2 on Celo it fails -----

2025-11-03 05:43:39 | info | 	Getting available DEX connectors and networks
2025-11-03 05:43:39 | info | 	Available connectors: jupiter, meteora, raydium, uniswap, 0x, pancakeswap, pancakeswap-sol
2025-11-03 05:43:39 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:43:39 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:43:39 | info | 	Loading tokens for ethereum/celo using TokenService
2025-11-03 05:43:39 | info | 	Loaded 9 tokens for ethereum/celo
2025-11-03 05:43:39 | info | 	Getting configuration for namespace: ethereum-celo
2025-11-03 05:43:39 | info | 	Getting configuration for namespace: ethereum-celo
2025-11-03 05:43:39 | info | 	Using network gas price: 25.0010 GWEI
2025-11-03 05:43:39 | info | 	Estimated: 25.001 GWEI for network celo
2025-11-03 05:43:41 | info | 	Using Permit2 address for Universal Router V2 allowances
2025-11-03 05:43:41 | info | 	Resolved connector uniswap/router to Permit2 address: 0x000000000022D473030F116dDEE9F6B43aC78BA3
2025-11-03 05:43:41 | info | 	Checking Permit2 allowances for Universal Router (0x643770e279d5d0733f21d6dc03a8efbabf3255b4)
2025-11-03 05:43:41 | debug | 	USDGLO allowances - Token->Permit2: 115792089237316195423570985008687907853269984665640564039457.584007913129639935, Permit2->Router: 1461501637330902918203684832716.283019655932542975, Effective: 1461501637330902918203684832716.283019655932542975
2025-11-03 05:43:42 | debug | 	Using cached gas price for celo: 25.001 GWEI
2025-11-03 05:43:43 | debug | 	Token balance for USDGLO: 471000000000000000000
2025-11-03 05:43:51 | info | 	Getting available DEX connectors and networks
2025-11-03 05:43:51 | info | 	Available connectors: jupiter, meteora, raydium, uniswap, 0x, pancakeswap, pancakeswap-sol
2025-11-03 05:43:51 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:43:55 | info | 	Getting configuration for namespace: ethereum
2025-11-03 05:43:56 | info | 	[quoteSwap] Starting quote generation
2025-11-03 05:43:56 | info | 	[quoteSwap] Network: celo, Wallet: 0xB66930D005e49B2242Ff57Cd174Ab88768d095Cd
2025-11-03 05:43:56 | info | 	[quoteSwap] Base: USDGLO, Quote: USDC
2025-11-03 05:43:56 | info | 	[quoteSwap] Amount: 1, Side: SELL, Slippage: 2%
2025-11-03 05:43:56 | info | 	[quoteSwap] Base token: USDGLO (0x4F604735c1cF31399C6E711D5962b2B3E0225AD3)
2025-11-03 05:43:56 | info | 	[quoteSwap] Quote token: USDC (0xcebA9300f2b948710d2653dD7B07f33A8B32118C)
2025-11-03 05:43:56 | info | 	[quoteSwap] Input token: USDGLO (0x4F604735c1cF31399C6E711D5962b2B3E0225AD3)
2025-11-03 05:43:56 | info | 	[quoteSwap] Output token: USDC (0xcebA9300f2b948710d2653dD7B07f33A8B32118C)
2025-11-03 05:43:56 | info | 	[quoteSwap] Exact in: true
2025-11-03 05:43:56 | info | 	[quoteSwap] Calling getUniversalRouterQuote...
2025-11-03 05:43:56 | error | 	Error getting quote: Cannot read properties of undefined (reading 'getQuote') {} | TypeError: Cannot read properties of undefined (reading 'getQuote')
    at Uniswap.getUniversalRouterQuote (/home/gateway/dist/connectors/uniswap/uniswap.js:145:56)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async quoteSwap (/home/gateway/dist/connectors/uniswap/router-routes/quoteSwap.js:37:25)
    at async Object.<anonymous> (/home/gateway/dist/connectors/uniswap/router-routes/quoteSwap.js:110:20)

Steps to reproduce

  1. Use celo as defaultNetwork
  2. approve USDC and USDGLO on uniswap/clmm and uniswap/router
  3. add 0xc1f7313d996b740e8740ef49add3177535431a72 as uniswap/clmm pool
  4. try to swap 1 USDGLO for USDC

Release version

2.1.0

Type of installation

Docker

Attach required files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions