1

Checking the math behind uniswap v3 and I constantly seeing the term: Q64.96 in sqrtRatioX96

I am just wondering if this is a naming convention in smart contract world to describe the format of the number? if so, what does it exactly mean? (Not asking the pricing logic behind Uniswap v3)

https://docs.uniswap.org/protocol/reference/core/libraries/SqrtPriceMath

2

This looks like a notation in math: https://en.wikipedia.org/wiki/Q_(number_format)

For example, the specification Q3.12 describes a signed binary fixed-point number with a w = 16 bits in total, comprising the sign bit, three bits for the integer part, and 12 bits that are assumed to be fraction. That is, a 16-bit signed (two's complement) integer, that is implicitly multiplied by the scaling factor 2−12

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.