Skip to content

Implement platform-wide circuit breaker for system outages #634

Open
mrmoney10010-design wants to merge 8 commits into
code-flexing:mainfrom
mrmoney10010-design:feature/platform-circuit-breaker
Open

Implement platform-wide circuit breaker for system outages #634
mrmoney10010-design wants to merge 8 commits into
code-flexing:mainfrom
mrmoney10010-design:feature/platform-circuit-breaker

Conversation

@mrmoney10010-design

Copy link
Copy Markdown

Area: backend · Effort: M

What: Add a platform-level circuit breaker that an admin can trigger to halt all deposits and withdrawals across all vaults simultaneously during a critical incident.

Why: When a security incident or smart contract exploit is detected, the operator needs to stop all financial activity instantly across the entire platform, not vault by vault.

closes #579

mrmoney10010-design added 8 commits June 27, 2026 15:44
- Introduce PlatformCircuitBreakerService backed by Redis (AppModule cache) with isActive/activate/deactivate operations
- Add PlatformCircuitBreakerGuard that returns 503 during maintenance
- Protect all deposit/withdrawal endpoints in vaults, farm-vaults, and insurance-fund controllers
- Add admin endpoints POST /admin/platform/circuit-breaker/open and close
- Include audit trail logging through CustomLoggerService with admin identity
- Add comprehensive unit tests and integration tests
…uit-breaker

# Conflicts:
#	harvest-finance/backend/src/database/entities/user.entity.ts
#	harvest-finance/backend/src/vaults/vaults.controller.ts
#	harvest-finance/backend/src/vaults/vaults.integration.spec.ts
#	harvest-finance/backend/src/vaults/vaults.service.spec.ts
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the vic's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 3, 2026

Copy link
Copy Markdown

@mrmoney10010-design 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

@vic-Gray

vic-Gray commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

@mrmoney10010-design fix conflicts pls

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.

#1052 Implement platform-wide circuit breaker for system outages

2 participants