How Vertcoin works (for normal folk)

Cryptography is the study of encryption, the means whereby one person (Bob) can send a message to another person (Alice) without a third party beind able to intercept and understand or tamper with the message.

Vertcoin is a Virtual currency that uses "encryption algorithms" as a basis for their technology.

This differs from Real currencies (known as Fiat Money) which have physical "proof" of their existence. This article will attempt to explain very simply how a vertcoin is as valid as an ounce of Gold for instance.

The two types of Cryptography

There are various forms of Cryptography, but the one that is relevant to our needs is "Asymmetric Cryptography" - quite a mouthful, but not that hard to explain.

All cryptography starts with an Input (your message to Alice), and a "Cipher". The cipher is the means whereby your input is "encrypted" so that third parties cannot see the contents, this is also referred to as the "key" for obvious reasons. Now Alice needs some way to "decrypt" the message to read it or its pointless. "Symmetric Cryptography" would mean that you give Alice the same Key that you used to encrypt the message, and she can decrypt it.

For example, if you changed every letter from an A to an E, and E's to As (admitted the worst cipher ever, but just for explanation purposes) - then you tell Alice that to get the original message back that Alice has to just swap the As and Es around. Generally, this is the simplest form of cryptography.

However, what if you didn't trust Alice with your key? How could you send Alice a message that she could read, without you giving your secrets away?

This is where "Assymetric Cryptography" is useful. Instead of just having one key you all share like one big happy family, you both start off with 2 keys each. Each of you has a "Private Key" and a "Public Key". Your private key you keep for yourself, and your public key you give to whoever needs to send you a message.

So in our example, Alice would give us her Public Key, and we would give Alice our public key. Then, to send Alice a message, we would encrypt our message with her Public Key.

Only she then would be able to decrypt the message, as the public key cannot decrypt the message. So, like "symmetric" means both sides the same (the same key to encrypt and decrypt) "assymetric" means both sides not the same.

Now why are we talking about this?

Signatures

"Asymmetric Cryptography" allows people to place a sort of digital signature of proof against a message. This means that anyone can see this message and verify that it has come from the one who signed it. The digital signature is unbreakable, and cannot be faked - the only way to do so would be to steal the Private Key off the original sender.

Also, the digital signature of proof is known as a "hash" - Which in simple terms, is a way of making sure that the message hasn't been altered. The "hash" is only valid for the exact message sent, and if the message were modified, it would not longer be valid.

Extending the idea

So, we have a system where we can prove exactly what was said, and who said it. From this, you can imagine a basis for a value / ownership system.

Say we have One credit, I can digitally sign a message that says "I give my one credit to Alice", and then send that message to Alice. Alice can then show everyone this message as proof, and due to the signature, there is no way for Alice to lie.

Alice can then pass on this credit to someone else in the same way and so on. And the new person will have another message of proof from Alice, which then can go all the way back to our original message that proved that the transaction Alice sent was valid.

Problems

But what if I then send a message to Charlie, and digitally sign it and say "I give my one credit to Charlie" after I sent Alice the similar message. If Charlie then compares with Alice later, it will get a bit awkward... who has the credit?

How Vertcoin solves this problem

The first step that vertcoin takes is to publically broadcast all such messages. So in the above example, the message I sent Alice with my one credit also goes to everyone else too, including Charlie and whoever else Charlie or Alice may want to send my credit to.

Now, when I send Charlie a message later, he will know that I have sent my credit earlier, so my attempt to "double-spend" will go nowhere as Charlie knows that he's not got any credits from me.

This big public messageboard is the beginnings of what is known as the "Block Chain" (more on that after).

This sounds a bit intrusive...

With a big public messageboard of all these transactions, its hard not to feel a little paranoid, after all - why should everyone know your business?

This is why Crypto-Currencies are pseudonymous. (Pseudonymous means you receive an unassociated Name for your transactions - in this case a "vertcoin Address" - which has no link to your own personal details). Therefore, the transaction you send to Alice, is a transaction from your "vertcoin Address" to Alice's vertcoin address, and only you know that to be Alice's address.

After all, to Charlie it doesn't matter who the real person who received your credit is, merely that you don't have the credit to give. He can see the "Address" to where it went, but there is no information for him to Ascertain Alice owns that address.

Also, the number of addresses that people can have is (for all intents and purposes) unlimited. So, there is nothing to stop Alice from giving you one address for you to send your credit to, then give Charlie another address for him to send a credit to.

More Problems

But what if I publish the message to send Alice and Charlie my one credit At the same time? Alice and Charlie will have the right to argue for the credit.

Ultimately, cancelling both transactions doesn't work (there is a more complicated reason why elsewhere, just for now accept that it doesn't), the only way for everything to work is that one of the two option is chosen, and everything that conflicts with the chosen option is discarded.

In simple terms, if 500 people think Alice deserves the credit, but 1000 people think Charlie deserves it, then the 500 people that back Alice would have to eat humble pie basically and accept that they were out-voted.

Look at the Time!

If there was a central time service that made all transactions occur one after another, then it would be trivial to decide whether Alice or Charlie received the credit, as it would just process the one it received first. But, if there was a central service - Charlie's friend may run it, or Alice may run it, or what happens if it goes down, gets DDoSd or hacked - it becomes a single point of failure - which is the opposite of how crypto-currencies operate. Also, this single point would get to have a big control of the decision making process, so it would no longer be fair.

The democratic solution

No, this is not a political statement. vertcoin sets out a plan to combat the above situation, and does so in a very efficient way.

Every 2.5 minutes, everyone votes on a single message that contains all of the digitally signed messages that they choose to honor. So in our case, 2.5 minutes after I publish my message that I sent Charlie and Alice each my 1 and only credit, everyone in the network votes to decide which one to accept and which one to reject.

The vote

Each round of voting begins with the transactions from the previous round of voting.

Each new round then further re-enforces the "chain" of accepted previous "votes". Every person voting in the latest round knows the most recent votes, as well as the latest digitally signed messages (which from now on we will call "Transactions" as that is the Crypto-Currency term) and ignoring any new transactions that conflict with the previous round votes.

So each round, they vote for what they personally believe should be valid based on the order that they saw them (so they are their own central time-server at least for their own votes).

The voting lottery

Now the result of the vote, unlike general elections, isn't a majority-win vote. Rather, it is a lottery similar to something like the Hunger Games, where each transaction is placed into the "hat" X number of times based on the votes it received.

This is because it allows for people to miss transactions, get them in a slightly wrong order, get them later than everyone else etc.

After the round has concluded, that isn't the end of it, as the next round that occurs still has votes that could affect transactions in this round (and previous rounds).

The general rule is, after each round, a transaction becomes more "confirmed" (or uncomfirmed). In vertcoin terminology, often people talk about "6 confirmations" - this means that the transaction has to go through 6 rounds of voting before they will accept it as valid.

So, some 15 minutes after I sent both Alice and Charlie my only credit - Alice emerges as the actual recipient, and she can be sure that I haven't double spent because there have been 6 rounds of voting by everyone to ensure that only one decision has been taken.

Obviously, after 30 minutes, there are 12 rounds of voting based on the transaction - but 6 rounds (6 confirmations) is the general rule of thumb.

For smaller transactions it is reasonable to take less precaution (as the risk of double-spending to tiny amounts is very-low)

But who are these voters... and why do they care if Alice, Charlie or both get your credit?

The voters

Well obviously, the problem here is that anyone could pretend to be a bunch of people and make loads of votes. This is where the main computational algorithms come in - The number of votes you're allowed to make is based on the amount of computing power you decide to use for voting. This rule means that it is easily verifiable and unfakeable - and ensures that no-one can cheat, or lie about it.

The final problems

How do you initially distribute these credits?

There isn't a central bank, or government, gold mine or even shop that is minting these credits so who decides what or who has them at the start.

What is the point of voting?

Why use all that computing power, why not just use it when you need to receive a transaction?

Obviously, that itself is a further problem - if no one is "voting", then anyone can come in with very little effort and take over the voting. Therefore, voters are required to ensure the system remains stable and consistent.

Solution

vertcoin solves both of these problems in one go. Credits are created (or "minted") by the voting, and the voters claim the fees created from the transactions.

So, the people who enable the network to function (so that the transactions are published, and only one correct 'double-spend' is selected) are paid credits from the people who wish to send the transaction, and further until the Crypto-Currency hits its predefined limit of "minted coins", the voters also receive the new coins that are created when each vote is complete.

Tying it all together

This process of "voting" at each round, is often referred to as "mining" (or "vertcoin mining"), and the computing power known as "Proof of Work".

Most Crypto-Currencies generally follow the above principles, but differ in three ways:

  1. The "proof of work" computer code. Vertcoin uses an algorithm called "Scrypt Adaptive N-Factor". Many other crypto-currencies (such as Litecoin/Dogecoin etc) use "Scrypt" which is similar, but has a fixed code-set meaning that companies can create customised hardware that can perform the hashing faster, and with less power than CPU/GPU miners. Others (such as XPM or "Primecoin") have other algorithms.
  2. The "block-rate" - this is essentially how often everyone votes on a round. vertcoin as said has 2.5 minute "voting rounds", Bitcoin has 10 minute voting rounds, and Dogecoin has 30 second voting rounds.
  3. The "block-reward" - this is the number of new crypto-coins that are "minted" at the end of a round. vertcoin mints 25, Litecoin mints 50, and Dogecoin mints 500,000 per round. As vertcoin/litecoin et al are finite, and have a pre-programmed limit, also programmed in is the fact that after so many "voting rounds" the block-reward will halve, meaning that at some point in 2015 Litecoin will stop minting 50 coins per round, and instead mint 25 coins. Same for vertcoin.

This is crypto-currency in its simplest form.