Skip to content
a protocol to create a grid where each point is owned by a NEM multisig account
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

written using node v8.12.0 Install: npm install Config: add necessary data in config.js Copy assets-example to assets, and remove all the .gitkeep files


Decentralised ownership of a grid's cells

Nemesis 2D is a proof of concept that intends to let people acknowledge NEM functionalities, and a way to create a Non-Fungible Token-like environment.

##What is NEMESIS 2D?

NEMESIS 2D is a grid divided into many cells.

People can take ownership of these cells and display an image and text in them, in a decentralized way.

##How does it work? Here is a walkthrough of how it is working. I use the official wallet to show the process, but the idea is to achieve all these steps programmatically.

  1. Grid creation. An arbitrary grid is defined. In this PoC, I chose a grid of 111 lines and 6 columns, with the following format: L001C2 (Line 1, Column 2).

2)Publisher creation. For each cell in the grid, one NEM account is created. Each account is bound to "own" one cell. I coined them the Publishers.

3)Key accounts creation. Three "key" accounts are created, I called them God, Registry, and Metadata.

4)Registry creation. For each cell in the grid, "God" sends a message to "Registry" that ties the grid cells to the accounts created on the point 2). I chose the following format:


We now have an immutable Publisher => Coordinate registry!

5)Publishers founding. Once "mapped", each Publisher can be prepared to be transferred. We will use NEM multisig features to do that. First, we need to provision each Publisher with XEM so they can bear the transactions fees required to achieve the next steps. I chose to transfer each of them 1.15XEM.

6)Publisher first conversion. Each Publisher is converted to a 1–1 multisig account owned by God. 1–1 stand for 1 signature among 1 cosigner needed to validate any transaction of the multisig account. God is now the owner of all of the accounts linked to cells. Note that once an account is converted to a multisig account, its private key becomes useless.

7)Publisher transfers to third-party users. We can now transfer accounts to users, by using the exact same mechanism. Step 6 could technically be skipped according to the use case and/or the property distribution system. Here I chose the option to create the whole environment, before initiating the transmission of the Publishers to third-party users. This operation is called an edition of a multisignature contract. It consists of removing God as a cosignatory and replacing it by a third party user. Note that in order to be assigned as a cosignatory, an account must have done at least one transaction!

8)God suicides. Once the ownership of all the accounts has been transferred from God, it is possible to convert God itself as a 1–1 multisig account owned by the Nemesis address. By doing that, God becomes provably unusable as nobody can take control over him. Then the Publisher => Coordinate registry becomes immutable!

  1. Publish data to a cell. The initial goal is to have the owner of a Publisher to be able to add things in the square. In this PoC, I chose to let users being the possibility to add an image and text that can contain hyperlinks. To update the content of a cell, the owner can send a multisig transaction with a message in a defined format. Here is the PoC format: T:;I:. Raw text of the example below: T:Hello Nemesis! Check the repo here! ;I:

  2. Rendering that to a webpage. Once I will be satisfied with the code, I will write a detailed article on the subject. Roughly, only 3 steps are needed:

  3. A> Initiate the grid by populating an array with all the coordinates

  4. B> Fetch all the incoming transactions of the Registry, and build the Publisher => Coordinate mapping

  5. C> Fetch all the incoming transactions of Metadata starting by the newest, only keeping the newest transaction of each Publisher.

  6. D> Check that the messages from the Publishers to Metadata are all compliant. Here I put limitations on the image size. Transform the raw text to HTML, and then render the grid! That's it! Contact me if you want to own a cell in Nemesis 2D!

You can’t perform that action at this time.