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

addLiquidity should not always consume the full token amounts #8

Closed
0xduality opened this issue Oct 13, 2022 · 0 comments
Closed

addLiquidity should not always consume the full token amounts #8

0xduality opened this issue Oct 13, 2022 · 0 comments

Comments

@0xduality
Copy link

Currently addLiquidity receives the full amounts of tokens specified in the arguments and mints an amount of liquidity determined by the minimum of the two tokens. This is problematic because it's impossible to know the exact amount needed for each token before the transaction is executed.

A better implementation would first determine the liquidity that would be minted, then the amount of tokens implied, then transfer those amounts in.

@0xduality 0xduality changed the title addLiquidity should refund excess token amounts addLiquidity should not always consume the full token amounts Oct 13, 2022
@0xduality 0xduality mentioned this issue Oct 19, 2022
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