Skip to content

feat(escrow): implement on-chain payer blacklist with appeal period - #554

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
beulah7717108-eng:feat/payer-blacklist-appeal
Jul 30, 2026
Merged

feat(escrow): implement on-chain payer blacklist with appeal period#554
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
beulah7717108-eng:feat/payer-blacklist-appeal

Conversation

@beulah7717108-eng

Copy link
Copy Markdown

Summary

Implements an admin-managed payer blacklist with a built-in appeal window. Blacklisted payers are blocked from depositing into any invoice.

Changes

  • Add BlacklistEntry type with banned_at, appeal_hash, finalised, upheld, reason_hash fields
  • Add blacklist_payer admin function to block bad actors
  • Add submit_appeal function for blacklisted payers within APPEAL_WINDOW_LEDGERS (360 ledgers)
  • Add finalise_blacklist admin function to uphold or reinstate payers
  • Add pay_invoice function with blacklist enforcement
  • Update deposit to check for finalised-blacklisted payers
  • Add get_blacklist_entry and is_payer_blacklisted query functions
  • Add 5 new error variants: PayerBlacklisted, AppealWindowExpired, NotBlacklisted, AlreadyFinalised, NotBlacklistedPayer
  • Add 11 comprehensive unit tests
  • Emit events for blacklist add, appeal, and finalise

Acceptance

  • blacklist_payer records entry with finalised: false; only admin can call
  • pay_invoice / deposit blocks finalised-blacklisted payers with PayerBlacklisted
  • Payer can submit one appeal during the APPEAL_WINDOW_LEDGERS window
  • Admin finalises with uphold: true (ban stands) or false (payer reinstated)
  • Events emitted from event helpers
  • Tests: blacklist blocks, appeal window, appeal accepted reinstates, appeal rejected keeps ban, non-admin blacklist fails

Closes

Closes #421

- Add BlacklistEntry type with banned_at, appeal_hash, finalised, upheld fields
- Add blacklist storage keys and APPEAL_WINDOW_LEDGERS constant (360 ledgers)
- Add blacklist_payer admin function to block bad actors
- Add submit_appeal function for blacklisted payers to appeal within window
- Add finalise_blacklist admin function to uphold or reinstate payers
- Add pay_invoice function with blacklist enforcement
- Update deposit to check for finalised-blacklisted payers
- Add get_blacklist_entry and is_payer_blacklisted query functions
- Add PayerBlacklisted, AppealWindowExpired, NotBlacklisted, AlreadyFinalised errors
- Add 11 comprehensive unit tests covering all scenarios
- Emit events for blacklist_add, appeal, and blacklist_finalise

Closes Stellar-split#421
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@beulah7717108-eng 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

@Kingsman-99
Kingsman-99 merged commit a680e68 into Stellar-split:main Jul 30, 2026
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 on-chain payer blacklist with appeal period

3 participants