Currently calculating distance in js in the SDK vs Cairo onchain results in slightly different values. Sometimes this can result in miscalculating lease rates, or other values. Ideally we could mimic (using BigInt math) the logic in acos_fast here https://github.com/influenceth/cubit/blob/main/src/f64/math/trig.cairo#L29 to do so.
Currently calculating distance in js in the SDK vs Cairo onchain results in slightly different values. Sometimes this can result in miscalculating lease rates, or other values. Ideally we could mimic (using
BigIntmath) the logic inacos_fasthere https://github.com/influenceth/cubit/blob/main/src/f64/math/trig.cairo#L29 to do so.