Skip to content

fix(protocol_fee): add access control to set_fee_bps / set_fee_recipient - #227

Merged
N-i-xx merged 1 commit into
Vero-protocol:mainfrom
samkay-ops:fix/protocol-fee-access-control
Aug 24, 2026
Merged

fix(protocol_fee): add access control to set_fee_bps / set_fee_recipient#227
N-i-xx merged 1 commit into
Vero-protocol:mainfrom
samkay-ops:fix/protocol-fee-access-control

Conversation

@samkay-ops

Copy link
Copy Markdown
Contributor

Summary

Fixes #203protocol_fee::set_fee_bps and set_fee_recipient performed no access-control check of their own.

Changes

  • Add caller: &Address to both setters
  • require_auth() + stored ADMIN role check inside the module (same pattern as control_plane::require_admin)
  • New FeeError::Unauthorized / NotInitialized
  • Tests: admin can update; non-admin panics

Security

Mutations are safe to wire into a #[contractimpl] entrypoint without relying on the caller to remember an external admin gate.

Closes #203

…pient

Added admin authorization for setting fee parameters.
@N-i-xx
N-i-xx merged commit 72f074a into Vero-protocol:main Aug 24, 2026
4 checks 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.

[BUG] protocol_fee::set_fee_bps / set_fee_recipient perform no access-control check of their own

2 participants