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

fix: limit amm swap route length #966

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

sander2
Copy link
Member

@sander2 sander2 commented Mar 13, 2023

Limits the route length in swap_exact_token_for_tokens_through_stable_pool. Longer term we might want to make the weight parametric over the route length. A slight complication is that to determine the number of swaps, you need to iterate over the route vector, so you'd be spending some computation prior to execution, which is not ideal. We could add an additional parameter containing the number of swaps to prevent that. But anyway for this fix will suffice

Addresses https://github.com/interlay/srlabs-audit/issues/10

@sander2 sander2 force-pushed the fix/limit-swap-route-length branch from d06755d to b628da9 Compare March 14, 2023 12:09
@sander2 sander2 force-pushed the fix/limit-swap-route-length branch from b628da9 to e209647 Compare March 14, 2023 12:10
@gregdhill gregdhill merged commit 688bb30 into interlay:master Mar 14, 2023
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

Successfully merging this pull request may close these issues.

2 participants