influenceth / sdk

Utilities for interacting with Influence
Other
14 stars 11 forks source link

Duplicate fixed point logic in Cubit to allow for matching distance calculations #92

Open clexmond opened 2 months ago

clexmond commented 2 months ago

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.

fishonamos commented 2 months ago

Let me work on this @clexmond .

Chvx commented 1 month ago

I can give this a try :)

chachaleo commented 1 week ago

Hey, if no one is still working on this I'd love to take it :)