Alternate Token Enabled Escrows and PayChan #133
Replies: 5 comments 15 replies
-
Can you elaborate on that bit bi-directional usecase or point us to docs of it or something? Thanks @ximinez |
Beta Was this translation helpful? Give feedback.
-
Always been a fan of Payment Channels and would love to see them available for IOUs. Great work @ximinez. What has to happen next to get this into an amendment? |
Beta Was this translation helpful? Give feedback.
-
We're super interested in this feature at dhali.io |
Beta Was this translation helpful? Give feedback.
-
So, I personally see no issue with this proposal, neither I have any improvements. The question is what road blocks are we experiencing now in order to bring this to XRPL main net? What we can do to support and facilitate implementation of this element? We have been demanding it nearly since day 1 of our existence on XRPL. |
Beta Was this translation helpful? Give feedback.
-
Regarding this pre-proposal, to what extent will multi-asset payment channels be compliant with Interledger standards? |
Beta Was this translation helpful? Give feedback.
-
Introduction & background
I've been thinking about the XLS-34 proposal to allow putting tokens into Escrows and PayChans (which I'll call "instruments" for the rest of this document):
PaychanAndEscrowForTokens
: Token-Enabled Escrows and Payment Channels support (XLS-34d+) rippled#4396In addition to the concerns raised by @seelabs in #112 (comment), I have three concerns, specifically about the "LockedBalance" mechanism, that I consider very strong blockers to merging the proposed code changes.
LockedBalance
Idea for an alternate approach
The following idea is based off of XLS-34, but is intended to supersede and replace it.. Anything not related to the
Locked…
fields should be considered as included by reference (e.g. the addition ofTransferRate
). If it moves to a more formal specification, it should at minimum use a different amendment name to prevent potential conflict, and the authors of XLS-34 should be offered co-author credit.This is not a fully fleshed out spec, but I wanted to get a discussion going before the current proposed implementation is merged to develop.
These are the two big changes:
sfCounterpartyNode
orsfIssuerNode
to the instrument object alongside Owner Node and Destination Node.) The requested tokens will be transferred from the owner's trust line with the issuer to the instrument's "Amount" field (the "Amount" will always be positive, unlike trust line balances), ignoring transfer rates. Note that the "Amount" is already represented by anSTAmount
, so no new logic should be needed to do that, and the issuer's account ID will automatically be included.Example
Alice has a trust line with GW and holds $1000/GW. Bob also has a trust line with GW, and holds $100/GW. Alice submits an EscrowCreate transaction to escrow $100/GW for Bob. When the transaction is done, Alice's balance will be $900/GW, Bob's will be unchanged at $100/GW, and a new Escrow object will be created that holds $100/GW. Alice's owner count will be increased by 1, and the Escrow object will be added to Alice, Bob, and GW's owner directories. GW's current transfer rate will be stored in the Escrow object. Assume that it is 2%.
If Bob submits an EscrowFinish for Alice's $100/GW escrow, Alice's balance with GW will remain unchanged. Bob's balance will increase $98/GW (because of the transfer fee). The escrow object will be removed from all three owner directories, and deleted. Alice's owner count will be decreased by 1.
If, instead, Alice submits an EscrowCancel for the escrow, Alice's balance with GW will increase by $100/GW (ignoring the transfer fee). Bob's balance will remain unchanged. The escrow object will be removed from all three owner directories, and deleted. Alice's owner count will be decreased by 1.
Pros
Cons
Interaction with other features and mechanisms.
Potential Objections
I want to address one potential objection here, even though I'm sure there will be others:
Beta Was this translation helpful? Give feedback.
All reactions