Skip to content

close #213. feat(escrow): add protocol fee with treasury distribution#277

Open
techAlhaji wants to merge 1 commit into
NOVUS-X:mainfrom
techAlhaji:feature/protocol-fee-bps
Open

close #213. feat(escrow): add protocol fee with treasury distribution#277
techAlhaji wants to merge 1 commit into
NOVUS-X:mainfrom
techAlhaji:feature/protocol-fee-bps

Conversation

@techAlhaji
Copy link
Copy Markdown

@techAlhaji techAlhaji commented Apr 26, 2026

Closes #213


This PR introduces a protocol fee mechanism to the escrow contract. A configurable fee (in basis points) is deducted during release() and sent to a treasury address, ensuring sustainable platform revenue.

It adds secure contract initialization, admin-controlled fee and DAO configuration with validation, and updates events for transparency. Comprehensive tests cover fee calculation, edge cases, and access control.

- introduce Admin, DaoAddress, and FeeBps state
- implement init_contract for secure initialization
- deduct protocol fee during release and send to treasury
- add admin functions to update fee and DAO address with validation
- enforce fee cap and safe arithmetic
- update events to include fee amount
- add tests for fee logic, admin controls, and edge cases
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

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

@gabito1451
Copy link
Copy Markdown
Collaborator

PLEASE LOOK IN TO CI @techAlhaji

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.

Contract: Implement Protocol Fees for the Platform

3 participants