IOTA is not for IoT

Valerio Vaccaro
4 min readDec 11, 2017

--

Introduction

I’m interested in IoT from several years and now I work on some solutions using Bitcoin and blockchain plus I always try new things and when I saw the IOTA website I start to learn more about this crypto.

Can IOTA really work in IoT world? I don’t think IOTA can be a good platform for IoT communications due to the following reasons:

  • the coordinator is a bright example of centralization and centralization is usually a bad idea on IoT,
  • there are no fees but instead of that you need to mine two transactions on your node in order to attach your transaction to the tangle and mining on embedded devices is a bad idea due to low speed and power consumption,
  • there are no rewards for maintaining a large set information (e.g. 2KB per transaction*144 transaction/day*1000 nodes = 281.25 MB day just for a single simple deployment with 1000 nodes) and I can not imagine how you can fit an IOTA node inside an embedded device,
  • I’m not sure about the solutions used in the platform, create a new hashing function was a bad idea, how many “hidden problems” are present in IOTA?

I decided to check the performance of IOTA in a real IoT case (or I try to do it) using libraries and information actually available.

Who mines in IOTA?

When you want to attach a transaction in IOTA you need to mine other two transactions or you can say that your device has to spend energy for control other two transactions before sending a valid transaction on the net.

How expensive is the mining on an embedded device?

IOTA want to solve this problem with a specialized hardware (check on https://blog.iota.org/the-transparency-compendium-26aa5bb8e260) in order to increase the centralization of the platform.

On the other hand, the function attachToTangle command needs a working node so this means you need a node (or a proxy) in order to write a transaction on the tangle.

You don’t need IOTA to spam IOTA

IOTA has two types of transactions:

  • financial transactions when you move IOTA coin from one address to another one,
  • non-financial transactions if you want just write something in the signature field (around 2KB available),

Do you really need IOTA coins in order to write on IOTA tangle? The answer is NO, you can write without balance but coordinator will never confirm your transactions.

Install a proxy

If you don’t want to install an IOTA node on computer you can use a proxy like the one available on https://github.com/TimSamshuijzen/iotaproxy

Remember you need a node (or this proxy) in order to run an attachToTangle command.

Write a spam transaction

Now it’s time to send our useless spammy transaction, you can use the the IOTA libraries in javascript in this way.

Import libraries and create your seed (from seed the lib calculate your secret key and your address).

var IOTA = require(‘iota.lib.js’);

seed=’YOURSEEDGOESTHERE’;

Connect to your running proxy.

var iota = new IOTA({
‘host’: ‘http://localhost',
‘port’: 14265
});

Create the transaction structure with 0 value, a chosen address and some payload (IOTA allows you to convert a structure in a usable payload or you can write your string with capital letters).

var transfer = [{
‘address’: ‘JGPPQ9VRYGEJBVQS9HZHCVTXVJKPKBMMRFP9HRTTQUKRJRCRLITGSRRYSGEOZYTUEVWMMJKIIYTTJADNAQMDTVZWGX’,
‘value’: 0,
‘message’: ‘IOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAM’
}]

Broadcast the transaction using the send transfer function.

// We send the transfer from this seed, with depth 4 and minWeightMagnitude 18
iota.api.sendTransfer(seed, 4, 18, transfer, function(e, bundle) {
if (e) { console.log(e); throw e; }
console.log(“Successfully sent your transfer: “, bundle);
})

After all these steps your proxy will start to communicate with an IOTA node and mines other 2 transactions before broadcast the new one.

Performances

On my Mac the mining requires many minutes with GPU working at full power (means high power consumption, fan always on, …).

time node scam.js

Successfully sent your transfer: [ { hash: ‘TUKDJUMHCXDEJOF9YTSWFVXWXPVYWUFPXLIZQRGLOWSFJFFDXMHFYQYWBWKPZMQCJGVIEWYIKAY999999’,
signatureMessageFragment: ‘IOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAMIOTAISASCAM999999999’,
address: ‘JGPPQ9VRYGEJBVQS9HZHCVTXVJKPKBMMRFP9HRTTQUKRJRCRLITGSRRYSGEOZYTUEVWMMJKIIYTTJADNA’,
value: 0,
obsoleteTag: ‘DA9999999999999999999999999’,
timestamp: 1513003518,
currentIndex: 0,
lastIndex: 0,
bundle: ‘UJJYNTJITB9INCFOKYUCQVJWOFFW9DSETKCC9JUDZQQSAWBFTGCTEUHXNWPWCLVSTKVDGJYFWAQWIHGUX’,
trunkTransaction: ‘OUVRMULABCJABSDTCXORZP9JIUWTWFGKFOANNARUAGAYXKAGMFQVILTACHWPWJHUGGACBU9NMGOA99999’,
branchTransaction: ‘LQYRIBKM9JCQOTKIDNUXIPTHDVHCTJDDUTOHW9LIUXXZTGMWQEZBKREZTZJMCCSDCCNMKCUE9FDZ99999’,
tag: ‘DA9999999999999999999999999’,
attachmentTimestamp: 1513003523259,
attachmentTimestampLowerBound: 0,
attachmentTimestampUpperBound: 3812798742493,
nonce: ‘LA99999999CLCPD999999999999’ } ]

real 6m23.499s
user 0m0.346s
sys 0m0.066s

As you can see a lot of time was spent waiting for the answer from the proxy, impossible to use this communication channel in an embedded low-power scenario.

On Raspberry PI (a real powerful platform) was almost impossible to compile all the software (libccurl expecially) and the speed . Actually IOTA is too much slow and almost impossible to use on this board.

Here you can see all the transaction sent to the address JGPPQ9VRYGEJBVQS9HZHCVTXVJKPKBMMRFP9HRTTQUKRJRCRLITGSRRYSGEOZYTUEVWMMJKIIYTTJADNAQMDTVZWGX.

https://iotasear.ch/address/JGPPQ9VRYGEJBVQS9HZHCVTXVJKPKBMMRFP9HRTTQUKRJRCRLITGSRRYSGEOZYTUEVWMMJKIIYTTJADNAQMDTVZWGX

--

--

Valerio Vaccaro

Engineer, Bitcoiner, Data Scientist, IoT Expert and Tech Enthusiast. Co-founder of @scamcoinbot. Dad of @otsproofbot.