Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ON HOLD: Calculate score as per "rank by surplus" CIP #2406
ON HOLD: Calculate score as per "rank by surplus" CIP #2406
Changes from 13 commits
6030e2f
8a5e469
6b08988
428ece6
3763f1b
fa12490
e15dda1
486d235
e83ec4f
f424e8b
61840e0
b7923c8
52c74f1
eecace7
3cc1e9c
f3df0c5
d5981f0
05dd8a7
4e36c36
212c971
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As is the
surplus
vector will contain multiple entries for the same token and 0 surplus entries for JIT orders.Should we aggregate those surpluses in the same token and filter out 0 amounts to remove noise or are the individual entries specifically needed for some bookkeeping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we aggregate them at the
solution
level, I have to do it again at thesettlement
level, since score is calculated forsettlement
andsettlement
can have multiplesolution
s. So i figured I just do it once at thesettlement
level and keep vector here for potential debugging purposes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this struct need to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's referenced in the
boundary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we could only take a reference everywhere where we currently require ownership.
Also unrelated to this PR it's a bit awkward that the
ClearingPrices
are strictly related to aTrade
but this is not enforce on a type level. Also the struct ispub
in the crate so I think it's probably possible to skrew up and useClearingPrices
for a trade it's not related to.Just wanted to bring it up in case we want to refactor the
ClearingPrices
at some point.