Comment on page
BrainDex takes a fee equal to half of the difference between the amount out minimum after slippage and the actual amount received, with a maximum fee of 0.2% and a minimum fee of 0.05%.
Because the router fee depends on the difference between the passed
amountOutMinparameter and the actual amount received, for the sake of this example we will assume that
amountOutMinand amount received are equal. In practice, because the router fee is half of the difference floored at 0.05%, the amount received after router fees will never be lower than the following equation: