Tracking assets

+2 votes
Is it possible to track each individual asset item.

If i have a system with an asset representing currency (USD) and another one representing  some virtual item (Item).

I then "buy" 10 "items" for  1 "USDs" each.

Then i "buy" another 10 "items" for 2 "USDs" each.

I then "sell" 10 "items" for 3 "USDs" each - is there  a way i can tell that the "items" i am "selling" have originally cost me 1 "USD" each?

In a way, is there a way to track which of the "Items" i am "selling" ?

* by buying and selling i am referring to "Atomic exchange transactions" swapping the USD assets for the ITEM assets *
asked May 19 by zawisza

1 Answer

0 votes
First, you may want to consider creating separate assets for each of the sets, since with MultiChain's built-in rules, the units of an asset are indistinguishable from each other.

If that is not an option you can consider using inline metadata to represent the specific assets, where a transaction filter on the blockchain ensures that this metadata is preserved from inputs to output. An example of this technique is shown here, although the use case is somewhat different:

https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/track-asset-units.js
answered May 20 by MultiChain
...