CommonsSwarm / tec-convert

Convert between your Aragon tokens
https://convert.tecommons.org
3 stars 11 forks source link

Require a minimum return amount #10

Closed sembrestels closed 3 years ago

sembrestels commented 3 years ago

When we are using makeBuyOrder and makeSellOrder we are not requiring a _minReturnAmountAfterFee, see [1] and [2] respectively.

We may want to set it up with an allowed slippage of -1%. For this we need to complete first #4, to know in the frontend which are the entry and exit tributes.

The minimum received should appear in the interface as well. It can appear below The conversion amount is an estimate, take inspiration from uniswap/honeyswap: Screenshot from 2020-11-28 23-07-08

GriffGreen commented 3 years ago

add a slippage maximum into the front end, in the code there is a function that has a minimum... it defaults to 0 but we want a default of 1% as the first step, and then we can give the user the view that it is 1%

That is enough for now... the next step is to make it customizable after that.