How to tokenize your farm using Ignis

From ArdorDocs
Jump to: navigation, search
This page contains changes which are not marked for translation.
Other languages:

Introduction

Following an article about how to tokenize an art asset on the blockchain, this article explains the art of tokenization of a farm. It is known that the future will be tokenized, for instance, companies like Max Property Group are preparing for that future with the beginning of real estate tokenization.

The farm scenario is as follows:

  • The farm is divided into gps locations
  • The GPS locations have one tree type associated with them
  • The products to be sold are the tree itself and the fruit generated by it


Tokenization of gps locations

The scenario presented here is a farm comprised of 4 gps locations:

1545363453077.png


Each GPS location will be represented as a singleton asset as shown in the following example. Please refer to the basic guide Issuing Nonfungible Tokens (NFTs) as Singleton Assets using Ignis for a detailed step-by-step guide for issuing a singleton asset: https://testardor.jelurida.com/nxt?requestType=getAsset&asset=12233955077041858977

{
    "quantityQNT": "1",
    "accountRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
    "decimals": 0,
    "name": "gps0001",
    "description": "3.139003,101.68685499999992",
    "hasPhasingAssetControl": false,
    "requestProcessingTime": 0,
    "asset": "12233955077041858977",
    "account": "15382970207090678772"
}


Note: the description contains the coordinates. The first GPS location is already tokenized.


Tokenization of the trees

The next step is to figure out the tokenization of the trees and the linking to the GPS locations.

Each tree is its own singleton asset, with the description containing the asset id of the relevant GPS location. Have a look at the example:

https://testardor.jelurida.com/nxt?requestType=getAsset&asset=16023725080757465905

{
    "quantityQNT": "1",
    "accountRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
    "decimals": 0,
    "name": "tree0001",
    "description": "12233955077041858977",
    "hasPhasingAssetControl": false,
    "requestProcessingTime": 1,
    "asset": "16023725080757465905",
    "account": "15382970207090678772"
}


The trees have two states. The first one is when they provide fruits and the second one is when they are going to be sold for wood. These two states are tokenized as asset properties as can be shown in the following example:

https://testardor.jelurida.com/nxt?requestType=getAssetProperties&asset=16023725080757465905&setter=15382970207090678772

{
    "setterRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
    "requestProcessingTime": 0,
    "asset": "16023725080757465905",
    "setter": "15382970207090678772",
    "properties": [
        {
            "property": "state",
            "value": "fruit"
        }
    ]
}


Tokenization of the fruit

Finally, the fruit that the tree provides has to be tokenized. In this case, as it is meant to be for sale, the most accurate token will be an item of the marketplace. So, once the fruit is collected, a "List Product for Sale" transaction will be performed.

1545366193981.png


Note that the description now is a simple JSON data in order to make it easy to parse three key-value pairs: the singleton asset id that represents the tree, the season, and measurement of the quantity of fruits: https://testardor.jelurida.com/nxt?requestType=getDGSGood&chain=2&goods=7387393172246760239

{
    "seller": "15382970207090678772",
    "quantity": 80,
    "goods": "7387393172246760239",
    "description": "{tree: 16023725080757465905, season: \"spring\", measurement: \"Kg\"}",
    "sellerRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
    "hasImage": false,
    "requestProcessingTime": 0,
    "delisted": false,
    "parsedTags": [
        "fruit",
        "apples"
    ],
    "tags": "fruit,apples",
    "priceNQT": "50000000000",
    "goodsFullHash": "2f0bea37f34a85668721973e010c502923991ef7c5355824b1e213955eb62f18",
    "name": "apples",
    "timestamp": 31069420
}


Now we have tokenized the GPS location, the tree, and the fruit to be sold produced by the mentioned tree.


Linking tokens

There is a relationship in the direction of fruit -> tree -> gps location. This makes it possible when you buy fruit to trace which tree produced it and where that particular tree was located, as shown in the following figure:

1545394320026.png


There remains a lack of traceability from what we consider the primary key of the tokenization process: the GPS location. In order to finalize the linking, we will use asset properties.

The singleton asset that represents the GPS location will have one or more asset properties of the asset ids representing one or more trees:

1545395898601.png


The asset properties can be extracted from the following API operations:

{
    "requestProcessingTime": 0,
    "asset": "12233955077041858977",
    "properties": [
        {
            "setterRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
            "property": "Trees",
            "setter": "15382970207090678772",
            "value": "16023725080757465905"
        }
    ]
}
{
    "requestProcessingTime": 0,
    "asset": "16023725080757465905",
    "properties": [
        {
            "setterRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
            "property": "state",
            "setter": "15382970207090678772",
            "value": "fruit"
        },
        {
            "setterRS": "ARDOR-X8ZN-WUJ2-SXY3-FBUYC",
            "property": "Fruit",
            "setter": "15382970207090678772",
            "value": "7387393172246760239"
        }
    ]
}


After this step, your tokenization is completed as the following figure:

1545405662727.png


End of the life of the tree

When the tree's life comes to an end, the asset property "state" is changed from "fruit" to "wood" as shown in the following figure:

1545407091048.png


Now, the live tree itself can be sold as a singleton asset using the asset exchange:

1545407399107.png


Furthermore, a new tree can be planted and linked to the GPS location as a singleton asset.


Conclusions

  • Tokenizing your farm makes it possible to transparently trace fruit supply chains with little room for cheating
  • Ownership of the GPS location, trees, and fruit produced can be traced on an immutable ledger thanks to Ardor's blockchain technology
  • The different states from the tokens, ie: the tree producing fruit and the tree as wood at the end of its lifecycle, can be managed as asset properties
  • Automation using lightweight contracts can significantly expand the usability of these assets. For instance, listing the price of the fruit according to the current market place from an external source and switching between the different states can occur automatically.