Nym now supports smart contracts

Most people probably think mostly of our mixnet when they think of Nym. This makes sense, as it’s the first thing we’ve released. However…

Author: Nym
4 mins read
0j8agCrflWw15BziE

Most people probably think mostly of our mixnet when they think of Nym. This makes sense, as it’s the first thing we’ve released. However, we’ve always had a wider set of ambitions!

And we are pleased to announce that our blockchain can now be used by anyone who wants to make general-purpose Web Assembly smart contracts, either standalone or as a sidechain.

We would like to take this opportunity to explain our thinking. As some might already be aware, in addition to the mixnet, we also have a signing scheme called Coconut, which allows privacy-enhanced access to resources. To give an idea of the kinds of applications that Coconut enables, we recently used it in a demonstration project for the European Commission. We built them a private Covid passport, which allows people to prove they have been vaccinated while not giving up personal information when they present it.

We think that Coconut can be just as big a deal as the mixnet (maybe bigger). Currently, the pairing-based cryptography used by anonymous credentials are not supported by the existing sidechains of Bitcoin, like Liquid, and are astoundingly expensive in terms of gas on Ethereum. So the question arises: how can we let coders easily use Coconut to build privacy enhanced applications?

The answer to that question is pretty simple: we are going to allow anyone to write smart contracts and use Coconut, from within our Cosmos-based blockchain.

To distinguish our blockchain from the mixnet, and make things easier to talk about: the mixnet is “Nym”, and the smart contract platform is “Nyx” — the Greek deity of night.

For the past year or so, we have been working towards this plan, but we’ve kept it private while we made sure it would work.

But now we’re ready…

Introducing the Nyx blockchain

The Nyx blockchain is based on CosmWasm. It allows users to code smart contracts in a safe subset of the Rust programming language, easily export them to WebAssembly, and upload them into the chain.

This works right now. We have already been using CosmWasm for 10 months, to test it out, before making this announcement.

A CosmWasm smart contract has been keeping track of the many thousands of mixnodes, gateways, stake delegators, and other actors which have made up the last three Nym testnets. Very few smart contract systems would have the scalability or sophistication to deal with a system of Nym’s size and complexity.

We are extremely happy with our choice of CosmWasm and we’re satisfied that we’ve given it a very thorough trial run. Now we’re making it available for others to use.

Benefits of CosmWasm smart contracts include:

* low gas costs

* full finality in ~5 seconds (no need to wait for multiple block confirmations)

* an integrated storage engine

* a great developer experience

We have not yet released Coconut extensions for CosmWasm, but we have released the code and plan to have it working soon. Once that’s deployed, we can enable DeFI (and other applications) with strong privacy built in. Privacy is a prerequisite for financial applications in the non-blockchain world. We think it’s a winner for smart contracts too.

Having said that, there’s no reason not to use Nyx now, and Coconut already exists as a Rust library you can use. Nyx, and the Nym project more generally, is backed up by a very strong group of stakers and validators — institutional ones (like a16z-backed Figment, Polychain, KR1, Edenblock and Swisscom), validators that have been with us for several testnets (like Nodes Guru) as well as community ones (like Commodum). It’s a safe (and fun!) choice for your next blockchain application build.

We will be making upgrades to our documentation over the next little while, to demonstrate how to upload smart contracts to Nyx. In the meantime, check out the CosmWasm docs to get a feel for how easy it can be to write smart contracts using the framework.

Immense thanks to the CosmWasm devs from Tgrade. They have built what we think is the simplest to use and most functional smart contracts system, and we are very happy to be among the first to deploy it.

A great developer experience, fast finality, high throughput, and Coconut for privacy (which may be the missing piece of the puzzle for widespread blockchain / DeFI adoption).

Contract uploads are open. You’re invited!

More details soon.

Share
VPN-screen.svg

INTRODUCING NYMVPN

Advanced privacy built for the age of AI

Artboard 1.svg