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

Filter out partially fillable orders which have been filled completely #137

Merged
merged 3 commits into from
Apr 7, 2022

Conversation

MartinquaXD
Copy link
Contributor

@MartinquaXD MartinquaXD commented Apr 7, 2022

Fixes #136

Sell and buy amounts for partially fillable orders get scaled according to how much they have been filled already.
After the orders have been filled they are useless and can even cause alerts in our solvers. This is because the solvers expect orders to have a non zero buy and sell amount.

To avoid that problem we simply consider orders which with a 0 max_transfer_out_amount as unsolvable.

Test Plan

Updated existing tests
Added new test validating that filled partially fillable orders and normal orders with 0 amounts get filtered out.

@MartinquaXD MartinquaXD requested a review from a team as a code owner April 7, 2022 08:19
crates/orderbook/src/solvable_orders.rs Outdated Show resolved Hide resolved
@MartinquaXD MartinquaXD force-pushed the fix-zero-amounts-partially-fillabe-orders branch from 2fc25c9 to 64b803d Compare April 7, 2022 09:08
@MartinquaXD MartinquaXD merged commit 6c9e302 into main Apr 7, 2022
@MartinquaXD MartinquaXD deleted the fix-zero-amounts-partially-fillabe-orders branch April 7, 2022 09:12
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.

Filter out or remove filled partially fillable orders
3 participants