Skip to content

Add platform pause state indexing and propagation to all trade validation #988

Description

@Chucks1093

Summary

Index PlatformPaused and PlatformResumed events and propagate the platform pause state to all trade validation middleware so buy, sell, stake, and swap endpoints reject requests during a pause.

Scope

  • Platform pause state cached in Redis on PlatformPaused event
  • Cache cleared on PlatformResumed event
  • Trade validation middleware checks pause state before processing any trade
  • GET /platform/status — returns pause state, timestamp, and actor
  • Per-key pause state checked independently in same middleware

Acceptance Criteria

  • All trade endpoints return 503 with pause message during platform pause
  • Pause state cached within 5 seconds of PlatformPaused event
  • Cache cleared correctly on PlatformResumed event
  • Platform status endpoint returns correct state and metadata
  • Per-key pause correctly blocks trades for paused keys only

ETA

12 hours

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions