The current implementation uses uint32 in most places to represent the traded volume for an instrument.
While this is sufficient under normal market conditions, it introduces the possibility of integer overflow if the traded volume exceeds 4,294,967,295 (math.MaxUint32). Although this may be uncommon today, it is a hard limit that could be reached during periods of exceptionally high trading activity or as market volumes continue to grow over time.
I came across an older forum discussion that raises the same concern: ref
It may be worth considering changing the volume type to uint64 (or another larger integer type) throughout the codebase to eliminate this limitation and make the implementation more future-proof.
The current implementation uses
uint32in most places to represent the traded volume for an instrument.While this is sufficient under normal market conditions, it introduces the possibility of integer overflow if the traded volume exceeds
4,294,967,295(math.MaxUint32). Although this may be uncommon today, it is a hard limit that could be reached during periods of exceptionally high trading activity or as market volumes continue to grow over time.I came across an older forum discussion that raises the same concern: ref
It may be worth considering changing the volume type to uint64 (or another larger integer type) throughout the codebase to eliminate this limitation and make the implementation more future-proof.