Skip to content

Automated Gas Benchmarking & Instruction Optimization #13

@hman38705

Description

@hman38705

Descriptions:

Issue #7:

Developer Goal: Ensure the contract stays within Soroban's strict CPU and memory limits, especially during the iteration over many outcomes or bettors.

Detailed Tasks:

  1. Iteration Audit: Review resolve_market and any potential loop that iterates over a Vec.
  2. Asymptotic Logic: If a market has thousands of winners, switch from "Push" payouts (one transaction) to "Pull" payouts (each user claims their own - see Issue Advanced Payout & Reward Distribution system #1).
  3. Storage Costs: Optimize the Market struct using Option<u32> instead of large default integers where possible to save on ledger footprint costs.

Verification Checklist:

  • Script with soroban contract invoke that measures instructions for a 100-outcome market.
  • git checkout -b features/issue-7-Automated Gas Benchmarking & Instruction Optimization
  • Pr Request create your pr against develop branch

Metadata

Metadata

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