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
ZenDragon mentioned that it's hard to add liquidity to an already initialized buffer, since you can be frontrun when posting the add liquidity transaction and it's hard to tell how much underlying and wrapped token to have. A solution would be to create a router function that makes it easier to add liquidity using only the underlying.
This router should receive underlying amount and wrapped token as argument, and follow the step-by-step:
Get the buffer balance;
get the wrapped token rate;
Calculate the amount of tokens to wrap, so that the add liquidity is proportional
Wrap tokens using the wrapped token directly
Add liquidity to the buffer proportionally
Return "leftovers" to the sender
The text was updated successfully, but these errors were encountered:
ZenDragon mentioned that it's hard to add liquidity to an already initialized buffer, since you can be frontrun when posting the add liquidity transaction and it's hard to tell how much underlying and wrapped token to have. A solution would be to create a router function that makes it easier to add liquidity using only the underlying.
This router should receive underlying amount and wrapped token as argument, and follow the step-by-step:
The text was updated successfully, but these errors were encountered: