Skip to content

Pause interaction with withdrawals #470

@greatest0fallt1me

Description

@greatest0fallt1me

Description

  • Document whether users can exit funds while mutating paths are paused.

Requirements and context

  • Must be secure, tested, and documented.
  • Should be efficient and easy to review for auditors and integrators.
  • Scope is Predictify Hybrid Soroban smart contracts in predictify-contracts only (no frontend or backend services).

Suggested execution

  • Fork the repository and create a branch:
    • git checkout -b feature/pause-withdraw
  • Implement changes:
    1. Contract / module: update logic in contracts/predictify-hybrid/src/circuit_breaker.rs and related modules as required.
    2. Tests: extend or add circuit_breaker_tests.rs`, `balance_tests.rs (and supporting test utilities under contracts/predictify-hybrid/src/tests/ when applicable).
    3. Documentation: update or add docs/operations/INCIDENT_RESPONSE.md; add a link from docs/README.md when adding new top-level docs.
    4. Comments: use Rust doc comments (///, //!) on all new or changed public contract API — equivalent discipline to NatSpec for Solidity.

Primary touchpoints: contracts/predictify-hybrid/src/circuit_breaker.rs, contracts/predictify-hybrid/src/balances.rs

Test and commit

  • Run cargo test -p predictify-hybrid and narrow with filters while iterating.
  • Add regression tests for every bug or ambiguity found during review.
  • In the PR, include summarized test output and short security notes (threat model, invariants proven, explicit non-goals).

Example commit message

feat(contract): pause vs withdraw policy

Guidelines

  • Target ≥ 95% line coverage on modules touched (e.g. cargo llvm-cov / cargo tarpaulin per repo conventions).
  • Documentation must be sufficient for an external integrator without reading all Rust internals.
  • Timeframe: 96 hours from assignment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions