zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

[PM] Delete markets that are that the end of their life

Open sea212 opened this issue 3 years ago • 1 comments

Markets that reach their end of the life, for example by being resolved or closed prematurely (e.g., not approved, not enough subsidy), are currently left in storage. Over time this is not an applicable approach, because it will bloat the storage with data that can be fetched through alternative means, for example:

  • Querying the archived markets in SubSquid using GraphQL
  • Querying an archival node at a specific block

One issue that blocks the implementation of that feature is about the redemption of ZTG for winning outcome assets. Currently, the user who owns a winning outcome asset has to redeem ZTG for it manually. There is no time limit to that. Possible approaches to that are:

  • Redeem the ZTG automatically (currently every winning account is iterated anyways during resolution) - in that case some optimizations in regards to the iteration are required to execute it efficiently.
  • Create a minimal version of the market (i.e. MarketId and ResolvedOutcome) that serves as a reference for redemptions.

sea212 avatar Jan 25 '22 16:01 sea212

This is an optimization and not pressing at all currently, reducing priority to low.

sea212 avatar Jul 10 '22 15:07 sea212

Closing in favor of https://github.com/zeitgeistpm/zeitgeist/issues/299

sea212 avatar Apr 02 '24 12:04 sea212