How to tokenize your farm using Ignis
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:
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:
{
"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.
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:
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:
The asset properties can be extracted from the following API operations:
- GPS Location: https://testardor.jelurida.com/nxt?requestType=getAssetProperties&asset=12233955077041858977
{
"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:
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:
Now, the live tree itself can be sold as a singleton asset using the asset exchange:
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.