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

SDK Swap example has an infinite loop... #95

Open
impactdni2 opened this issue Aug 15, 2024 · 1 comment
Open

SDK Swap example has an infinite loop... #95

impactdni2 opened this issue Aug 15, 2024 · 1 comment

Comments

@impactdni2
Copy link

impactdni2 commented Aug 15, 2024

https://github.com/MeteoraAg/dlmm-sdk/blob/main/commons/src/quote.rs#L126-L148

With certain inputs into swap, causes an infinite loop where amount_in > 0 (keeps the outer loop looping), and the bin_array is outside the range (error), so it breaks the inner loop.

Without the actual code for the program (#60 ) its hard to know how this matches up, but my guess is the amount_in check needs to break the inner loop, and the is_bin_id_within_range needs to advance the active bin and then break?

@RasHQ-programmation
Copy link

RasHQ-programmation commented Jan 17, 2025

Same issue for ORCA Whirl, did you find any solutions about input amount ? except fork repo?

best

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

No branches or pull requests

2 participants