Skip to content

Investigate Cetus swaps missing execution price #11486

@gomesalexandre

Description

@gomesalexandre

Overview

See release gist

Cetus swaps on SUI are intermittently missing execution price data in transaction history. The issue appears to be related to node issues during the dry-run phase, where we attempt to fetch the execution price by simulating the transaction.

This results in transactions displaying in history without the actual execution price/buy amount, making it difficult for users to verify the swap outcome and reducing transparency around swap performance.

References and additional details

Code locations:

  • Execution price fetching occurs during SUI transaction completion detection
  • Related to dry-run calls in SuiChainAdapter.ts
  • Transaction history display logic would be in transaction history components

Testing observations:

  • Issue observed during Cetus swap testing in release 1.987.0
  • Not all Cetus swaps are affected - appears intermittent
  • Correlation with node issues suggests RPC/network-related root cause
  • Other swap providers on SUI may also be affected

Hypothesis:
When we perform dry-run simulations to calculate execution price, intermittent node issues (timeouts, rate limiting, or node errors) may cause the dry-run to fail. We likely don't have proper fallback or retry logic for this non-critical operation, resulting in missing execution price data.

Potential solutions to investigate:

  1. Implement retry logic with exponential backoff specifically for execution price dry-runs
  2. Add better error handling and logging to understand node failure patterns
  3. Consider throttling/rate-limiting dry-run calls if we're hitting node limits
  4. Investigate alternative methods for calculating execution price (e.g., from transaction events/logs after execution)
  5. Add fallback to display "Execution price unavailable" with explanation rather than empty field

Acceptance Criteria

  • Execution price is consistently here

Need By Date

Not specified - UX improvement

Estimated effort

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions