Javascript is Eating the Blockchain

Javascript is showing up more and more in the cryptocurrency world.

3 minute read

There’s a famous saying in the software development world called Atwood’s Law:

“Any application that can be written in JavaScript, will eventually be written in JavaScript.“.

Jeff Atwood said it back in 2007, and it’s even more true today. Node.js, which is server-side Javascript, has been the “hot new thing” ever since it was released in 2009, and these days when a developer needs to build a cross-platform desktop application they’ll reach for Electron, which uses Javascript as its programming language. And of course, every website you visit will surely use it as well.

Cryptocurrencies were immune from this trend for a long time, because they rely on cryptographic functions that have been historically written in other languages. Bitcoin’s core has no Javascript, nor do most of its descendants. Ethereum is mostly Go, NEM is Java, and even Haskell makes an appearance with Cardano.

But Javascript has started to slowly chip away at that wall.

Javascript Cryptocurrencies

Lisk was started in 2016 and was the first Javascript-based cryptocurrency to make it into the top 20 coins by market cap (now at over $3 billion). It’s an ambitious project. It’s creating a way for Javascript developers to easily create blockchain based applications that will run on “side chains”, blockchains tied to, but separate from, the main Lisk blockchain.

Lisk is almost entirely Javascript

The developers of Lisk chose Javascript because they felt that blockchain technology wasn’t being adopted into the larger software development world fast enough, and that by building a blockchain in Javascript they’d be able to tap into a huge pool of Javascript developers. According to Github, Javascript is, by far, the most used development language.

Ark is another new cryptocurrency using Javascript, with the aim of creating “Smart Bridges” between existing blockchains. By tying together existing blockchains, Ark may end up placing Javascript at the center of a web of blockchains. Ark has a market cap over $800 million.

Nimiq takes the idea of a Javascript-based cryptocurrency even further, by making it browser-based. When you connect to a website running Nimiq, you’re actually connecting directly to the Nimiq network using Websockets and WebRTC. You can even mine Nimiq in your browser. Nimiq’s approach makes it possible for a website user to send and receive transactions directly from a website, instead of having to go through an intermediary backend or install a plugin.

Javascript Wallets

Many older cryptocurrencies use QT as their desktop wallet platform, but more and more cryptocurrencies are turning to Electron. Since Electron uses Javascript along with HTML and CSS, they’re able to create more modern-looking wallets that users have come to expect, and to easily compile the wallet to work on Windows, Mac, or Linux. Most mutli-currency wallets, like Exodus, have also gone this route.

Lisk is almost entirely Javascript Bitcoin Core Wallet vs Exodus.
Which would you choose?

Javascript Access

Older cryptocurrencies almost always offer some way for Javascript to interact with the core process. There’s over 1,000 packages related to “bitcoin” on NPM, the Node.js package manager, and nearly 800 for Ethereum. Most of these packages communicate via JSON-RPC, a process that uses Javascript Object Notation (JSON) as its data interchange format.

Will Javascript keep gaining a larger and larger share of the cryptocurrency world? It’s unlikely that any new cryptocurrency won’t make use of it somehow. If not as the primary language, then at least as an access point or in its wallet. And as the software world has seen, once Javascript developers get involved, they tend to proliferate quickly.

And always remember Atwood’s Law.