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

Leverage validate_slippage from primitives #265

Merged
merged 3 commits into from Feb 14, 2023
Merged

Conversation

lemarier
Copy link
Contributor

@lemarier lemarier commented Jan 19, 2023

Simplify Oracle pallet and tests for better readability

The primitives logic can be found here;
https://github.com/tidelabs/primitives/blob/dev/primitives/src/swap/swap.rs

This also include a nightly fuzzer that run on Github actions every day (in the primitives).

This is an example how we could use tidext to validate slippage of 2 swaps based on an amount to fulfill.
https://github.com/tidelabs/tidext/blob/98b6bbe038241a83c56482b6bb3e73d76cabe842/examples/examples/swap.rs#L180-L183

Signed-off-by: david david@lemarier.ca

Simplify Oracle pallet
Simplify tests as well, as from now we could fuzz the function directly

Signed-off-by: david <david@lemarier.ca>
@lemarier lemarier added A0-pleasereview Pull request needs code review. C1-low 📌 Does not elevate a release containing this beyond "low priority". B1-releasenotes Changes should be mentioned in the release notes of the next minor version release. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited labels Jan 19, 2023
Signed-off-by: david <david@lemarier.ca>
Signed-off-by: david <david@lemarier.ca>

# Conflicts:
#	Cargo.lock
@lemarier lemarier merged commit a88a6d4 into dev Feb 14, 2023
@lemarier lemarier deleted the lemarier-update-slippage branch February 14, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview Pull request needs code review. B1-releasenotes Changes should be mentioned in the release notes of the next minor version release. C1-low 📌 Does not elevate a release containing this beyond "low priority". D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant