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
Right now swap is expecting an amount for the token in and will calculate the amount of the token out.
What if we added a feature to set how much token out we want from the swap and then calculate the amount of token in is required. We could do this sort of calculation on the front-end and set the min amount out appropriately, but there is a chance that we over pay and get more out than we wanted.
This would allow people to use the swap for "Buy Now" buttons that allow people to pay in any token:
Buyer pays in nDAI
nDAI is swapped for sale price
Seller receives exactly sale price in wNEAR
With out this, the buyer could receive more wNEAR than the sale price.
If this sounds good I'm happy to make a PR.
The text was updated successfully, but these errors were encountered:
Right now swap is expecting an amount for the token in and will calculate the amount of the token out.
What if we added a feature to set how much token out we want from the swap and then calculate the amount of token in is required. We could do this sort of calculation on the front-end and set the min amount out appropriately, but there is a chance that we over pay and get more out than we wanted.
This would allow people to use the swap for "Buy Now" buttons that allow people to pay in any token:
With out this, the buyer could receive more wNEAR than the sale price.
If this sounds good I'm happy to make a PR.
The text was updated successfully, but these errors were encountered: