Skip to content

Add emergency-pause gating to commitment_marketplace settlement entrypoints #491

Description

@1nonlypiece

📌 Description

commitment_core integrates shared_utils::Pausable and EmergencyControl, and
commitment_nft/attestation_engine/allocation_logic expose pause/unpause.
commitment_marketplace, however, has no Pausable integration, so buy_nft,
accept_offer, place_bid, and end_auction cannot be halted during an incident
even though they move user funds.

This issue adds emergency pause gating to the marketplace settlement paths.

🎯 Requirements and Context

  • Integrate shared_utils::Pausable (PAUSED_KEY) and admin-gated pause/unpause.
  • Gate all fund-moving entrypoints (list_nft settlement, buy_nft, accept_offer, place_bid, end_auction) with require_not_paused.
  • Read-only getters must remain callable while paused.
  • No regressions to fee logic or the payment-token allowlist.

🛠️ Suggested Execution

1. Fork the repo and create a branch

git checkout -b security/marketplace-pausable

2. Implement changes

  • Add Pausable wiring and pause/unpause to contracts/commitment_marketplace/src/lib.rs with /// docs.
  • Update docs/EMERGENCY.md equivalent in contracts/EMERGENCY.md and docs/SECURITY_CONSIDERATIONS.md.

3. Test and commit

  • Extend contracts/commitment_marketplace/src/tests.rs.
  • Run: cargo test --target wasm32v1-none --release
  • Edge cases: paused buy rejected, paused bid rejected, getter while paused ok, non-admin pause rejected.

Example commit message

fix: add emergency pause gating to marketplace settlement

✅ Guidelines

  • Minimum 95% test coverage on the gated paths.
  • Document the incident-response procedure.
  • Timeframe: 96 hours.

🏷️ Labels

type-security · area-contracts · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN

💬 Community & Support

  • Join the CommitLabs contributor Discord to coordinate and get unblocked fast: https://discord.gg/WV7tdYkJk
  • Introduce yourself before starting to avoid duplicate work.
  • Maintainers triage actively and review fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GRANTFOX OSSGrantFox open-source campaignMAYBE REWARDEDEligible for GrantFox rewardOFFICIAL CAMPAIGNOfficial GrantFox campaign issuearea-contractsSmart contract (Soroban/Rust) worktype-securitySecurity review / hardening

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions