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(); perps-schema; allow multiple liquidations per position #2415

Merged

Conversation

dhruv-chauhan
Copy link
Collaborator

@dhruv-chauhan dhruv-chauhan commented Nov 1, 2023

  • Issue:
    • For Gmx, the following query fails with message: "message": "Ambiguous result for derived field 'liquidation': Multiple 'Liquidate' entities refer back via 'position'"
    • Same is the case with mummy-finance, and level-finance.
  • Fix:
    • On tracing a position, we figured that a position can be partially liquidated multiple times, so the assumption in the schema that a position shall only point to one liquidation event is not true. (Trace: position_logs.md)
    • Since these liquidation events are getting created fine, it’s only the reference to the position that’s broken due to the constraint. Allowing multiple liquidation references for a position fixes this.
  • Deployments:

@dhruv-chauhan dhruv-chauhan linked an issue Nov 1, 2023 that may be closed by this pull request
Copy link
Contributor

@melotik melotik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Nice fix @dhruv-chauhan

Copy link
Contributor

@ishraq8 ishraq8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data looks good.

just make sure the correction from this PR is
included: #2315

@dhruv-chauhan dhruv-chauhan merged commit 209c5c4 into messari:master Nov 2, 2023
4 checks passed
@dhruv-chauhan dhruv-chauhan deleted the perp-position-liquidations branch November 2, 2023 11:42
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.

GMX All position entity liquidations broken
3 participants