Skip to content

settlement: per-developer daily withdraw cap#468

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
nice-bills:feat/settlement-developer-withdraw-rate-limit
Jun 25, 2026
Merged

settlement: per-developer daily withdraw cap#468
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
nice-bills:feat/settlement-developer-withdraw-rate-limit

Conversation

@nice-bills

Copy link
Copy Markdown
Contributor

Closes #422
Adds an optional per-developer daily withdrawal cap to withdraw_developer_balance. Admin sets caps via set_daily_withdraw_cap, emits daily_withdraw_cap_changed event. Accumulator resets on timestamp / 86400. Defaults to no limit when unset (cap=0).
Changes
lib.rs — DailyWithdrawCap/WithdrawalToday storage, DailyWithdrawState { day, amount }, DailyWithdrawCapExceeded error, cap enforcement + admin setter + view fns
test.rs — 7 new tests (cap exceeded, day reset, cumulative tracking, per-developer isolation, defaults)
INVARIANTS.md — added rate-limit invariant section

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@nice-bills 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 5c4f9ff into CalloraOrg:main Jun 25, 2026
0 of 3 checks passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

a per-developer daily withdraw cap is a clean rate-limit on the settlement side, and sensible defaults too. merged.

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.

Developer withdraw rate limiting — per-developer daily cap in settlement withdraw_developer_balance

2 participants