Skip to content

Dynamic quorum scaling#214

Merged
gabito1451 merged 4 commits intoGalactiGuild:mainfrom
gloskull:dynamic-quorum-scaling
Mar 28, 2026
Merged

Dynamic quorum scaling#214
gabito1451 merged 4 commits intoGalactiGuild:mainfrom
gloskull:dynamic-quorum-scaling

Conversation

@gloskull
Copy link
Copy Markdown
Contributor

Dynamic Quorum Scaling for Milestone Unlocking

Description

Implemented dynamic quorum scaling for milestone approvals based on the fiat value of the milestone. High-value milestones now require more auditor signatures than low-value ones, with a step-function approach.

Changes

  • Implemented dynamic milestone approval quorum in contracts/escrow/src/lib.rs.
  • Added step-function in EscrowContract::calculate_required_signatures using milestone amount:
    • ≤ 1,000: 2 signatures
    • ≤ 10,000: 3 signatures
    • ≤ 100,000: 4 signatures
    • 100,000: 5 signatures

  • Computed effective required_approvals as max(value-based, configured approval_threshold percent).
  • Fallback logic: cap required approvals at total validators count.
  • Existing behavior preserved for current tests; high-value scenarios are stronger.

Fallback Logic

  • If required signatures exceed available validators, requirement lowers to total_validators.
  • Rejection condition uses the same effective quorum in vote logic so milestones can resolve definitively.

Implementation Test

Screenshot from 2026-03-28 04-06-23

Closes #135

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@gloskull Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@gabito1451 gabito1451 merged commit 7623fa0 into GalactiGuild:main Mar 28, 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.

Dynamic Quorum Scaling

2 participants