Skip to content

[HARD][RANDOMNESS] Replace deterministic prize selection with verifiable unbiased draws #30

Description

@Obiajulu-gif

Problem

The drip-pool contract uses deterministic/admin winner selection. Production draws must be unpredictable before close, manipulation-resistant, and independently verifiable.

Scope

  • Define participant, admin, RPC, and provider threats.
  • Choose verifiable randomness or commit-reveal with liveness/bias analysis.
  • Freeze eligibility and weights at an exact ledger boundary.
  • Domain-separate by network, contract, pool, round, and draw.
  • Use unbiased mapping such as rejection sampling.
  • Predefine provider/reveal failure, fallback, cancellation, and refund rules.
  • Emit proof material and provide an independent verifier.
  • Make finalization idempotent.

Acceptance criteria

  • Admins cannot choose or predict winners before commitment.
  • Anyone can reproduce eligibility, randomness, mapping, and result.
  • Weighted selection has no modulo bias.
  • Failures are deterministic and time-bounded.
  • A draw finalizes at most once.

Required tests

Golden vectors, statistical properties, late entries, balance changes, missing reveal/provider outage, concurrent finalize, and cost snapshots.

Non-goals

Document residual trust; do not claim absolute randomness.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions