A crash course in Nano

Nano is a decentralized, open source, peer-to-peer digital currency. You can learn more about the project at nano.org.

Introduction

The premise of cryptocurrencies is that you can use cryptography to prove that you know a password without sharing the password with other people. Cryptography originated as the art of sending messages without other people being able to read them. Now it, can also be used to digitally sign transactions, proving that you authorize the transaction without giving others the ability to forge your signature. With a sufficiently clever design, you can make an entire system for tracking people’s transactions on a distributed, public ledger, so that everyone agrees about the balances and no one can falsify the records about who has paid whom; this is a cryptocurrency. There are a variety of ways to design such a system, and Nano manages to do it in a way is fast, feeless, secure, and efficient.

When you make an account, you are using an algorithm to randomly generate two large numbers:

  • A public number. This is called your address or public key, and is what people can identify you by, like a username, email address, or phone number.
  • A private number. This is called your private key, which is used to sign transactions.

These numbers are related in a special way, so that you can sign a transaction in a way that demonstrates you know the key, and is unique to the data of the transaction. You can't add an extra zero to someone's “send money” transaction without invalidating the signature. Each transaction also includes a little bit of extra data from the previous state of the system, so you can't just repeat the same transaction (send me money again!) without knowing the key. So, when a user wants to do something with their currency, they broadcast a signed transaction out to the network for it to be processed.

The second half of a cryptocurrency is the network, which is a bunch of devices (“nodes”) all running the same protocol. The protocol is a predefined, agreed-upon way of generating, receiving, responding to, and sharing messages with other devices running the protocol. This tends to be the complicated part, because you have to design it in a way that makes it efficient at allowing valid transactions and also robust against all the ways a malicious person might try to sabotage it. Nodes store the public ledger (a database documenting all transaction ever made) and relay valid transactions to other nodes to reach consensus on what the current state of things is. Anyone can run a node and support the network if they have the computer and network resources to do it.

Using Nano

First, remember: your private key is how you control your money. Don't share your private key with anyone unless you want them to be able control the money in an account.

A user usually runs software called a wallet which can talk to nodes, generate protocol-compliant transactions, send them out to the network, and receive updates from nodes about your account. The wallet needs your key to be able to sign transactions on your behalf, so you want to make sure you are using a trustworthy wallet. You can find a list of Nano wallets here. Wallets typically store your key in an encrypted form that requires a password to access. Even better, you can get a piece of hardware that stores the key and requires physical interaction to sign a transaction. This is useful because your currency will be safe even if your device is compromised. Since it is less convenient to use, people often store large amounts that they don't intend to use often on so-called “cold wallets,” and store smaller amounts that are convenient to access on a “hot wallet” such as a phone or computer. If you are just getting started with cryptocurrencies, you are probably fine using a hot wallet, but keep in mind that this is inherently riskier if your device gets hacked. Bear in mind that wallets are not your account. Any wallet software can use your key to sign transactions, so if you discover that a wallet has a bug or you just want to use a different wallet software for any reason, all you ultimately need are your keys.

Note: since your account is made of two parts (your public address and private key) this information is usually stored together in a longer string called a seed, from which both numbers can be derived. This is what wallets typically use to ”import” an account. You should treat it just like a private key. Don't lose it, don't share it.

Okay, so this is how you manage your money, but how do you get it? Ideally, you would earn it for goods and services just like any currency. (For instance, selling items on this site!) There are payment solutions for Nano that you can integrate into a website (Brainblocks) or a physical point of sale (Appia, Kappture). There are also other things, like faucets which provide small amounts for free to demonstrate the protocol, and a host of other quirky services that let your earn Nano.

However, at the moment you most commonly buy the currency from an exchange, where people buy and sell currencies in exchange for other currencies. A common term you will encounter is “fiat currency” which refers to “normal” money like dollars or euros, so called because their value is to some extent based on the clout of the government that manages it. To use an exchange, you create and account, fund it (e.g. with your fiat, or another cryptocurrency) and then exchange for the currency you want. Once the exchange is done, your account is credited with some equivalent balance of the other currency. This money is still controlled by the exchange; you don't control it, they just have your name on it. Unless you plan on exchanging it again soon, you next want to withdraw your currency from the exchange. This means having them send it to your own address, thus letting you spend it wherever you want.

Since using an exchange involves handling “real” money, you need to trust them and they need to trust you. First, you should choose an exchange that operates in your region and accepts the currency you have. You can find exchanges that handle Nano listed on nano.org, for instance Kraken or Binance. Second, making an account that can deposit fiat currency usually involves providing some sort of documentation about yourself, such as a photo ID, address, and a picture proving that you agree to making this account. This is done in order to prevent identity theft, to keep shady people from laundering money through the exchange, and in general to be compliant with local laws. If you are not comfortable with this, you will have to earn the currency in conventional ways. The website will guide you through the process of verifying your identity, depositing money, and trading currencies. Just make sure you withdraw it when you are done! There are a few instances in the past where insecure or poorly managed exchanges have been compromised; people who had their various currencies on the exchange instead of under their own control lost it.

How Nano Works

The first cryptocurrency ever conceived is Bitcoin. In Bitcoin, the ledger is made up of a series of “blocks.” Each of these blocks contains a bunch of transaction data from various people (e.g. an address, how much money they are sending, and to whom they are sending it). Each block is related to the previous block, so that you can't alter the information once it is part of the chain. The network progresses by generating a “proof of work” for each new block that is difficult (and random) to compute. A new block is added when someone solves the problem. The network protocol agrees to use the longest chain as the true state of the ledger. Once your transaction is in the chain and has several more blocks on top of it, you can be reasonably certain that your transaction is irreversible. The original reasoning behind the proof of work model is to demonstrate investment in the network. Unfortunately, the protocol puts a limit on how many transactions can be processed at a given time, and you pay a fee to a node so that they will include your transaction in the next block. This makes Bitcoin (and similar currencies) “synchronous,” in that the entire network advances in little chunks of data (blocks).

Nano basically works by each account having its own block chain. Your account state is defined by a sequence of small blocks that contain previous transactions you've made. When money gets sent from A to B, account A generates a “send” block. Account B, at some later time, generates a “receive” block that references A's send block. As soon as you broadcast a send block you no longer have access to the money. You are immediately free to add more transactions to your account chain, as your account balance already reflects the transaction. Account B must make a separate receive block, and they can do this at any time (and in any order with respect to other transactions), but they must broadcast the receive block to have access to the money. In this way, Nano is asynchronous, and the interlinked block chains of each account form what is called a “Directed Acyclic Graph” (DAG). In fact there is no timestamp associated with transactions on the ledger, though there are third parties who keep track of this. There are also no fees associated with making transactions, which is great! However, to prevent people spamming many small, frivolous transactions, there is a small proof of work that the wallet must generate along with the transaction. If the transaction does not have this proof of work attached, it will be ignored by the node. In this way “normal” people can send routine transactions without inconvenience, but an attacker who wanted to overload the network with spam would need to invest in large amounts of computing resources.

When you sign a transaction and broadcast it, the merchant can immediately look at it and verify that you have the money and that you have sent it to them. However, you still have to make sure that the network agrees that this transaction has happened (confirmation). A double spend attack is one in which you make a legitimate transaction, get your goods or services, and then for some reason the network rolls back the transaction, e.g. because you made another valid transaction elsewhere that supersedes this one. The confirmation time is how long it takes the network to unequivocally state that the transaction has occurred. The confirmations per second (CPS), also called the transactions per second (tx/s) or blocks per second, is a measure of how many confirmed transactions the network is making per unit time. Of great import to its practical use as a currency is the protocol's maximum CPS when lots of people want to make transactions. If everyone around the world is buying things with Nano, it needs to be able to handle the load and provide confirmation in a reasonable time. This, and the lack of fees, is where Nano shines. Bitcoin is awful at this, limited to something like 10 tx/s (only ten transactions per second!) and when the network is busy, you pay more fees to get your transaction prioritized. Other currencies have made substantial improvements over bitcoin, but Nano is really one of the best when it comes to being used as an actual currency. The asynchronous nature of the protocol means (a) people don't have to wait on anything to make new transactions, and (b) there is no fundamental limit to how fast it can operate, only hardware limitations. In principle, if you get a big enough computer with enough bandwidth, you can process an unlimited number of transactions per second.

One more big area of discussion around Nano is the consensus algorithm. How can you be confident that the ledger is accurate and you have the balance you think you have? How are there no fees? Nano uses “open representative voting” (ORV) which was previously called “delegated proof of stake” (DPoS). The idea in proof of stake is that that everyone in the network votes on the correct “reality” of the ledger, and your vote is weighted according to how much of the currency you own. The premise is that those with the most of the currency are also the most invested in seeing it function properly. Imagine if suddenly Nano was discovered to be compromised by a majority of stakeholders (a “51% attack”) publishing inaccurate information. Suddenly the currency would be worthless (since you can't trust it) and the people who had the stake end up losing an enormous amount of buying power with their worthless coin. Delegated proof of stake follows the same premise, except that instead of every account voting on every transaction, accounts instead delegate a representative node to vote on their behalf. This is more efficient, but it means you have to trust the node you delegate your voting power to. An important aspect of maintaining a healthy network is keeping the votes reasonably distributed among many different, trustworthy entities. When you first open an account your representative is automatically assigned. Most wallets have an option to change your representative. When you have the opportunity, we recommend changing your representative to someone else (such as Upstart’s node!).

So you sent a transaction, how is it confirmed? Basically, your wallet sends the transaction to node(s) on the network, and those nodes broadcast the transactions to other nodes, until everyone knows about it. Each time it is rebroadcast, nodes attach their own little signature so that the next nodes can see who has voted in favor of it existing. If a node encounters a conflict (e.g. you spent your money in two places) it always (re)delegates its vote to the thing with the most votes. Thus, in about the time it takes for messages to be sent around the world, the network will reach a consensus and your transaction will be confirmed. This is usually on the order of second(s), which makes it comparable to buying something with a credit card!

Some final notes: since there is no proof of work or “mining” driving the core consensus algorithm, the Nano protocol is quite energy efficient (while Bitcoin uses tens of terawatt-hours of electricity!). Nano also has been fully distributed, which means all the currency that can exists is already in circulation amongst users.

There is always more to discuss about the technology, such as other attack vectors, dynamic proof of work, ledger pruning, cemented blocks, etc. but this page should hopefully leave you prepared to jump into these topics if you are interested.