Skip to content

XLS-93: Token PayChan - #536

Open
dangell7 wants to merge 23 commits into
XRPLF:masterfrom
Transia-RnD:xls-93
Open

dangell7 wants to merge 23 commits into
XRPLF:masterfrom
Transia-RnD:xls-93

Conversation

@dangell7

@dangell7 dangell7 commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Context of Change

Type of Change

  • New XLS Draft
  • XLS Update (changes to an existing XLS)
  • XLS Status Change (e.g., Draft → Final, Draft → Stagnant)
  • Process/Meta (changes to CONTRIBUTING.md, XLS-1, templates, etc.)
  • Infrastructure (CI, workflows, scripts, website)
  • Documentation (README updates, typo fixes)

@dangell7 dangell7 changed the title XLS-93: Token PayChan — Token-Enabled Payment Channels XLS-93: Token PayChan - Token-Enabled Payment Channels May 10, 2026
@dangell7 dangell7 changed the title XLS-93: Token PayChan - Token-Enabled Payment Channels XLS-93: Token PayChan May 10, 2026
@mvadari

mvadari commented May 11, 2026

Copy link
Copy Markdown
Collaborator

@dangell7 I can't review this PR until it's updated to match the latest master.

@dangell7

Copy link
Copy Markdown
Contributor Author

@dangell7 I can't review this PR until it's updated to match the latest master.

sorry, done

@TimothyBanks

TimothyBanks commented Jul 21, 2026 •

Copy link
Copy Markdown

It looks like the Validate XLS Documents check is failing because of missing sections.

@pwang200

Copy link
Copy Markdown
Contributor

Does locking a token into a payment channel prevent deletion of the source's trustline (IOU) or MPToken (MPT) while the channel is open?

The spec doesn't state this either way, and the "Channel Closure → Source Lacks Trustline or MPT Holding" failure conditions suggest the source's holding may be absent at closure — implying deletion is not blocked. If that's the intent, then in MPT: sfLockedAmount is tracked on the source's MPToken. If that object can be deleted while a channel holds locked value, the per-holder locked accounting is orphaned (the issuance-level sfLockedAmount still counts it, but the holder record is gone).

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md
@mvadari

mvadari commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Please address CI failures and follow the standard templates.

@dangell7

dangell7 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@pwang200 Correct, inherited from XLS-85. IOU line can be deleted (refund then fails tecNO_LINE until its recreated), MPT can't (tecHAS_OBLIGATIONS). Spec documents both, per line lock accounting would be a separate fix amendment covering escrow too.

@dangell7

dangell7 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Restructured to the template, validator passes now.

@Tapanito
Tapanito self-requested a review August 14, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical protocol encoding and accounting issues, along with multiple token-handling ambiguities, must be resolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Introduces XLS-93, extending XRPL payment channels to IOU and MPT assets.

Changes:

  • Adds token channel creation, funding, claims, and closure.
  • Defines token accounting, transfer fees, and issuer controls.
  • Proposes PaymentChannelClawback.
File summaries
File Description
XLS-0093-token-paychan/README.md Defines Token PayChan. Unresolved issues include issuer-redemption exceptions, supply accounting, clawback semantics and encoding, token-signature serialization, precision loss, and XLS-85 inconsistencies.
Review details

Suppressed comments (3)

XLS-0093-token-paychan/README.md:271

  • This summary contradicts this draft's redemption and clawback transitions, which decrease MPT OutstandingAmount, and IOUs do not have an OutstandingAmount field. It should also account for the transfer fee removed from holder balances during an MPT claim.
| **Outstanding Amount**        | Remains unchanged during channel operations                                                                                                                                 | Remains unchanged during channel operations                                                             |

XLS-0093-token-paychan/README.md:76

  • The claim that both primitives use identical creation checks conflicts with required XLS-85, which checks authorization and freeze/lock only for the source (XLS-85 lines 63-71), while this draft checks both parties. Clarify the intended difference or update XLS-85 so implementers have one rule.
  - Note: this is deliberately stricter than base freeze semantics, under which an individual freeze only prevents the frozen holder from sending. Opening a lock is blocked by any freeze on either party, while paying out to the destination at claim time only requires that the destination is not deep frozen (see Normal Claim). This matches the lock creation rules of [XLS-85](../XLS-0085-token-escrow/README.md).

XLS-0093-token-paychan/README.md:266

  • The summary also needs the issuer exception: requiring destination holder authorization unconditionally contradicts the supported issuer-redemption path, since an issuer does not hold or authorize itself for its own token.
| **Destination Authorization** | Required at creation and at claim; cannot be granted during claim if authorization required                                                                                 | Required at creation and at claim; cannot be granted during claim if authorization required             |
  • Files reviewed: 1/1 changed files
  • Comments generated: 9
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Contradictory MPT field, permission, and locked-accounting definitions could cause incorrect implementations.

Review effort: Balanced
Findings: 3 High severity

Open (3)
Resolved since last review (3)

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
@dangell7

dangell7 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@mvadari the document now follows the amendment template: Abstract, Motivation, Specification built from the Ledger Entry / Transaction / RPC sections, Rationale, Backwards Compatibility, Test Plan, Reference Implementation, Security Considerations. Protocol content is unchanged, only moved. 059db88

Could you re-review?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved payout-validation, refund-precision, and authorization contradictions could cause unsafe or divergent implementations.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity · 2 Low severity

Open (5)
Resolved since last review (3)

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated
@dangell7

dangell7 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@mvadari all your comments are addressed in 65c7ef0. Could you take another look when you get a chance?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The specification leaves source-debit conservation unresolved and assigns a transaction discriminator already used by another standard.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Resolved since last review (5)

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Refund-credit precision and MPT fee calculations need explicit rules to prevent lost value or divergent balances.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (2)

Comment thread XLS-0093-token-paychan/README.md Outdated
Comment thread XLS-0093-token-paychan/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Consensus-sensitive accounting, authorization, and signature rules require human verification against the linked implementations.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Claims by credential-authorized destinations without an MPT holding lack a consistent settlement or failure path.

1 open finding

🧠 Review effort: Balanced

- If authorization is required and the destination is not authorized, the transaction fails with `tecNO_AUTH`. For an IOU, a destination with no trustline to the issuer fails with `tecNO_LINE` when authorization is required.

3. **Destination Lacks Trustline or MPT Holding:**
- The destination's trustline or `MPToken` is created during the claim only when the destination itself submits the transaction (and authorization is not required). No other submitter can create a holding for the destination, since holding a token requires the holder's consent.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants