Skip to content

Fix raffle expiry, draw bounties and staking stream timing - #1

Merged
qhooks merged 2 commits into
mainfrom
review/raffle-staking-contract-fixes-20261116
Nov 17, 2026
Merged

qhooks merged 2 commits into
mainfrom
review/raffle-staking-contract-fixes-20261116

Conversation

@qhooks

@qhooks qhooks commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Expired raffle draws could be re-armed after a losing hash expired. This closes the round without a winner, carries the pot forward and pays a 1% bounty for a timely completed draw. Staking rewards now use fixed-end tranches so later syncs or dust cannot delay income already streaming.

Keeps the reviewed builder-kit-fix.patch production contracts and SHA256SUMS exact. Its nine regression tests are included, with the JIT fixture corrected to select the actual next epoch boundary and assert the intended 24-hour-plus-one-minute stream window. The README explains blockhash randomness, small-pot limits and the future VRF upgrade. A pinned forge-std v1.9.7 submodule makes the new tests reproducible from a fresh clone. QModuleBase, SDK and CI workflow remain unchanged.

Validation:

  • cd contracts && forge test --offline --threads 2 -vv: 9/9 pass, including 256 conservation fuzz runs (Solc 0.8.26).
  • Existing public checks pass: 9 Node tests, 2 scanner tests, canonical-chain check, all three contract SHA-256 checks, secret scan and diff whitespace check.

No deployment, RPC/fork, key, wallet or funds action. The separately patched QStakeVault is handed to the next launch-factory generation backlog; it is not bundled into this public-module change.

qhooks and others added 2 commits November 16, 2026 18:55
Apply the reviewed contract patch with regression tests and updated SHA256SUMS.
Expired raffle rounds close without a reroll; timely draws earn a 1% bounty.
Stake rewards use fixed-end tranches so syncs and dust cannot delay prior income.

Document blockhash randomness, small-pot guidance and a future VRF upgrade.
Pin forge-std v1.9.7 for reproducible local tests. No deployments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qhooks
qhooks merged commit fabf0d7 into main Nov 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant