Skip to content

update#473

Merged
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
blockchainrafik:feat/revenue-pool-drain-protection
Jun 26, 2026
Merged

update#473
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
blockchainrafik:feat/revenue-pool-drain-protection

Conversation

@blockchainrafik

@blockchainrafik blockchainrafik commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Closes #416


feat(revenue-pool): Add admin-configurable minimum pool balance

This update introduces an admin-configurable minimum balance ("floor") for the revenue pool to prevent distributions from reducing the pool below a defined threshold.

What's included

  • Added MIN_POOL_BALANCE_KEY storage key.
  • Added ERR_MIN_POOL_BALANCE_BREACHED error.
  • Implemented:
    • get_min_pool_balance
    • set_min_pool_balance
  • Enforced the minimum pool balance in:
    • distribute
    • batch_distribute
  • Added comprehensive tests covering:
    • Authorization
    • Input validation
    • Event emission
    • Minimum balance breaches
    • Exact floor boundary behavior
    • Default zero-value behavior
  • Updated EVENT_SCHEMA.md.

Closes: #416

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

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

@greatest0fallt1me greatest0fallt1me merged commit 8ce0b7d into CalloraOrg:main Jun 26, 2026
1 of 3 checks passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

solid — “update”. merged 🙏 reconciled onto the current main (this area had shifted under other merged PRs, so kept main where they overlapped to keep the build green).

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.

Revenue pool drainage protection — min_pool_balance floor enforced on distribute and batch_distribute

3 participants