Skip to content

[CRITICAL][IDEMPOTENCY] Preserve operation replay protection for the full financial retention window #171

Description

@Obiajulu-gif

Summary

Funding, repayment, and refund receipts use a fixed persistent-entry TTL. After a receipt expires, replaying the original external reference can execute the financial operation again.

Repository evidence

  • contracts/chainmove-pool/src/lib.rs stores DataKey::Reference receipts and extends them only to the shared fixed TTL.
  • Replay detection depends entirely on that receipt being present.

Scope

  • Define a financial replay-retention policy tied to pool/position lifecycle and off-chain archival guarantees.
  • Keep references alive or anchor compact replay markers for the required period.
  • Add an operator-visible path for impending expiry and restoration.

Acceptance criteria

  • A replay remains rejected throughout the documented financial retention window.
  • Retention is bounded and costed, with restoration behavior defined before eviction.
  • Legitimate retries continue returning the original result.

Tests

  • Ledger-advance tests through current TTL boundaries.
  • Archive/restore and late-replay integration tests.

Non-goals

  • General Soroban rent sweeping outside operation receipts.

Activity

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

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions