But [price x fee x 2] = [3.466 x 0.002 x 2] = 0.013864 and thus leads to a zero profit price of [3.466 + 0.013864] = 3.479864 and not 3.481. Or am I missing something?
I'm adding value to compensate exchange rounding.
For example price have 3 decimals 0.000, I get minimum of this decimals value 0.001 and add this value to zero profit price for buy and subtract from sell profit price.
Rounded value exact 3.481.