Skip to content

feat: add protocol fee configuration#87

Open
Scottcjn wants to merge 1 commit intosorosave-protocol:mainfrom
Scottcjn:protocol-fee-mechanism
Open

feat: add protocol fee configuration#87
Scottcjn wants to merge 1 commit intosorosave-protocol:mainfrom
Scottcjn:protocol-fee-mechanism

Conversation

@Scottcjn
Copy link

Summary

  • add protocol fee configuration with a basis-point fee rate and treasury address
  • initialize fee config in the constructor with 0 bps and the admin as default treasury
  • add admin-only setters for protocol fee rate and treasury
  • deduct the configured fee during payout distribution and send it to the treasury
  • add tests for default config, admin-only updates, invalid fee rejection, and payout fee splitting

Notes

  • Treasury is configurable so the fee destination can be tested and changed without coupling it to the protocol admin address

Testing

  • cargo test

Closes #18

@a638011
Copy link

a638011 commented Mar 11, 2026

Closing: This bounty has no specified dollar amount and does not meet my criteria (USD > $1). Apologies for the noise.

@a638011
Copy link

a638011 commented Mar 11, 2026

Withdrawing this PR. This bounty has no specified dollar amount and does not meet my criteria (USD > $1). Apologies for the noise.

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.

Implement fee mechanism for protocol sustainability

2 participants