galacticcouncil / hydration-node

Hydration node - Cross-chain liquidity protocol built with Polkadot-SDK
https://hydration.net
Apache License 2.0
170 stars 66 forks source link

Bug: Spot price calculation with share asset within stablepool #869

Closed dmoka closed 1 month ago

dmoka commented 2 months ago

This check prevents the spot price calculation between share and stable asset: https://github.com/galacticcouncil/HydraDX-wasm/blob/d0e8a31b7c9aedef3344d8aed9b05e9185fb89d2/src/lib.rs#L751-L753

We want an && instead of || in the check.

Optionall, we could check if assets that is not in reserves is pool_id.

dmoka commented 1 month ago

Closed as tracked in the source repo: https://github.com/galacticcouncil/HydraDX-wasm/issues/32