FEP-0837: Federated Marketplace

Hello!

This is a discussion thread for the proposed FEP-0837: Federated Marketplace.
Please use this thread to discuss the proposed FEP and any potential problems
or improvements that can be addressed.

Summary

This document describes a minimal implementation of a federated marketplace based on ActivityPub protocol and Valueflows vocabulary. In such marketplace actors can publish offers and requests, respond to offers and requests published by other actors, enter into agreements and exchange information necessary to complete these agreements.

1 Like

There are Proposals and Offers on them, but what about items Wanted?

1 Like

Wanted items should also be Proposals, and the directionality can be specified using provider and receiver properties of the intents.

@lynnfoster and I talked about this in another thread:

So, for example, if you have an Offer, the intents would look like this:

{
  "type": "Proposal",
  "attributedTo": "https://market.example/users/alice",
  "publishes": {
    "provider": "https://market.example/users/alice"
  },
  "reciprocal": {
    "receiver": "https://market.example/users/alice"
  }
}

And if you have a Request:

{
  "type": "Proposal",
  "attributedTo": "https://market.example/users/alice",
  "publishes": {
    "receiver": "https://market.example/users/alice"
  },
  "reciprocal": {
    "provider": "https://market.example/users/alice"
  }
}

It would be easier to use a single boolean property, but if I understood correctly Valueflows vocabulary doesn’t have it at the moment.

2 Likes

Valueflows doesn’t have it, but there has been discussion, and I’d be happy to add it to vf:Proposal, as you say it would be easier, and also more clear. I think it would be safer as not a boolean, because there could be other options in the future, perhaps involving multi-party barter or other exchange - not in this marketplace, but in the broader context. So a code of sorts, maybe “offer”, “want”? Or “request”?

1 Like

Yes, a new property with a string value is fine too.
On the other hand, if you introduce a new property, there will be two ways to specify the direction of a proposal. Maybe it’s not worth it.

I have proposed to add the Request activity (in addition to the actual Offer activity) for this same reason, but this has not been understood yet:

2 Likes

The proposal has been updated: #159 - FEP-0837: Update proposal - fep - Codeberg.org

Notable changes:

  • Clarified the difference between offers and requests.
  • Removed inReplyTo property from Offer activity. It is not necessary because commitment object already has satisfies property pointing to a proposal.
  • Reframed (Offer → Accept/Reject) flow as negotiation process.
1 Like

Valueflows plans to add the offer/request code to Proposal, I re-opened the issue. Although you correctly pointed out the trade-offs, we think clarity of understanding is the most important. Also, the first choice on the page in all timebank software I’ve seen is a dropdown of offer or request. We haven’t named it yet, if you have suggestions, they are welcome. I thought of Proposal.activity, but I don’t know if that would be confusing or helpful vs. ActivityStreams? On the other hand, if we could actually get Request defined as a new AS Activity, then maybe you wouldn’t even need this new code, it could be redundant. Or not, don’t know, see question below about Create.

There is one other new element you might want to consider, that was requested by a user group (a supply chain network, not a marketplace). That is Intent.minimumQuantity. This would be a unitBased proposal where the provider had a minimum order quantity. I don’t know if marketplaces would run into a need. Buying clubs and other groups doing wholesale purchases would need that.

And a change, sorry about that: where you have Agreement.commitments, we’ve been defining some inverse relationships explicitly, and we’d like to use Agreement.clauses (inverse of .clauseOf).

I spent some time reviewing your FEP again. It is really clearly written, and will be useful to me and others to write the next VF one. :slight_smile:

Question: What is the Activity you would use for Proposal and Commitment objects? Would it be Create, and then Update/Delete if needed? And should that be defined explicitly in the example?

A note: Alice wouldn’t need availableQuantity in this case, because the bike is not unitBased. On the other hand, maybe it is still good to have in the example?

The satisfies property of this Commitment object MUST reference the primary intent of the proposal.

I’m wondering about this. If there is negotiating going on, wouldn’t that frequently involve the reciprocal side? Like paying more or less for what is offered, or something else entirely like barter or another currency? I’m not exactly sure how to do this with 2 commitments (objects) in the message though. Because often you do need to specify the quantity you want on the primary side. Or maybe we can assume there isn’t negotiating in a marketplace?

1 Like

I think “direction” is a good term.

A single type is easier to work with, in my opinion. And adding Request to AS will likely take many years :sweat_smile:

minimumQuantity looks unnecessary, but if there will be a demand from implementers, we’ll add it.

No problem! AFAIK there are no implementations yet, so we can easily change it.

For proposals, I think Create, Update and Delete are appropriate. I’ll mention that in the FEP. Commitments are only used as parts of other objects.

Yes, it’s good to have all properties presented in the example.

The Offer(Commitment) activity is a compact form of Offer(Agreement). The party who responds to a proposal is supposed to make repeated Offer(s) until the proposing party accepts the terms and creates the final Agreement.

I was hesitant to use Offer(Agreement) because it’s more verbose.

1 Like

@lynnfoster I think the benefits of using full Agreement outweigh the costs.
The quantity in the reciprocal side of the agreement can be calculated by the proposer, but that makes protocol more fragile due to possibility or rounding errors. And as you noted, the interested party may want to ask for a lower price or a different currency/resource.

Updating the spec: #164 - FEP-0837: Use Offer(Agreement) instead of Offer(Commitment) - fep - Codeberg.org

1 Like