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

add oracle_price_lots fn #247

Merged
merged 1 commit into from
Apr 16, 2024
Merged

add oracle_price_lots fn #247

merged 1 commit into from
Apr 16, 2024

Conversation

skrrb
Copy link
Contributor

@skrrb skrrb commented Apr 11, 2024

currently oracle_price is converted to oracle_price_lots inside book’s new_order

let oracle_price_lots = if let Some(oracle_price) = oracle_price {

hence, when placing multiple orders, the same (possible costly -i80f48 math-) operation will be repeated several times. This PR makes the calculation before the new_order loop so it's only computed once per ix with the intention of saving some CUs

@mschneider mschneider merged commit f178293 into master Apr 16, 2024
10 checks passed
@mschneider mschneider deleted the skrrb/oracle-price-lots branch April 16, 2024 09:54
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.

2 participants