Skip to content

feat: implement custom Stellar token/asset support for bets and payouts #265

@greatest0fallt1me

Description

@greatest0fallt1me

Description:

Allow markets to accept and pay out in a configurable Stellar asset (e.g., USDC, custom token) in addition to or instead of native XLM, using Soroban token interface.

Requirements and Context:

  • Must be secure, tested, and documented
  • Should allow admin to set allowed token(s) per event or globally
  • Should use token transfer and balance for locking and payouts
  • Should validate token contract and decimals
  • Should emit events with asset info
  • Must handle approval/allowance if required by token
  • Must not break XLM-native flow if still supported

Suggested Execution:

  1. Fork the repo and create a branch

    git checkout -b feature/custom-token-support
  2. Implement changes

    • Write contract: src/lib.rs (token parameter in place_bet, payouts)
    • Update tokens module: src/tokens.rs (multi-asset)
    • Update types and storage; add documentation and NatSpec-style comments
  3. Test and commit

    • Run tests; cover XLM and custom token; insufficient balance
    • Include test output and security notes

Example Commit Message:

feat: implement custom Stellar token/asset support for bets and payouts

Guidelines:

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions