Skip to content

Add a circuit-breaker guard to the escrow contract's release paths #6

Description

@Meshmulla

Summary

The escrow contract (soroban/src/escrow_contract.rs) handles asset locking and release — the highest-value flow in the system. We already have a circuit_breaker module; integrating it into escrow would let us halt withdrawals instantly if an anomaly or exploit is detected, limiting blast radius.

What we'd like

  • Add a circuit-breaker / pause check to the sensitive escrow entry points (release/withdraw)
  • When tripped, those paths should cleanly revert with a clear error while safe read paths keep working
  • An authorized role can trip and reset the breaker

Where to look

  • soroban/src/escrow_contract.rs — the flows to guard
  • soroban/src/circuit_breaker.rs and submission_pause.rs — existing pause/breaker primitives to reuse
  • soroban/src/acl.rs — access control for who may trip/reset

Acceptance criteria

  • Release/withdraw paths honor the circuit breaker and revert with a descriptive error when tripped
  • Only an authorized role can trip or reset the breaker
  • Read-only queries remain available while paused
  • Tests cover the tripped and reset states

Notes

Reuse the existing breaker module rather than adding a parallel mechanism — consistency matters for auditing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions