0 votes
1 view
in Blockchain by (4.1k points)

In the "Coffee with Blockchain" app produced by IBM, it performs price matching between Growers and Buyers. I'm wondering how that matching would be implemented (either in the example app or in an actual implementation).

Example of the app can be seen here: 

How does "Coffee with Blockchain" match growers to buyers?

Some questions to help guide the answer:

Does that matching operate entirely as chaincode? If so, how would that be implemented?

Eg, would the Grower submit a transaction that they have a new batch of beans ready for shipment and that triggers the match-making part in the chaincode to find/choose a Buyer?

I have my doubts on making that process deterministic, otherwise, a grower's new batch announcement fails and they'd have to retry. Perhaps there's a different way of doing so in chaincode?

Or does the matching operate outside of the chaincode, listening for updates in the ledger, and instead it calls the API to invoke a chaincode method to transfer the beans from Grower-A to Buyer-B?

My doubt on that though is the matching is then centralized to some trusted provider, rather than validated/endorsed chaincode.

Thanks

1 Answer

0 votes
by (14.4k points)

As far as my understanding allows me to perceive, your assumptions are not wrong. However, IBM as a company uses algorithms that are not public. So, do not presume that my answer is cent percent accurate. 

In simple terms, the process of mining is basically subjected to the availability of underlying resources (coffee here). This makes farmers the same as blockchain miners. Farmers are supposed to announce the production of resources beforehand. The process where the announcement is done triggers a match-making process that will match the registered buyers.  

But is the implementation completely chain-code based? The only thing that is stopping me from drawing a conclusion is that coffee is continuously and simultaneously traded on commodity exchanges. What happens when the chain code pricing differs substantially from exchange prices? 

Well when the above situation happens, the commodity marketplace reverts back to traditional channels that lie outside the blockchain ledger. So, it won’t be wrong to say that commodity exchange is the trusted provider to match pricing.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...