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

Swaps Buffer Support #314

Closed
johngrantuk opened this issue Apr 26, 2024 · 1 comment · Fixed by #348
Closed

Swaps Buffer Support #314

johngrantuk opened this issue Apr 26, 2024 · 1 comment · Fixed by #348
Assignees

Comments

@johngrantuk
Copy link
Member

Not 100% this is direction yet but likely.

New parameter added to swap steps. Basically the flag says "hey, the pool is not a pool, it's actually just a buffer".

For the batch router, each swap step has an extra boolean if the "pool" you're trading against is not a pool, but a wrapper, it has to be true in other words, for bb-a-usd, you'll have 3 steps:

  • pool: waDAI, trade dai for waDAI. isBuffer = true
  • pool: bb-a-usd, trade waDAI for waUSDC. isBuffer = false
  • pool waUSDC, trade waUSDC for USDC. isBuffer = true

Preferably the API can indicate if a pool is a buffer or not. Open an issue when confirmed this approach.
Also need to update docs.

@johngrantuk johngrantuk linked a pull request Jul 9, 2024 that will close this issue
@johngrantuk johngrantuk self-assigned this Jul 9, 2024
@johngrantuk
Copy link
Member Author

Even using deploy6 there is still noticeable discrepancy between query and swap results. Joao is investigating. Apart from that the current draft PR is up to date and just has failing tests due to this issue.

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 a pull request may close this issue.

1 participant