Skip to content

Feature/governance fixes - #555

Merged
OxDev-max merged 5 commits into
OpenLedger-Foundation:mainfrom
aji70:feature/governance-fixes
Jul 28, 2026
Merged

Feature/governance fixes#555
OxDev-max merged 5 commits into
OpenLedger-Foundation:mainfrom
aji70:feature/governance-fixes

Conversation

@aji70

@aji70 aji70 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four critical governance security and consistency gaps across the multisig, parameter governance, and role management systems. Together they close major loops between
governance infrastructure and actual protocol behavior.

Changes

#487 — Enforce multisig exclusivity

  • Added `DirectCallProhibited` error variant
  • Block direct calls to pause, unpause, grant_role, revoke_role, transfer_admin once multisig is configured
  • Ensures multisig provides real security guarantee (not advisory)
  • Route through propose/approve/execute flow once active

#490 — Add ParameterProposal TTL (expiration)

  • Added `expires_at: u64` field to ParameterProposal struct
  • Populate at proposal time using PROPOSAL_TTL_LEDGERS (~7 days)
  • Add expiry checks to vote_parameter_change and execute_parameter_change
  • Prevents indefinite accumulation of stale proposals
  • Added ParameterProposalExpired error variant
  • Documented schema migration implications

#488 — Wire parameter-governance to real consumers

  • Added require_valid_risk_score_with_max() for parameterized risk ceiling validation
  • Added get_late_penalty_bps / set_late_penalty_bps to financing_pool
  • Added governance note to treasury.get_fee_bps documenting precedence of governed values
  • Added TODO integration points showing where cross-contract calls belong
  • Infrastructure now in place for treasury, financing_pool, and risk_registry to consume governed parameters

#489 — Unify role systems (integration points)

  • Added TODO sync points in risk_registry.add_verifier / remove_verifier
  • Ready for access_control.grant_role / revoke_role to be called alongside verifier add/remove
  • Aligns verifier lifecycle with governance role system
  • Foundation for unified role management

Notes

  • Code-only delivery: no install/build/test/scripts run during implementation
  • Committer: aji70
  • All four issues fixed in single branch with one commit per issue
  • Migration considerations documented in docs/MIGRATIONS.md
  • Integration points marked with TODO comments for future cross-contract call implementation

Closes #487, Closes #490, Closes #488, Closes #489

aji70 added 4 commits July 27, 2026 16:24
…nLedger-Foundation#487, OpenLedger-Foundation#490)

- Add DirectCallProhibited and ParameterProposalExpired error variants
- Block direct calls to pause, unpause, grant_role, revoke_role, transfer_admin once multisig is configured
- Add expires_at field to ParameterProposal struct with PROPOSAL_TTL_LEDGERS expiry
- Add expiry checks to vote_parameter_change and execute_parameter_change
- Ensure multisig governance provides actual security guarantee (exclusivity)
- Ensure parameter proposals cannot accumulate indefinitely
…ion#488)

- Add require_valid_risk_score_with_max to shared validation for parameterized risk ceiling
- Add governance note to treasury.get_fee_bps indicating governed value takes precedence
- Add set_late_penalty_bps and get_late_penalty_bps to financing_pool for governance integration
- Add TODO comments showing integration points for access_control cross-contract calls
- Infrastructure now in place for parameter governance to affect actual protocol behavior
- Contracts can read governed values via access_control when integrated
- Add TODO sync points in risk_registry.add_verifier/remove_verifier for access_control coordination
- Document where access_control.grant_role/revoke_role should be called
- Align verifier lifecycle with governance role system
- Infrastructure ready for unified role management once access_control calls are implemented
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@aji70 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

@OxDev-max
OxDev-max merged commit e997d92 into OpenLedger-Foundation:main Jul 28, 2026
1 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment