Skip to main content
The payment_lock_engine supports short-duration payment protection. The sender pays the recipient immediately and pays a premium. If the protected asset loses value by expiry, the recipient can receive a reserve-backed payout according to contract rules.

Responsibilities

  • Quote payment lock cost from a fresh oracle price.
  • Execute the payment transfer from sender to recipient during lock creation.
  • Collect premium and automation fee through the reserve vault.
  • Lock maximum payout capacity for the recipient.
  • Settle after expiry using an oracle observation at or before expiry.
  • Pay the recipient automatically through the reserve vault when payout is due.
  • Prevent duplicate reference hashes.

Main methods

Flow

Boundary

Payment lock is separate from username payments. Username payments are plain wallet-signed Stellar payments with optional receipt anchoring. Payment lock adds a contract-defined value-protection path around a payment.