DFMM
DFMM copied to clipboard
enforce positive invariant and max `EPSILON` for trading functions
Idea
When we have our bisection yield us a value now that is validated -EPSILON < invariant < EPSILON we need to instead take:
-
0<= invariant < epsilon(which means adjusting how we do bisection a bit) -
epsilon< MAXwhereMAXis chosen such that the trading curve maintains convexity.