Skip to content

Add robust error handling to USDC payout flow #3

Description

@AbdulSnk

Overview

The current USDC payout flow on Stellar lacks proper error handling. Any failure during a payout transaction — network issues, insufficient funds, invalid addresses — needs to be caught, logged, and handled gracefully to protect contributors from lost or stuck rewards.

What needs to be done

  • Audit the existing payout logic in the codebase
  • Identify all points where a transaction can fail
  • Implement error handling for the following scenarios:
    • Invalid or inactive Stellar wallet address
    • Insufficient funds in the escrow account
    • Network timeout or Stellar network unavailability
    • Transaction rejected by the Stellar network
  • Log all failed transactions with enough detail to debug and retry
  • Implement a retry mechanism for transient failures (e.g. network timeouts)

Acceptance Criteria

  • All identified failure points have proper error handling
  • Failed transactions are logged with error type, contributor, and amount
  • Retry logic is implemented for transient failures
  • Permanent failures (e.g. invalid address) are flagged without retrying
  • Unit tests cover all error scenarios listed above

Notes

No payout should fail silently. Every error must be logged and surfaced. This is critical since Stellar transactions are irreversible — getting this right protects contributors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions