Skip to content
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

NFT issuer is inadvertently creating a trustline due to third-party transactions(Version: 2.1.0) #4925

Closed
tequdev opened this issue Feb 22, 2024 · 5 comments · Fixed by #4946
Assignees

Comments

@tequdev
Copy link
Contributor

tequdev commented Feb 22, 2024

Issue Description

Since the NFTokenAcceptOffer does not check the trust line that the issuer receives as a transfer fee in the NFTokenAcceptOffer, if the issuer deletes the trust line after NFTokenCreateOffer, the trust line is created for the issuer by the NFTokenAcceptOffer.

Steps to Reproduce

  1. Issuer has Trustline (ie: USD)
  2. Mint NFToken with transfer fee
  3. Transfer NFToken to Alice.
  4. Alice create NFTokenOffer to bob with 10 USD
  5. Issuer delete USD Trustline
  6. Accept NFTokenOffer

Expected Result

NFTokenAcceptOffer transaction fails with terNO_LINE

Actual Result

NFTokenAcceptOffer transaction succeeds and a trustline is created for the issuer.

Environment

rippled 2.1.0

Supporting Files

https://gist.github.com/tequdev/f5cfd3f3cfbfcf4a22205052962e6cfe

@ximinez
Copy link
Collaborator

ximinez commented Feb 22, 2024

Do you have any example transaction(s)?

@tequdev
Copy link
Contributor Author

tequdev commented Feb 23, 2024

Do you have any example transaction(s)?

You can find gist code in the supporting files.

@ximinez
Copy link
Collaborator

ximinez commented Feb 26, 2024

Yes, that's the code you used to generate transaction, but what I'm asking for is transaction IDs that have already been validated, and which network they're on.

@tequdev
Copy link
Contributor Author

tequdev commented Feb 27, 2024

This NFTokenAcceptOffer transaction creates a trustline for NFT's Issuer account.

https://testnet.xrpl.org/transactions/DB9EC35BEC75D314CAB5D4ADBF676C0ACE4EF03EAA83268921C377CD0ACF4934/detailed

NFToken issuer account
https://testnet.xrpl.org/accounts/rL4qyVGJLjch4863okbM9brrR5EhFrHZ61

@ximinez
Copy link
Collaborator

ximinez commented Feb 29, 2024

Yep. Confirmed that this is a legitimate issue.

scottschurr added a commit to scottschurr/rippled that referenced this issue Mar 7, 2024
Fix bugs in interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Also if Alice issues an IOU and also mints NFTokens with a
transfer fee, Alice's IOU cannot be used to pay for transfers
of those NFTokens.  That's fixed.

Resolves XRPLF#4925.
Resolves XRPLF#4941.
scottschurr added a commit to scottschurr/rippled that referenced this issue Mar 7, 2024
Fix bugs in interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Also if Alice issues an IOU and also mints NFTokens with a
transfer fee, Alice's IOU cannot be used to pay for transfers
of those NFTokens.  That's fixed.

Resolves XRPLF#4925.
Resolves XRPLF#4941.
scottschurr added a commit to scottschurr/rippled that referenced this issue Mar 8, 2024
Fix bugs in interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Also if Alice issues an IOU and also mints NFTokens with a
transfer fee, Alice's IOU cannot be used to pay for transfers
of those NFTokens.  That's fixed.

Resolves XRPLF#4925.
Resolves XRPLF#4941.
scottschurr added a commit to scottschurr/rippled that referenced this issue Jun 17, 2024
Fix interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Resolves XRPLF#4925.
seelabs pushed a commit that referenced this issue Jun 18, 2024
Fix interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Resolves #4925.
vlntb pushed a commit to vlntb/rippled that referenced this issue Aug 23, 2024
Fix interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Resolves XRPLF#4925.
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 a pull request may close this issue.

3 participants