zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

Withdraw assets when user sells complete set of tokens

Open saboonikhil opened this issue 2 years ago • 0 comments

I think that event tokens.Withdrawn would be better fit to release/perform compared to tokens.Slashed whenever someone sells complete set? Ref: https://github.com/zeitgeistpm/zeitgeist/blob/db1f928fb45f55b0cfd951c7dc77cfd43369d179/zrml/prediction-markets/src/lib.rs#L1299-L1301

Why?

  • That just sounds right when the event tokens.Deposited is released whenever someone buys complete set. Ref: https://github.com/zeitgeistpm/zeitgeist/blob/db1f928fb45f55b0cfd951c7dc77cfd43369d179/zrml/prediction-markets/src/lib.rs#L2094-L2096
  • tokens.Slashed seems like the change performed without user's awareness (as the description says misbehavior).
  • Slashing funds as a functionality also releases tokens.BalanceSet on-chain which seem redundant for a single change.

Leaving aside above reasons, the event we choose would be useful when we begin tagging them on an account portfolio.

saboonikhil avatar Jan 10 '23 14:01 saboonikhil