-
Notifications
You must be signed in to change notification settings - Fork 112
Description
I’m encountering a FetcherError while executing a transaction through the Paraswap SDK in a stablecoin arbitrage bot. The error message indicates that the transaction has some issues and may fail, but does not provide detailed information on the root cause.
Error Message and Stack Trace:
FetcherError: This transaction has some errors and may fail. Please contact support for more details
at _callee$ (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:2835:19)
at tryCatch (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:127:16)
at Generator. (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:215:17)
at Generator.throw (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:156:21)
at asyncGeneratorStep (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:14:17)
at _throw (/Users/dev/Projects/codes/arbitrage_treade/node_modules/@paraswap/sdk/dist/sdk.cjs.development.js:31:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Additional Log Output:
[2025-05-21 15:41:29.547] error: [ArbitrageBot] fail [USDC/USDT] | {
"context": "TRADE_FAIL",
"reason": "This transaction has some errors and may fail. Please contact support for more details",
"srcToken": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
"destToken": "0x55d398326f99059ff775485246999027b3197955",
"srcAmount": "850940711933964517301",
"destAmount": "855657743599363587850",
"slippage": 0.0030000000000000027,
"result": {
"success": false,
"error": "This transaction has some errors and may fail. Please contact support for more details"
}
}
Code Context:
The error occurs at this line in my bot logic:
await this.buyCoin(...); // inside tradeExample_v2.js:658
Steps to Reproduce:
1. Initiate a trade using the Paraswap SDK with USDC → USDT.
2. Set slippage to ~0.3%.
3. Run the bot — see transaction failure.
Expected Behavior:
The trade should succeed or provide a clear reason for failure (e.g., slippage too low, gas estimation failure, route unavailable, etc.)
Environment:
• SDK Version: @paraswap/sdk@
• Node.js: v18.x
• OS: macOS
Request:
Could you please clarify:
• What might be triggering this generic error?
• How can we get more diagnostic details to understand why the transaction fails?
• Are there any recent changes in the SDK or API that may affect token routes or slippage calculations?
Thanks in advance for your support!