Skip to content

Workspace stake & item stake #54

@lightness

Description

@lightness

Description

All workspaces items should have stakes for each (active) workspace member.
Stake defines "who" receiving value from item.

Example 1.
We have workspace for company of 10 members. Memeber A borrowed from memeber B 10$.
Item: debt. Payment user: B
Item stakes:

member stake
A 1
B 0
... others ... 0

Example 2.
We have workspace for company of 10 members. All except member A made a party for 200$.
Item: party. Payment user: X (let it be)
Item stakes:

member stake
A 0
B 1
... others ... 1

In future steps stakes and payment user will allow us calculate workspace balance.

Obviously sum of all item stakes should not be 0. If you feel nobody receives value from item, either item not needed at all, or consider "all 1" stakes.

If workspace has just single member, stake value doesn't matter - whole item value receives single memeber.

Stake should be > 0. Technically negative stake is possible, but it's hard for user to use it properly. Stake can be float.

It has some sense to keep stake rule as workspace configuration. So member will have preconfigured stakes for every item created.

Most obvious stake rules are:

stake rule description note
ALL_REPORTER reporter - 1, others - 0 reporter - payment user. Useful for "just tracking" wrokspaces, where ballance calculation is not needed
ALL_OWNER owner - 1, others - 0 owner - workspace owner. Useful for cases when invites members only buying something for owner
EQUALLY all members - 1 Most useful rule. When all memebers receives equal "value" for typical item in workspace

Default stake rule: ALL_REPORTER

Workspace owner or memeber with permission UPDATE_WORKSPACE_STAKE_RULE can change stake rule and flag (allow member to change item stake)

When member creates item:

  • if flag allow member to change item stake enabled, member can update stakes (use either predefined rule or specify stakes manually)
  • if workspace has just one member (owner), there's no sense to show/change stakes

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions