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

Index Pool Token <> Token mapping #84

Closed
gasperbr opened this issue Sep 1, 2021 · 0 comments
Closed

Index Pool Token <> Token mapping #84

gasperbr opened this issue Sep 1, 2021 · 0 comments

Comments

@gasperbr
Copy link
Contributor

gasperbr commented Sep 1, 2021

Problem: The UI needs to find the relevant pool addresses for two tokens.
Solution: When deploying an index pool store the pool address under a pools mapping so that every token combination is covered (n*(n-1)/2) combinations.

for(let i = 0; i < pools.length; i++)
for(let j = i + 1; j < pools.length; j++)
pools[tokens[i]][tokens[j]] = pool

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

1 participant