Skip to content

Circuit-breaker configuration & observability endpoints #224

Description

@DevMuhdishaq

Description
A volume-threshold circuit breaker is referenced but its thresholds and current state should be admin-configurable and externally observable for the emergency-recovery workflow.

Direction

  • In risk_management/alerts, expose set_circuit_breaker_threshold(window_secs, max_volume) (admin) and get_circuit_breaker_status() -> {tripped, current_volume, threshold, window}.
  • Auto-trip pauses trading and emits a CircuitBreakerTripped alert; add admin reset_circuit_breaker.
  • Reuse the pause mechanism from Issue ## Issue 1 — Initialize Soroban Rust Project #1.

Acceptance criteria

  • Crossing the configured volume threshold within the window trips the breaker and pauses swaps.
  • get_circuit_breaker_status reports accurate live values.
  • reset_circuit_breaker (admin only) restores trading.
  • A CircuitBreakerTripped event/alert is emitted on trip.
  • Tests simulate volume accumulation across ledgers to trip and reset.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions