Bonfida / agnostic-orderbook

Apache License 2.0
79 stars 33 forks source link

Add FP32 explanation to README #41

Closed ellttBen closed 2 years ago

Henry-E commented 2 years ago

This looks good but it's more of a literal explanation of what fp32 numbers are, I was more interested in understanding how the use of fp32 numbers relate to quote qty, base qty and the mint token decimals we often have to deal with in Solana. Plus any context around the decisions. For example in dex v3 we used quote lots and base lots, then passed everything in as u64 with no concept of decimals. Does this question make sense / sound reasonable? It's more of a Solana-based explanation I was looking for than a fp32 wiki page. Maybe I'm just being dumb in asking but understanding base lots and quote lots, plus keeping track of how they affect other calculations when building on top of dex v3 was one of the more difficult / tricky things to figure out.