Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stableswap share spot price calculation #32

Open
martinfridrich opened this issue Aug 5, 2024 · 0 comments
Open

Stableswap share spot price calculation #32

martinfridrich opened this issue Aug 5, 2024 · 0 comments

Comments

@martinfridrich
Copy link
Contributor

This part of the code is not correct. Stableswap share is not part of the assets in stableswap so this check prevent spot price calculation for shares

HydraDX-wasm/src/lib.rs

Lines 749 to 753 in d0e8a31

let idx_in = reserves.iter().position(|v| v.asset_id == asset_in);
let idx_out = reserves.iter().position(|v| v.asset_id == asset_out);
if idx_in.is_none() || idx_out.is_none() {
return error();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant