Skip to content

Core: Implement Payment Request Expiration with Smart Contract Enforcement #460

Description

@Smartdevs17

Context

Payment requests can remain open indefinitely, leading to stale data, accounting confusion, and potential price exposure in volatile markets.

Current Limitation/Problem

Payment requests have no expiration mechanism. A request created at a specific exchange rate may be fulfilled days later at a very different rate, causing disputes.

Expected Outcome

Time-bound payment requests enforced both at the smart contract level (for on-chain payments) and backend level (for off-chain). Expired requests are automatically voided with proper event emissions.

Acceptance Criteria

  • Configurable expiration per request (minutes, hours, days)
  • Soroban contract enforces expiration during payment execution
  • EVM contract enforces expiration for on-chain payments
  • Backend rejects expired requests before relaying to chain
  • Automatic status transition: pending -> expired
  • Notification to requester and payer on expiration
  • Expired request renewal with new rate calculation
  • Dashboard filtering for expired requests

Technical Scope

  • contracts/soroban/payment-request/src/ - expiration logic in Soroban
  • contracts/evm/payment-request/src/ - expiration logic in EVM
  • backend/src/services/payments/expiration.ts - backend enforcement
  • Prisma: PaymentRequest add expiresAt, expiredAt fields
  • BullMQ cron for expiration checking
  • Frontend: expiration display and renewal UI
  • Edge cases: block timestamp manipulation, timezone handling, grace periods

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions