Skip to content

Implement Escrow Multi-Token Support with Conversion Rates #948

Description

@famvilianity-eng

Implement Escrow Multi-Token Support with Conversion Rates

Priority: High
Estimated Time: 3 hours

Description

Currently, escrow only holds one token per match. For platforms supporting multiple tokens, matches should allow stakes in different tokens (e.g., USDC and native XLM) with automatic price conversion.

Tasks

  • Add conversion_rate: i128 field to allow token pair pricing
  • Implement create_match_with_conversion(env, player1, player2, stake_amount, token_a, token_b, rate)
  • Add Oracle call to verify conversion rate within ±5%
  • Update payout logic to convert winner amount back to player's preferred token
  • Add tests for multi-token matches and conversion verification

Auto-created from UNSOLVED_ISSUES_40.md

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions