Skip to content

Multi-admin quorum execution for treasury and registry actions - #1097

Open
ugoocreates-pixel wants to merge 17 commits into
Pulsefy:mainfrom
ugoocreates-pixel:multi-admin-quorum
Open

Multi-admin quorum execution for treasury and registry actions#1097
ugoocreates-pixel wants to merge 17 commits into
Pulsefy:mainfrom
ugoocreates-pixel:multi-admin-quorum

Conversation

@ugoocreates-pixel

Copy link
Copy Markdown

Closes #1041

This PR extracts the hardcoded multisig logic from the treasury contract into a reusable shared workspace crate (multisig-guard) and integrates it across all sensitive registry and treasury operations to require multi-admin approval on testnet.

Changes Made

  • Created multisig-guard crate: Extracted multisig logic, state management, errors, and events into a generic library that validates approvals based on soroban_sdk::Vec<Val> payloads to prevent "blank check" vulnerabilities.
  • Refactored treasury contract:
    • Replaced local multisig implementation with multisig-guard.
    • Updated storage::ProposalAction enum to carry fully strongly-typed arguments (e.g. SetAdmin(Address)).
    • Updated sensitive admin functions (set_admin_via_multisig, rotate_beneficiary_via_multisig, set_multisig_config_via_multisig) to consume payload-specific approvals.
  • Refactored protocol_registry contract:
    • Integrated multisig-guard.
    • Added strongly-typed ProposalAction variants for module registration, updates, deactivation, activation, pausing, unpausing, setting admin, and upgrading.
    • Replaced direct admin-auth checks with quorum verification for all sensitive operations (e.g. register_module_via_multisig, update_module_via_multisig).
  • Refactored project_registry contract:
    • Integrated multisig-guard.
    • Upgraded the API to enforce quorum execution on operations like update_config, pause, unpause, set_admin, and upgrade.
  • Refactored contributor_registry contract:
    • Replaced the local multisig.rs module with the shared multisig-guard crate.
    • Adapted update_reputation, grant_badge, revoke_badge, apply_reputation_penalty, and set_admin functions to use the new generic multi-admin quorum module.

Acceptance Criteria Met

  • Supports proposal plus approval lifecycle for selected actions.
  • Execution requires a configurable approval threshold.
  • Duplicate approvals or unauthorized execution fail safely.
  • Tests cover happy path and insufficient quorum scenarios.

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@ugoocreates-pixel 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

@Cedarich Cedarich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ugoocreates-pixel Kindly fix failing workflow

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel Kindly fix failing workflow

please check

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel

will fix it now boss

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel

Boss please check

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel

Please check. Also please review my application for issue number 865

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel

check please

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@Cedarich Cedarich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the changes made to onchain.yml

@ugoocreates-pixel

Copy link
Copy Markdown
Author

@ugoocreates-pixel

check please

@Cedarich

Copy link
Copy Markdown
Contributor

@ugoocreates-pixel

@d3v-active

Copy link
Copy Markdown

@ugoocreates-pixel

review

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.

Contracts: Multi-admin quorum execution for treasury and registry actions

3 participants