Skip to content

fix(squid): cost shows 0% on stable pairs due to USD amount cancellation - #1825

Merged
Flotapponnier merged 1 commit into
devfrom
fix/squid-cost-zero
Aug 11, 2026
Merged

fix(squid): cost shows 0% on stable pairs due to USD amount cancellation#1825
Flotapponnier merged 1 commit into
devfrom
fix/squid-cost-zero

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Squid returns fromAmountUSD and toAmountUSD as spot-price valuations. For USDC→USDT (both ≈$1), inUsd - outUsd ≈ 0 even though fees exist. Fix: when the USD diff is negligible, fall back to explicit feeCosts + gasCosts sum.

@Flotapponnier
Flotapponnier merged commit af260dd into dev Aug 11, 2026
@Flotapponnier
Flotapponnier deleted the fix/squid-cost-zero branch August 11, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant