Skip to content

fix: harden vault circuit breaker#284

Open
Mosas2000 wants to merge 1 commit intoSuncrest-Labs:mainfrom
Mosas2000:fix/vault-circuit-breaker-window
Open

fix: harden vault circuit breaker#284
Mosas2000 wants to merge 1 commit intoSuncrest-Labs:mainfrom
Mosas2000:fix/vault-circuit-breaker-window

Conversation

@Mosas2000
Copy link
Copy Markdown

Summary

Hardens the vault circuit breaker by switching withdrawal tracking to a rolling window so boundary-timed withdrawals cannot bypass the configured threshold.

Changes

  • Replace the tumbling-window withdrawal accounting with rolling history tracking.
  • Preserve the vault pause/reject behavior when the limit is exceeded.
  • Update contract tests to validate the new windowing behavior.

Notes

  • This branch is isolated to the vault circuit-breaker fix only.

Closes #249

@Mosas2000 Mosas2000 requested a review from 0xDeon as a code owner April 24, 2026 13:04
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 24, 2026

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

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.

[Vault] Circuit breaker uses a tumbling window — attacker can drain 2x threshold at window boundary

1 participant