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

Update swapping.mdx #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dev8723
Copy link

@dev8723 dev8723 commented May 7, 2023

fix calculating belief price using simulate endpoint

fix calculating belief price using simulate endpoint
@vercel
Copy link

vercel bot commented May 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2023 7:10pm

}
}
}
).then(result => { beliefPrice = result.return_amount });

beliefPrice = String(beliefPrice * 1000000);
beliefPrice = (beliefPrice / offeredlunaAmount).toFixed(18);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beliefPrice is how many astro we get by spending 1 luna, it should be calculated the same way as querying the pool endpoint

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

Successfully merging this pull request may close these issues.

1 participant