Skip to content

Implement Deterministic Pseudo-Randomness Abstraction #558

@Jagadeeshftw

Description

@Jagadeeshftw

Description:

Create a deterministic pseudo-randomness abstraction for use in contracts that require contest winner selection or randomized assignment, ensuring results are verifiable and not manipulable by a single party.

Requirements and context:

  • Bounty or contest flows may need random selection
  • Full randomness is hard on-chain; need deterministic, seed-based approach
  • Design must be verifiable and avoid miner/submitter bias as much as possible
  • Component locations:
    • Bounty/program escrow modules that select winners
    • Shared randomness helper

Suggested execution:

  1. Fork the repo and create a branch

    git checkout -b feat/deterministic-pseudorandomness-abstraction
  2. Implement changes

    • Design randomness source (e.g. hash of known values: block id, escrow id, commit hashes)
    • Provide helper function to derive pseudo-random indices
    • Integrate into at least one contract flow that needs selection
    • Document security trade-offs
  3. Test and commit

    • Add tests verifying deterministic outputs for given seeds
    • Include adversarial examples in documentation

Example commit message:

feat: add deterministic pseudo-randomness abstraction for selection flows

Guidelines:

  • Assignment required before starting
  • PR description must include: Closes #[issue_id]

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions