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

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

Open
intelliot opened this issue May 23, 2024 · 1 comment
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts defi Relating to the DEX, currency/asset trading, market-making/AMM, and other on-chain financial tools

Comments

@intelliot
Copy link
Contributor

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

@joynancy
Copy link

joynancy commented May 28, 2024

Additionally, it would be beneficial if xrpl.org could provide guidance on best practices for handling large-volume orders (exceeding 1000) when mentioning the limit of 1000 offers.

Take this x.com post as a reference: https://x.com/angell_denis/status/1792208779976507573, it suggested trader to use the tfImmediateOrCancel or FillOrKill flag.
I see these two flags were explained here https://xrpl.org/docs/references/protocol/transactions/types/offercreate/, suggest to take this opportunity to guide the use case of these two flags.

@mDuo13 mDuo13 added content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts defi Relating to the DEX, currency/asset trading, market-making/AMM, and other on-chain financial tools labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts defi Relating to the DEX, currency/asset trading, market-making/AMM, and other on-chain financial tools
Projects
None yet
Development

No branches or pull requests

3 participants