galacticcouncil / galacticcouncil/hydration-node
Bug: calculate_cap_difference() in the Omnipool math package is wrong
Open
- Dominant language
- Rust
- Stars
- 208
- Forks
- 109
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.