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

bundling orders situation #97

Open
rouzwelt opened this issue May 17, 2024 · 0 comments
Open

bundling orders situation #97

rouzwelt opened this issue May 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@rouzwelt
Copy link
Collaborator

atm the bot logic to bundle the orders is that it loops over each order's inputs and outputs and gather each combination based on the token pair into an array of objects with top fields holding the tokens pair details(address, symbol, decimals) and an array of takeOrders each having the order id and takeOrder struct + IOIndexes that can be consumed by the arb() method.
this process will still take place for when bundliing is not selected as an option. which is not necessarily needed in case of processing one order at the a time and is only kept to have an unified object format for bundling/no bunlding cases.

one of the main issues with nested loops like above is that they are highly cyclomatic and hard to test, this needs to reviewed and refactored in a way that addresses the issues mentioned above, ie make it easier to test which as a result would make things more secure as well as possibly refactoring it with a better design that is less bug prone.

@rouzwelt rouzwelt added the enhancement New feature or request label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant