zeitgeist
zeitgeist copied to clipboard
[Swaps] Support setting a Rikiddo pool for scalar markets to stale
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.