-
Notifications
You must be signed in to change notification settings - Fork 942
XLS-85d Token Escrow #272
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-85d Token Escrow #272
Conversation
|
Any chance this would be added to the |
Co-authored-by: David Fuelling <[email protected]>
Co-authored-by: David Fuelling <[email protected]>
Co-authored-by: David Fuelling <[email protected]>
Co-authored-by: David Fuelling <[email protected]>
Co-authored-by: David Fuelling <[email protected]>
|
Co-authored-by: David Fuelling <[email protected]>
|
Update the spec.
Open Issues: Nomenclature for |
Co-authored-by: David Fuelling <[email protected]>
Co-authored-by: David Fuelling <[email protected]>
- Specification: XRPLF/XRPL-Standards#272 - Amendment: `TokenEscrow` - Enables escrowing of IOU and MPT tokens in addition to native XRP. - Allows accounts to lock issued tokens (IOU/MPT) in escrow objects, with support for freeze, authorization, and transfer rates. - Adds new ledger fields (`sfLockedAmount`, `sfIssuerNode`, etc.) to track locked balances for IOU and MPT escrows. - Updates EscrowCreate, EscrowFinish, and EscrowCancel transaction logic to support IOU and MPT assets, including proper handling of trustlines and MPT authorization, transfer rates, and locked balances. - Enforces invariant checks for escrowed IOU/MPT amounts. - Extends GatewayBalances RPC to report locked (escrowed) balances.
In the current world:
Both these examples have an Furthermore, the use of a
It would be very helpful if the documentation could explicitly state that |
I have updated the spec for the sfLockedAmount and As for why Issuer cannot create Escrow that was a design decision that was made. I agree it could be valuable for the Issuer to create an escrow but the issuer could also just create a new account, send value and escrow from there. As for the tecNO_PERMISSION error response you are right, it should have been a tem error as its more of a transaction malformed error than a ledger error. |
|
Do you have thoughts on dealing with "orphaned" escrow ledger-objects? Here's a thought experiment:
Is this scenario discussed elsewhere in the comments, I missed it. |
Are you suggesting we add the authorized trustline automatically for the account? I’m happy to make any changes you would like to recommend. |
I wasn't sure if this case was covered in the existing design, so I was seeking more clarity. I'm not making any suggestions at the moment. What would be ideal behavior in this circumstance ("orphaned escrows")
The scenario that I described in the previous message can be resolved with either of these three alternatives. Perhaps there is a better idea? |
So first, the issuer cannot unauthorize an IOU. The account holder has to send all their tokens back to the issuer and then delete their trustline and then re add it for it to be unauthorized. With MPT though the issuer can unauthorize an account at any time. So with that in mind, maybe just returning the tokens back to the account on Cancel and then rejecting on Finish just like DeepFreeze is the best option. For IOU we add the trustline in an unauthrized state. For MPT it should remain unauthorized. And force CancelAfter... But this actually doesn't solve another issue which is the account just deletes their trustline. (This is guarded for in MPT) so maybe the better solution as you noted is to put something on the trustline that says this account has an escrow or locked tokens and then the trustline can never be deleted therefore never be unauthorized. And the same for MPT where the MPT cannot be unauthorized if there is a LockedAmount. |
That is correct, I was considering the case where the Issuer deep-freezes the escrow-creator and/or escrow-destination. A deep-freeze of the trust line will freeze the trust-line balance.
Are you suggesting returning the tokens back to the issuer in the above line? that seems reasonable, yes. I endorse your idea of |
Technically the issuer is never the account so no, it would go back to the user who held the tokens in the first place. But without authorization they wouldn't be able to do anything with them. However, with the new changes, you can't delete a trustline while having an escrow so you would never be able to remove the auth in the first place. Removing the ability to remove a trustline if you have an escrow solves most of the issues, same with the MPT side. If you have any tokens escrowed you cannot un auth the MPT. I think that solves most of the orphan issues. |
Would you like to review this PR or just take a look at the issues and solutions? Did I solve them? |
|
(In the future let's try to have these conversations before the amendment is released, so that we don't need a separate fix amendment) |
Hello Dennis, thanks for working on this issue. Apologies, I cannot commit to reviewing the PR, I am occupied with other tasks at the moment. I'll try to review it by the end of the week.
I came across this amendment because I started working on the xrpl-py client library implementation. I wasn't aware of its implementation prior to that. |
Trust lines can not be "de-authorized" by the issuer. https://xrpl.org/docs/references/protocol/transactions/types/trustset#trustset-flags The holder could delete their trust line, but that makes it their fault, and their problem to find a resolution. |
No description provided.