zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

[Swaps] Support setting a Rikiddo pool for scalar markets to stale

Open sea212 opened this issue 2 years ago • 0 comments

Currently distribute_pool_share_rewards assumes that only one outcome asset will remain as the resolved outcome. It should be aware of scalar pools and in case of scalar pool should:

  • burn both LONG and SHORT in pool account
  • take total issuance of LONG and SHORT
  • amm_profit = total_issuance - (outcome_short * SHORT + outcome_long * LONG)
  • continue as before after amm_profit was calculated

In addition to that, set_pool_as_stale should call Rikiddo and distribute_pool_share_rewards properly for pools with scalar outcome assets.

sea212 avatar Apr 15 '22 10:04 sea212