Problem
The payment proxy smart contracts will process an accidental "double payment" in which the user submits the same transaction twice.
Proposed Solution
Details: Brainstorm in the double payment prevention feature
Considerations
-
How to handle "In-Memory Requests" (Pay-before-persist)?
- Proposed: If paymentReference not in registry, skip nonce check. In other words, "In-memory Requests" don't get double payment prevention.
-
This solution would not prevent "overpayment" where the user submits a correct nonce, but the amount exceeds the expected amount of the request. This is intentional because overpayment prevention is more complicated to implement. It would require storing the expected amount onchain and crosschain messaging to make it available on the payment chain.