XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.5k stars 1.45k forks source link

Cashing a check should automatically create a trustline #3790

Closed nbougalis closed 1 year ago

nbougalis commented 3 years ago

It is currently possible to send a Check even if the recipient doesn't have a trustline for the asset being delivered. However, attempting to cash the check will fail in the absence of a trustline.

Certain use cases would benefit from the ability to automatically create the trustline during check cashing. This is not a problem since it can only happen in response to explicit action by the recipient (similarly to how one can place an offer to purchase an asset without having a trustline established, and the system creates the trustline automatically if and when the order is filled).

The created trust line should have the limit set to 0. Optionally, the "cash" transaction could have a field that allow the recipient to manually specify a different limit.

nbougalis commented 3 years ago

This is in connection with https://github.com/XRPLF/XRPL-Standards/discussions/30

mDuo13 commented 3 years ago

Agreed, and cashing a Check should allow you to accept "over" your limit amount in the same way that an Offer can.

RichardAH commented 3 years ago

What's the status of this? Are you still planning to introduce it as an amendment?

nbougalis commented 3 years ago

Yes. I did some of the prep work but the code to do this is a little more involved than I previously thought. If someone else wants to tackle it, that'd be cool, but if not, we'll probably get on in a few days.

mDuo13 commented 3 years ago

In the meantime, another option for people who want to issue an NFT would be to offer it to the world via an OfferCreate (at some predetermined price, I suppose) and let whoever wants it claim the NFT with their own OfferCreate. Though, I suppose if you're following the "very small numbers as NFTs" proposal you'd want to make sure the rounding can't do something weird with partially-crossed offers. I don't actually know how the rounding might work if someone's offer partially crosses yours.

tequdev commented 1 year ago

I think this Issue can be Closed.