satoru
satoru copied to clipboard
test: Improve tests of `pricing_utils` library.
Description
Implement and improve tests of pricing_utils
library.
File: test/pricing/pricing_utils.cairo
.
Acceptance criteria
- Unit tests (nominal and failure) are implemented and passing.
Happy to take this
Assigned 🔥
Hey @sparqet and @Sk8erboi84,
I've been looking into how we handle exponent operations, particularly in fn apply_exponent_factor()
. Using a fixed point library might be a more efficient approach, drawing parallels to GMX's method. Here's an illustrative snippet:
uint256 weiValue = PRBMathUD60x18.pow(
floatToWei(floatValue),
floatToWei(exponentFactor)
);
I propose considering the cubit library for such operations. Would love to hear your feedback.