-
Notifications
You must be signed in to change notification settings - Fork 100
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
mm: Epoch reporting #2808
mm: Epoch reporting #2808
Conversation
martonp
commented
Jun 10, 2024
•
edited
Loading
edited
16239b3
to
4bcdffe
Compare
Unsure if related to these changes but will see a lot of errors running on simnet with a bot:
The one below this may be fixed in #2843
Can be fixed later. |
3da7e10
to
c1f4fd4
Compare
This diff updates the market makers to generate a report of their activities during each epoch. If the rates of each placement is unable to be determined, this is reported as a `PreOrderProblem`, otherwise an `OrderReport` is generated for the orders placed on each side of the market containing information such as lots the bot is required to place, the current number of lots standing, the number of lots booked, the balances required and used for each placement, etc. This information is all displayed on the UI. A bug is also fixed in this diff. Previously, on a call to `core.MultiTrade`, it was possible for some of the orders to be placed, and some of them to result in an error. In this case, an error was returned from `core.MultiTrade`, and the market makers would assume that none of the trades were placed. Now a `core.MultiTradeResult` is returned for each of the requested orders in the `MultiTrade` call containing either the order or an error.
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.
I just looked for general code issues since I am not as familiar as I should be with this area of the code.
UI looks great btw.
cexWithdrawProblem | ||
) | ||
|
||
func (u *unifiedExchangeAdaptor) updateCEXProblems(typ cexProblemType, assetID uint32, err error) { |
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.
Could this func be simplified?
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.
I don't disagree. The locking scheme seems like overkill. We'll follow up.
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.
This is stellar work. I could nit-pick at stuff and I have some followup, but I'm going to merge this as is. It's going in the patch.
This diff updates the market makers to generate a report of their activities during each epoch. If the rates of each placement is unable to be determined, this is reported as a `PreOrderProblem`, otherwise an `OrderReport` is generated for the orders placed on each side of the market containing information such as lots the bot is required to place, the current number of lots standing, the number of lots booked, the balances required and used for each placement, etc. This information is all displayed on the UI. A bug is also fixed in this diff. Previously, on a call to `core.MultiTrade`, it was possible for some of the orders to be placed, and some of them to result in an error. In this case, an error was returned from `core.MultiTrade`, and the market makers would assume that none of the trades were placed. Now a `core.MultiTradeResult` is returned for each of the requested orders in the `MultiTrade` call containing either the order or an error.