vegaprotocol / frontend-monorepo

Toolkit for building apps that interact with Vega
https://vega.xyz
MIT License
24 stars 15 forks source link

Improve visibility of liquidation events in explorer #5592

Open JonRay15 opened 6 months ago

JonRay15 commented 6 months ago

The Chore

Question:

  1. Can we identify and quantify liquidation events based on the APIs we have now? (I dont think that has been answered yet)
  2. Should we show them as events in Explorer? - Lowest priority

Tasks

Additional details / background info

Core ticket to store these: https://github.com/vegaprotocol/vega/issues/10352

Thread with some background: https://vegaprotocol.slack.com/archives/CFXA4EGN7/p1704824959615729?thread_ts=1704316209.787389&cid=CFXA4EGN7

Note there is a hack around this to use the trades API and look for type: TYPE_NETWORK_CLOSE_OUT_BAD, but you cant filter for this so we'd end up having to download all teh trade history for that party on that market and filter on the client which could get painful quite quickly if someone trades a lot.

mattrussell36 commented 6 months ago

We have a positionStatus field which can be used to show when you have been closed out, but it doesn't reset after liquidation or closing the position.