CurveMath
What is it?
CurveMath is a utility implementing the Newton Algorithm and other mathematical utils used in Curve's CryptoSwap contracts. Here's the source code.
How are we using it in Perpetuals?
We use it in get_dx_ex_fees to get the result of Curve's get_dy
function without the fees.
Have a look at the fees section to get a better understanding about how Increment computes the fees.
Last updated