Amendment XLS: Post-Dated Checks #596
bigcjat
started this conversation in
XLS Proposals
Replies: 2 comments 1 reply
|
@bigcjat I fixed your preamble to match the expected format. |
0 replies
|
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
XLS-XXd: Post-Dated Checks (
DeliverAfterExecution Window for XRPL Checks)Abstract
This proposal introduces an optional
DeliverAftertimestamp field to the existingCheckCreatetransaction on the XRP Ledger. By enforcing an on-chain start time before which a check cannot be cashed, this amendment enables Post-Dated Checks.This provides a lightweight, user-sovereign alternative to heavy recurring subscription proposals (such as XLS-78) by reusing the battle-tested XRPL
Checkledger engine (ltCHECK). Users can issue a series of post-dated checks in a single atomic batch transaction (up to the current XLS-56d protocol limit of 8 checks per batch, or 12 if the batch limit is expanded by a future amendment) while retaining full unilateral cancellation rights viaCheckCancel.Motivation
The Problem with Complex Subscription Amendments
Proposals like XLS-78 attempt to solve recurring payments by introducing an entire new subscription ledger engine (
ltSUBSCRIPTION), along with custom claim loops, specialized period counters, and new transaction types (SubscriptionCreate,SubscriptionClaim,SubscriptionCancel).This approach adds significant protocol complexity, increases ledger state bloat, and forces validators to maintain complex state machines for a feature that can be achieved with existing primitives.
The Post-Dated Check Solution
The XRP Ledger already possesses a robust, secure
Checkprimitive (ltCHECK). However,CheckCreatecurrently only supports anExpirationtimestamp (the cutoff after which a check can no longer be cashed). It lacks aDeliverAftertimestamp (the start time before which a check cannot be cashed).By adding
DeliverAftertoCheckCreate:ltCHECKobjects.CheckCanceltransaction for remaining un-cashed checks.Specification
1. Transaction Field Modification:
CheckCreateAdd an optional
DeliverAfterfield to theCheckCreatetransaction format.DeliverAfterSTUInt32Field Constraints:
DeliverAfterandExpirationare specified, validation MUST enforceDeliverAfter < Expiration. Otherwise, the transaction fails withtemBAD_EXPIRATION.2. Ledger Object Modification:
Check(ltCHECK)Update the
Checkledger entry structure to store the optionalDeliverAfterfield.DeliverAfterSTUInt323. Execution & Validation Rules
CheckCashValidation LogicWhen a payee submits a
CheckCashtransaction referencing aCheckobject:Checkcontains aDeliverAfterfield:parent_close_time).parent_close_time < Check.DeliverAfter, the transaction MUST fail with error codetecTOO_EARLY(ortecEXPIRED).parent_close_time >= Check.DeliverAfter, the transaction proceeds to normal balance and trustline settlement.4. Subscription Cancellation & Reserve Recovery
When a user decides to cancel a subscription, the cancellation mechanism relies on the existing
CheckCancelprimitive:CheckCancelfor any or all un-cashed post-dated checks at any time. The payee/merchant cannot block or delay this action.CheckCancelimmediately deletes theltCHECKledger objects and refunds 100% of the associated account owner reserves back to the subscriber.Standard Subscription Workflow Example
Recurring SaaS Subscription (8-Check Batch Example)
CheckCreateitems (respecting the current 8-item batch limit):DeliverAfter= Day 0,Expiration= Day 30DeliverAfter= Day 30,Expiration= Day 60DeliverAfter= Day 60,Expiration= Day 90DeliverAfter= Day 210,Expiration= Day 240CheckCashfor Check 2. The ledger verifiesparent_close_time >= Day 30and settles 15 XRP.CheckCancelfor Checks 3 through 8. Future payments are revoked on-chain instantly, and all remaining reserves are refunded.Advantages Over XLS-78
ltSUBSCRIPTIONobjectltCHECK)CheckCreate)CheckCancelbatch revocationBackwards Compatibility
This amendment is fully backwards compatible:
CheckCreatetransactions withoutDeliverAftercontinue to function identically.DeliverAftersimply ignore the field.featurePostDatedChecks.Security Considerations
ltCHECKreserve. Batching up to 8 checks requires standard ledger reserves, which are fully returned upon cashing or cancellation.CheckIDgenerated on creation, making replay attacks impossible.parent_close_timeof validated ledgers to ensure deterministic execution across all validators.All reactions