-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XLS-34d: Token-Enabled Escrows and Payment Channels #112
Conversation
In the spec, I recommend adding a link to the proposed implementation: XRPLF/rippled#4396 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seelabs could you have a look at this?
Yes, I will take a look. |
The fact that IOU balances can only be held by accounts has been rippled pain point. It restricts payment channels and escrows to XRP only. It also shows up in the AMM and sidechain designs. Since AMMs and sidechains need to deal with IOUs, the ledger object must be a type of account. I'm not sure we would have designed things that way if IOU balances could be held by non-accounts. I do understand the motivation for this proposal. The biggest concern I have with this proposal is the way balances are now represented in the ledger. That's a fundamental concept, and I'd like to keep that clean. Before this change, a trust line represented a net balance between two accounts. After this change a trust line represents the net balance between two accounts as well as the balance of IOUs now owned by other ledger objects where the last owner of that IOU was one of the two accounts on the trust line. That's not a clean abstraction, and this is really a bedrock abstraction in the ledger. I don't see any blockers - I do think this can be made to work. And I also can't think of a better alternative design. The choices I see are:
I vote for (2). I don't love the design restriction where IOUs can only be between accounts, but lifting that restriction by changing how trust lines work seems like a bad trade-off. I also want to mention: I'm speaking for myself. I understand that I'm more conservative than many people in the community or at ripple. But I did want to register my thoughts. |
@seelabs Thanks for your consideration. We're going to close this and put it on the hooks sidechain instead. Perhaps in the future it can go on mainnet. |
Whoops meant to close the PR on rippled :) |
I find this feature to be very valuable and has been a major request by the community for some time. We should do what it takes to ensure this functionality applies to IOU on mainnet. |
@RichardAH I really hope my comment didn't come off as too negative. I didn't mean for the result of my comment to immediately close this. I do understand the benefits of this feature. |
As a rule, going forward, all amendments we write will first go live on the Hooks sidechain. This is a better model that will make all parties happier in the long run I believe. |
@ckniffen To be clear, I also find this feature to be very valuable. |
I am working with channels, and see the use of XRP alone, who's value is in constant flux, being an issue here. If a vendor wants to ensure that the micro payments they offer won't fluctuate in value, they need a stable asset they can offer. But because this is not yet possible, the recipient of micropayments, much like the recipient of an XRP payment will need to quickly exchange it into a stable asset. However, unlike XRP payments which settle almost instantly and can be exchanged quickly, micropayments may not settle for some time, until claimed by recipient. The risk here is small, and it's micro payments so the slippage is also minimal (likely). Just throwing my hat in here as someone looking for this functionality. |
Both of these are highly beneficial to issued tokens, having this as native functionality for these tokens is another positive for the XRPL over other chains which rely on smart contracts etc. to achieve this. |
Without IOU escrows, the XRPL remains in danger of being a toy network. I cannot understand why Ripple wouldn't be jumping at this with all hands on board. Escrowing a highly volatile asset is next to useless, other than for entities that want to lock up their native token for themselves for future release. As Richard says, this will go live on the side network. |
I think this PR is ready to merge, as the standard is a draft. Further edits and comments can be made in follow-up PRs. |
We need token escrow on mainnet, it's beyond me why this isn't being pushed. |
|
||
Settlement of an Instrument (e.g. `EscrowFinish`, `PaymentChannelClaim`) carries the same semantics as crossing an offer: If no Trustline exists on the destination side, then a Trustline with zero limit is created and the tokens (balance) are placed into that line. However creation of a Trustline requires the transaction to be signed by the receiving account (because it creates an on-ledger object and increases the Owner Count and thus the XRP reserve locked by the destination account.) | ||
|
||
### 3.1. New Field: `LockedBalance`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm late to the party, but one thing I haven't been clear on, and I don't think any of these specs have answer is: What exactly are the LockedBalance
and LockCount
fields trying to solve?
In other words, if one were to do a "naive" implementation, and just move the balance from the source trustline to the Escrow object when creating it, and then move it from the Escrow to the source or destination when cancelling or finishing, respectively, what would be broken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we do PayChan or Escrow for XRP the XRP is "moved" from the account to the LE. In this implementation the money is still in the account. It is Locked
. The LockedBalance
is the amount locked in the trustline. The count is the number of locks on the line. So if you had 2 escrows and 3 paychans for the same IOU the LockCount
would be 5.
Technically doing it "naive" way that would go against the exact thing seelabs pointed out.
"The biggest concern I have with this proposal is the way balances are now represented in the ledger."
We don't actually do that. The balance stays in the account however the amount is not transferable because of functionality we implemented using LockedBalance
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dangell7 Thanks for that explanation.
Commenting to add further validation that this feature is desired: I'm a cofounder at Dhai. We're using XRPL payment channels to fund APIs via XRP micropayments. At the moment, our users are necessarily exposed to XRP volatility. We'd like to be able to avoid this for our users. Hence why we vote for this feature! |
Update: see the XLS-34d spec here
Original discussion: #88