Skip to content

fix(credence_bond): enforce fee bounds and emit old/new values (v2) - #1258

Open
sudo-robi wants to merge 2 commits into
CredenceOrg:mainfrom
sudo-robi:fix/bond-fee-bounds-v2
Open

fix(credence_bond): enforce fee bounds and emit old/new values (v2)#1258
sudo-robi wants to merge 2 commits into
CredenceOrg:mainfrom
sudo-robi:fix/bond-fee-bounds-v2

Conversation

@sudo-robi

Copy link
Copy Markdown

Closes #279

…nceOrg#1027)

- fees: gate [MIN/MAX]_FEE_BPS=[0,1000] (10%); panic with "fee_bps out of bounds".
- fees/events: emit fee_config_updated(admin, old_treasury, new_treasury, old_fee_bps, new_fee_bps).
- lib: add set_fee_config/get_fee_config entrypoints + DataKey::{FeeTreasury, FeeBps}.
- test: bounds at MIN/MAX boundaries, MAX+1 rejected, event payload assertions, re-emit on no-op.
- errors: pre-req ContractError::RoleRequired = 128 variant + category/is_recoverable arms (lands CredenceOrg#1235 dependency).
- docs: fees.md + EVENTS.md mirror the new bounds and event shape.
- baseline: panic_baseline.txt picks up fees.rs::panic!("fee_bps out of bounds").

Closes CredenceOrg#1027
@sudo-robi
sudo-robi force-pushed the fix/bond-fee-bounds-v2 branch from adf1d45 to 65f369d Compare July 31, 2026 15:41
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.

[Fresh 2026-04][Contracts] Bond: fee config safety rails (bounds + events include old/new)

2 participants