Can you provide some advice on modelling a supply chain?

+4 votes

Hi experts,

I have a supply chain scenario in which I'd like to track the transfer of an asset between multiple parties. The main reason for doing this is to ensure that I can track the location of the asset and to know who to blame in case the asset is lost or stolen.

So I have two main problems:

  1. The representation of the asset. For example, Party1 issues an asset and sends it to himself to signal that he is the current owner.
  2. Ensure the validity of a transfer. Party1 now wants to send this asset to Party2.

For problem 1, I suppose simply using the asset API will fit my needs. In this case, I simply creating 1 unit of the asset and preventing more units from being created will be enough.

However for problem 2, I need to prevent invalid transfers. For example, I would like to allow Party2 to confirm that it really received the asset before the transaction is closed, otherwise Party1 could send the asset to Party2 in the blockchain while keeping possession of it in the real world, and then Party2 could be accused of stealing the asset. Any suggestions for solving problem 2?

 
asked Sep 23, 2018 by shevagod

1 Answer

+2 votes
 
Best answer
If you're using MultiChain 2.0 (alpha 5) you could use Smart Filters for this:

1. When issuing the asset, set a field in the asset details to state that the asset can only be transferred if the recipient approves the transfer.

2. Whenever one of these assets is transferred, party 1 uses preparelockunspentfrom + createrawexchange to offer an exchange in which it sends the asset and asks for nothing in return. This offer is passed to party 2. Party 2 examines the transfer, and if it approves, it uses preparelockunspentfrom + completerawexchange to add its own pair of inputs and outputs (with nil assets) to the transaction, purely to indicate its approval. (It could also add metadata here if it wanted to explain more.)

3. Install a Smart Filter that insists that, any time a transfer of an asset occurs with this field set in the asset details, the recipient of that transfer has also signed one of the transaction inputs. This will prevent unapproved transfers of these assets.
answered Sep 24, 2018 by MultiChain
selected Oct 11, 2018 by shevagod
...