dyne / zenpub

Reflow federated economic network
GNU Affero General Public License v3.0
13 stars 3 forks source link

Negative quantities of a resource #59

Open pral2a opened 3 years ago

pral2a commented 3 years ago

After transferring the totality of an economicResource to a new agent it is still possible to perform further economicEvent (i.e. transfer something it doesn't exist) even if the economicResource has 0 units.

The qty. goes negative but the user is not informed during the creation of the economicEvent.

If this needs to be understood as a form of debt in Value Flows I think the implementation should be more explicit.

fosterlynn commented 3 years ago

Hi, Lynn from Valueflows here, hoping to be helpful. :)

Speaking from a general point of view, not for your specific requirements: This could be valid for 2 possible reasons:

  1. In some use cases, like mutual credit, negative balance is valid. But of course not all use cases.
  2. In distributed technologies especially, there might be some race conditions where events come through in the wrong order, but actually don't create a negative balance in real life.

But, your point about documentation is well taken, thank you.

sbocconi commented 3 years ago

Hi @fosterlynn, should not a economicResource that becomes negative be represented by something like a debt or a commitment?

It sounds as if the concept resource is not compatible with negative quantities? Especially in a track and trace scenario, this might lead to the wrong path for a resource, or to a split (the same resource existing in different situations, such as owner, location, etc.)

pral2a commented 3 years ago

Hi, @fosterlynn thanks for your answer!

We perfectly understand the reasoning behind it from the Value Flows vocabulary point of view. Our comment is more on the line we think Zen Pub should be more explicit in the way it enforces the vocabulary as a way to facilitate and not only record a particular transaction. In particular when it involves two parties.