xrpl-dev-portal icon indicating copy to clipboard operation
xrpl-dev-portal copied to clipboard

Document the cap on the number of offers that can be matched by a single transaction

Open intelliot opened this issue 1 year ago • 1 comments

The payment engine has a limit of 1000 offers that can be crossed (matched) by any single transaction. If any transaction attempts to process over 1000 offers, the transaction consumes the liquidity from the first 1000 offers, and then continues with processing the transaction without considering any other offers in that particular order book. This is a remarkable behavior which has potential implications that traders must consider when trying to understand what their offers may do, especially since a trader generally has no control over the number of counterparties' offers that may be matched.

See: https://github.com/XRPLF/rippled/blob/40b4adc9cc296a7e3c6e8c94b5a977a54c835613/src/ripple/app/tx/impl/CreateOffer.h#L41

intelliot avatar May 23 '24 20:05 intelliot