Skip to content

Multi-Asset Support & Decimal Precision Handling #15

@hman38705

Description

@hman38705

Descriptions:

Issue #9:

Developer Goal: Allow markets to be denominated in USDC, XLM, or any external SAC token.

Detailed Logic:

  1. Storage: Update Market to include token_address: Address.
  2. Validation: In place_bet, verify the token_address passed by the user matches the market's configured asset.
  3. Precision Handling: Use i128 for all math. Multiply by $10^{decimals}$ to maintain precision before dividing.

Verification Checklist:

  • Create a market using USDC (6 decimals) and another with XLM (7 decimals).
  • Place bets in both and verify total_staked correctly reflects the raw atomic amounts.
  • Resolve market and verify payouts are correct to the 0.0000001 precision.
  • git checkout -b features/issue-1-advanced-payout-rewards
  • Pr Request create your pr against develop branch

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions