HydraDX-node
HydraDX-node copied to clipboard
Bug: calculate_cap_difference() in the Omnipool math package is wrong
https://github.com/galacticcouncil/HydraDX-node/blob/ac9335f517f4919fb296b432ad0f6385f22d6a43/math/src/omnipool/math.rs#L457
Calculation is wrong, correct calculation is specified here, along with correct way to test: https://www.notion.so/hydradx/Fixing-calculate_cap_difference-4d6bf0a1df074d9e8fe4dbbf2d0458b8
If the function is only used in UI, it may be moved to SDK.