NEM: decentralisation in moderation

David Gilbertson
12 min readJul 29, 2018

Welcome to week 18 of my adventures in crypto.

This week I checked out NEM, went on for quite a while about unrealistic use cases for crypto, and have prepared a memory lesson.

But first …

The profit check-in

Should I take my $154 and run?

Nah.

nem nem nem

NEM: for businesses and developers

NEM is a bit like Dash, in that they’re heavily focused on how people will actually interact with their system, and seem to be pretty realistic about the whole thing.

If I could broadly generalise, I’d say that where Dash wants to beat Bitcoin, NEM wants to beat Ethereum — by focusing on what business users want.

The most obvious difference be Ethereum and NEM is that NEM offers up two flavours of their blockchain: public and private.

Confusingly, the private blockchain gets a name (Mijin), but the public one doesn’t. Or the public one is called NEM and the private one Mijin. But Mijin is being replaced by Catapult. You should keep in mind that Catapult will also be released into, or onto, or under, the public blockchain, or the public blockchain will be ‘updated’ to Catapult, but maybe will just still be called NEM?

Honestly I gave up on trying to work out how the naming worked, because I had some code to write…

NEM has decided that your application logic doesn’t belong on the blockchain as a ‘smart contract’.

They think it should be separate, and the chain should only be used for storing data.

So, if you are one of those folks who will only accept systems that are completely decentralised, then you should steer clear of anything built on NEM. You should also avoid anything with a website. And don’t go near anything with a domain name.

So, no CryptoKitties for you.

I like this idea, and will call it decentralisation in moderation (that should totally be their slogan, or at least the title of this post).

Here’s a thing I made with a green gradient background for no reason.

Check out those question marks.

I know next to nothing about escrow, but I can imagine it’s a good example of logic that should be decentralised, so that it can be audited and confirmed by any party.

CryptoKitties, on the other hand, couldn’t have been 100% on a blockchain without sacrificing some fun. (The comments on that post are pretty great: “if it’s not decentralised, what stops you from just printing kitties?”)

Now, thinking forward to a world where we have all our social network messages stored on the blockchain, I think there’s no problem whatsoever which a bunch of centralised, corporate, greedy entities fighting it out over who can create the best user interface, and keeping that code private.

So long as the data stays decentralised, I can’t think of any reason why I would choose a Twitter variant that executed their application code on chain over one that didn’t. With decentralised data in a common format, I no longer care if they go out of business or get shut down, I’ll just use a different interface.

So let’s say you’re going to write an app where you execute your own code on your own servers, but keep all user data on an open blockchain. What’s the best architecture for such an app?

The NEM blockchain in this case is just a database, so the ideal way to connect to it is the exact same way you currently connect to databases in a normal application.

If your database is MySQL and your language of choice is Java, then you would get a MySQL/Java driver and away you go. If your database is Oracle and your language of choice is PHP then a) my condolences and b) you’d get an Oracle/PHP driver.

And if your database is the NEM blockchain and your programming language of choice is JavaScript, then you get the nem-sdk from npm.

All other aspects of your architecture stay largely the same.

This all sounds pretty easy, so I thought I’d give it a crack. It took about 17 minutes to find and follow the instructions and make my first connection to a blockchain from JavaScript.

That’s literally all of it.

Making transactions is similarly easy, as is creating ‘namespaces’ and even your own assets (inexplicably called ‘mosaics’).

There’s a good 4-part video tutorial series here. But if you already know npm/JavaScript just go read the readme of the npm package.

This is all sorts of great. Suddenly building an app on the blockchain doesn’t require learning a new language and new paradigms.

Neato.

NEM also addresses what I imagine is a common concern of businesses: “I don’t want my data to be public”.

Story time: in a previous role, I was building out the architecture for a suite of web apps. I had it all planned out and a sexy proof-of-conecpt built with all the moving parts.

Then I was told by the CTO: “we need blockchain”. (Guess who skimmed a blockchain article on the weekend.)

And I said “no we don’t”.

And I was told “yes we do”.

You can probably guess my response (it was “no we don’t”).

Because ‘insolence’ is apparently frowned upon, I eventually went about integrating a blockchain. I was to take what would have been a single table in a database, and put it in a blockchain, for absolutely no other reason than putting ‘Blockchain’ in our marketing material.

Of course, anyone reading the marketing material that doesn’t know about blockchain wouldn’t care, and anyone who does know about blockchain would ask “why on earth would you do that? Aren’t you the only entity connecting to the data?”

The point to this story is that I think in many cases, a ‘private blockchain’ is just dumb, and born out of over exuberance.

But, there are lots of people who know more than me who appear to think private blockchains have their uses. So I’ll just leave you with a link to the NEM enterprise use cases and you can read for yourself without my negative voice in your ear.

Although I fully expect you to wince when you read “records are instantly updated on the blockchain with no need for human paperwork” and “whenever a customer places an order new parts are automatically ordered to begin replacing that inventory”.

Um, wow, the future has arrived. On a horse.

So, what sort of stuff belongs on a public blockchain?

It’s going to be interesting, as the hysteria wears off, to see what sort of things wind up on blockchains.

I think one candidate might be things that can be digital, can be read by anyone, written by a few, and must come with some sort of guarantee that they haven’t been fiddled with.

Like birth certificates.

I took out a loan recently and needed to drive, in a car, and park, in a parking spot, to get my physical body into a physical building to get a copy of a birth certificate, on paper, to take to the bank, to prove that someone with my name was born.

That’s ludicrous, and should obviously be digital.

Now, birth certificates could be in a traditional database, with a public, read-only interface for all the world to see. And in developed countries that’s probably enough. But why not have a public blockchain, perhaps even a global one that will remain unscathed through thick and thin, war and peace, democracies and dictatorships.

Great, let’s chuck all the birth certificates on the chain.

Of course it’s not that simple. Who do you allow to write to the blockchain? Who is it that does the allowing? Who can mark someone as dead? Or undead, in the event of a zombie apocalypse.

Hmmm.

Then there’s the cases where the asset is physical, but a blockchain contains a reference to it. Maybe a good candidate is a physical asset that changes hands several times, and moves around the globe, and the involved parties don’t trust each other.

So, you could have a box of nice things, whack some tilt and shock sensors on the side and have that scanned at various points along its journey from the depths of Africa to the Singaporean shore. With the results of its check-ins written to the blockchain. Everyone can see where the package is, and what shape it’s in.

But you’d only bother doing this if you didn’t have trust between the parties; if no one was in charge. And in that case, what does your consensus mechanism look like?

Hmmmm.

I think Coin Center says it well in this article where they outlay the very specific set of circumstances where a private blockchain makes more sense than a database. They finish up with: “if your project does not fulfil every single one of these conditions, you should not be using a blockchain”.

And that’s from Coin Center — word on the street is that they’re pretty pro-blockchain.

Despite my personal scepticism that I can’t seem to get over, 300 organisations have taken NEM up on their offer of an in-house blockchain, and I wish them all the very best.

Verdict

This is a tough one.

Looking at the technology, all is good and well. If I was asked tomorrow — in my capacity as someone that writes code and puts things in databases — which blockchain I recommend, I’d say NEM without missing a beat.

Furthermore, if you’re writing an app in Ethereum I’d suggest that you have a think about whether you need your logic to be decentralised. And if the answer is “no, and thanks for bringing that to my attention”, then I reckon you should take a look at NEM.

However, looking at NEM as an investment, things are less rosy. They’ve been slowly slipping further and further out of the top 10, and are now down at #16. (That said, I count 6 coins above them by rank that I think will crash and burn.)

Then there’s the matter of custodianship…

There’s no support in Jaxx.

There’s no support in the Ledger hardware wallet. It’s not even one of the dozens of coins on the Ledger roadmap.

So I can either install yet another wallet (their Nano Wallet) or buy some and keep it on the OKEx exchange.

But the NEM Nano Wallet has no BIP39 support. Which means I can’t back up my wallet by writing down 12 words, to be able to restore it in the event that my house burns down (with me not in it — otherwise I’ve got bigger problems).

And what are the odds of OKEx getting hacked in the next year or two? Judging by the weird, illogical, flaky security I’ve witnessed so far, I’d say “pretty good”.

So, no NEM for me — but only because I’m being being a big wimp worried about losing my keys. As soon as NEM shows up in the Jaxx wallet I’ll get some.

Now I will google “flip a coin” to pick between Ethereum and Bitcoin.

It was tails.

So this week’s $500 will be converted to eeth and stuck in my Jaxx wallet.

Now, for something completely different…

Tutorial: creating a memory wallet

I look forward to the day, years from now, when I know enough about this whole crypto-world that I can impart my knowledge on the young minds of the future.

But even though I know less about crypto than the average rabbit, I do have some knowledge to share that I think might be useful, and that is my knowledge of memory.

I reckon memory is like drawing butterflies and maths: people say “oh I’m no good at that” without ever having tried. (I’m yet to meet someone with a ‘terrible memory’ who practices remembering for 15 minutes a day.)

As you may or may not know, you can ‘back up’ your private keys into the form of 12 words. You can go anywhere in the world with those 12 words, buy a new phone, download an app, type them in and you’ll have access to all your funds.

It’s amazing and terrifying.

So here’s a question: would you trust your own memory as a storage location for those 12 words?

I think most people would say no, yet most of them would be quite capable of this feat.

And so, I have a challenge for people that meet the following two criteria:

  1. You don’t think you have a good memory
  2. You can commit 2 minutes of your time, twice a day, until we meet again next week

That’s really not much time, is it? 2 minutes? That’s probably less than your allotted bodily function activities.

Here’s how it’s going to go. You’re going to get yourself 12 words. Maybe you’ve already been given 12 words as a representation of a private key, or maybe you want to go to https://iancoleman.io/bip39 and get 12 words just for practice (don’t worry, your memory won’t fill up).

I’ve just done that and here they are:

impact galaxy wide naive able stage strategy stomach bamboo axis ancient armed

It’s important to know that there is skill involved in storing things in your brain for the long term, and that it is not particularly easy. So don’t expect it to come naturally. And when it doesn’t come naturally, don’t take that as confirmation that you’ve got a terrible memory.

One by one I’m going to tie each word to the next in a vivid scene. The vivider the better. And the more fluidly these scenes flow together the better.

But I need a starting word that will lead me into the first scene, and since these 12 words are for my Jaxx wallet, my ‘seed’ word is going to be Jaxx.

Here we go …

In Australia there is place that puts tyres on cars called Jax Tyres. It is so boring waiting for tyres to be put on a car that I would want to go up to the roof and jump off. The thing that comes next is, obviously the impact! I managed to survive, I’m relieved, I roll over only to see that the whole galaxy is falling off the roof behind me, and it’s so wide that it blocks out the sun. ‘Naive’ is a tricky word to remember because it’s more abstract, but I know that it’s Evian spelt backwards, so I’m going to be so relieved that the galaxy missed me by a whisker that I’ll take a sip of Evian, but I was naive, because the galaxy hit me, broke both my legs and now I’m dis-abled (it’s your memory, you don’t have to be politically correct — half the stuff I remember by mnemonic is super messed up). How will I continue my career as a singer if I can’t get on the stage. I’ll need a strategy that involves hopping out of my wheelchair and wriggling on my stomach onto the stage. I’ll grab on to the bamboo that’s growing there for no reason which all of a sudden I’m pole dancing on, with the bamboo as my axis. I’m dancing like an ancient Egyptian now and people are laughing at me but I’m heavily armed with machine guns (for arms) and I gun them all down, laughing all the while.

You get the idea. If these were real words I had to remember, I would spend extra time on the Naive/Evian thing to really drill it in. And also I wouldn’t want to remember ‘Egyptian’ instead of ‘ancient’ by mistake at the end there. But I’ve noted that the last three words start with a, so that shouldn’t be a problem.

Step two is repetition. Once you’ve created your scenes, run through them a few times immediately, note any steps you’ve forgotten already, and strengthen up those associations. Mix in as many senses as you can, be a part of the scene.

Then repeat every morning and evening and — provided that you actually take the time to really picture it all — I’ll bet that you’ve got it stored after a few days.

No matter how much you doubt your own memory, I think by the end of the week you’ll see that your brain is quite capable of storage of arbitrary information.

You’ll also start to realise that 12 words is child’s play. 24 is a walk in the park. Doing it for five different wallets is a piece of cake. Your brain is amazing.

After a week you will have either lost interest or start wondering if you could store this in your brain for life. The answer is yes (probably). Start by setting a recurring calendar event for every two days to check that the 12 words are still there in your brain. Give it a while then change it to every 3 days, then to a week, and so on.

Fun fact: memorising heaps of shit is the best way to trick people into thinking you’re smart.

That’s everything. Oh wait I haven’t done …

Next week

I reckon Ripple, finally.

I have a feeling I’m supposed to hate Ripple, but that doesn’t mean they’ll be a bad investment. We will see.

Now that’s everything. Thanks for reading, thanks for being. You’re all great.

--

--