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

Upgrade RA v2 to allow for any pool to pool swap through Klima #36

Open
ShimonD-KlimaDAO opened this issue Mar 29, 2023 · 0 comments · May be fixed by #50
Open

Upgrade RA v2 to allow for any pool to pool swap through Klima #36

ShimonD-KlimaDAO opened this issue Mar 29, 2023 · 0 comments · May be fixed by #50

Comments

@ShimonD-KlimaDAO
Copy link
Contributor

Currently, in RA V2, we can only swap (s/ws)klima>anything and usdc->anything.
BCT->"any pool token" would also work for small amounts, but not vice versa since we don't have USDC liquidity for any other pool token.

Libswap has default logic which swaps the source token to USDC first if a path is not pre-defined. That's good for non-pool tokens, and works for small amounts for BCT->other as described above.

We should implement a function that checks if (s.isPoolToken[sourceToken]), and swaps to Klima first. This would likely require 5 new mappings in DiamondInit.sol, for the following paths:

s.swap[C.klima()][C.bct()]
s.swap[C.klima()][C.nct()]
s.swap[C.klima()][C.ubo()]
s.swap[C.klima()][C.nbo()]
s.swap[C.klima()][C.mco2()]
@cujowolf cujowolf linked a pull request Jun 15, 2023 that will close 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