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

[Orderbook]: Tick to price conversion and tests #41

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

AlpinYukseloglu
Copy link
Collaborator

Closes: #31

What is the purpose of the change

This PR implements conversion logic for deriving price from a given tick.

Testing and Verifying

All the core functionality is tested in test_tick_math.rs. The test cases are in parity with the Go tests we have for our tick price conversions in our CL module, which is appropriate since the functionality should be identical.

}

pub type ContractResult<T> = Result<T, ContractError>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: borrowed this convention from Pyth's contracts because I found it to simplify things quite a bit.

@crnbarr93 crnbarr93 merged commit 6d4189d into main Feb 27, 2024
2 checks passed
@crnbarr93 crnbarr93 deleted the alpo/tick-to-price-clean branch February 27, 2024 14:34
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.

[Orderbook]: Tick to price conversion logic
2 participants