rippled icon indicating copy to clipboard operation
rippled copied to clipboard

Apply `asfDisallowIncomingTrustline` blocker to `OfferCreate` txn

Open dangell7 opened this issue 1 year ago • 1 comments

Issue Description

The asfDisallowIncomingTrustline flag was introduced in https://github.com/XRPLF/rippled/pull/4336. When introduced it was not applied to the CreateOffer transactor.

I believe it should be. The functionality should be similar to the asfRequireAuth flag.

Steps to Reproduce

  • Issuer "issues" USD token. (Distribution account establishes trustline ("USD") with Issuer and Issuer funds Distribution account)
  • Distribution account creates a sell offer.
  • Issuer sets asfDisallowIncomingTrustline flag.
  • User submits CreateOffer txn without a trustline for the USD currency.

The offers cross and the user now owns the token with a 0 LimitAmount Trustline. The user cannot make payments with the token but could sell the token with an offer.

Expected Result

I would expect that if the issuer has set the asfDisallowIncomingTrustline flag and a user tries to create an offer with CreateOffer but does not have the trustline or a LimitAmount > 0, the error response should be tecNO_LINE

Actual Result

The actual result is that the OfferCreate transaction succeeds.

Environment

Supporting Files

Let us discuss :)

dangell7 avatar Aug 02 '24 17:08 dangell7

Hi will fine community

kohteinaung avatar Oct 01 '24 20:10 kohteinaung