Skip to content

Add Operator-Controlled Deny/Reject Path for Early Redemption Requests #71

@Jayy4rl

Description

@Jayy4rl

Description

The early redemption flow only has a "process" (approve) path. There is no way for an operator to deny a redemption request. If a request is invalid (e.g., submitted during a blackout period, or by a sanctioned user), the operator's only option is to leave it unprocessed forever — it stays in storage permanently with processed: false, and the user has no clarity on its status.

Requirements

  • Add reject_early_redemption(caller, request_id, reason: String) — operator-only
  • Set req.processed = true (so it can't be processed later) but do NOT burn shares or transfer assets
  • If shares were escrowed (see Issue Add Pagination to Factory Vault Query Functions #26), return them to the user
  • Emit a RedemptionRejected(request_id, user, reason) event
  • Add a status field to RedemptionRequest: Pending | Approved | Rejected instead of the boolean processed

Key Files

  • lib.rs — new reject_early_redemption function
  • types.rs — update RedemptionRequest struct
  • events.rs — new event

Definition of Done

  • Operators can reject requests with a reason
  • Rejected requests cannot be later processed
  • Shares are returned to the user on rejection
  • Event includes the rejection reason
  • Tests cover reject → re-request flow

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions