You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
0xduality
changed the title
addLiquidity should refund excess token amounts
addLiquidity should not always consume the full token amounts
Oct 13, 2022
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.
The text was updated successfully, but these errors were encountered: