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

Ensure the user gets no change back. #3

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

0xOmarA
Copy link
Member

@0xOmarA 0xOmarA commented Feb 29, 2024

Previously, the amount of XRD that Ignition contributed was equal to the amount of user resources times the price reported by the oracle. This meant that there are cases where the user can get some change back due to the oracle and pool prices being slightly different but within the allowed percentage difference.

We have agreed that we would like the user to get no change back. This PR changes how much XRD is provided for the user's contribution where we always provide the amount of user resources times the price reported by the oracle plus an extra maximum_allowed_price_difference_percentage% padding on top. This ensures that there is enough XRD to cover the case when additional XRD is required to contribute all of the user assets.

@0xOmarA 0xOmarA merged commit 591a344 into main Mar 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants