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

fix: Additional checks for closing orders/settling markets #21

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

eoin-betdex
Copy link
Contributor

Tightening up operations to settle/close some of the accounts.

  1. Prevent market settlement completing while there is still escrow funds to be returned, i.e., there must still be unsettled orders. This check will mean that by the time close_market is called there can be non-settled orders. At least all winnings should have been paid out.
  2. Throw an error if an order that is attempted to be closed is not yet complete, i.e., settled or cancelled.

Ideally close_market could be restricted while there still are dependent accounts open but I don't thinkthis is possible with the current data model. E.g., be sure all cancelled orders are closed first.

@eoin-betdex eoin-betdex merged commit a9ec973 into MonacoProtocol:main Feb 16, 2023
@eoin-betdex eoin-betdex deleted the fix/additional-checks branch February 16, 2023 19:16
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.

4 participants