NScore

As you know, each node in Zold continuously calculates a trust score, by finding hash suffixes (the White Paper explains the mechanism in details). All scores together constitute a summary score, which is called NScore (network score). Here is how it affects the decisions to be made by Zold users.

Trust score is used by Zold merge operation in order to make a decision which copy of a wallet to trust more. Each node earns its score by finding hash suffixes. It’s not important now how exactly it happens, just keep in mind that the faster (and the more expensive) is the CPU at the server, the higher the score.

Now, imagine a network of just two nodes, which have two different copies of the same wallet. The first copy has money, while the second doesn’t. I’m fetching both copies and trying to merge them. Which copy should Zold software trust? It will trust the copy which is coming from a more trustable node—the node with a higher score.

Now, imagine a network of two hundred nodes. They all have different copies of the same wallet. One group of nodes has a copy with money, while another group of nodes says that the wallet is empty. I fetch them all and want to merge. Which version of the wallet should Zold trust? It will trust the version that is coming from the group of nodes with the highest cummulative score.

This is how we find consensus between conflicting data sources. We simply trust those who invest more CPU power into calculating the score. This principle is also known as proof-of-work.

Now, imagine a network of an unknown amount of nodes, which all have copies of the wallet. I fetch it from, say, 10 nodes and all copies are identical—the wallet has money. Can I trust this data? What if the rest of the network has an empty copy of the wallet? I can’t really say, since I don’t know the size of the network and the scores of the nodes I don’t see.

In order to give an answer to this question we introduce NScore, which stands for the “network score.” This is an approximate summary of all scores of all nodes. When I fetch the wallet from 10 nodes I know their summary score. Then I simply compare it with the NScore and decide whether I trust the data or not. If the summary score of ten nodes is over 50% of NScore, I trust without any doubts, because no matter what all other nodes say, the cumulative score of the copy I have is higher.

If the cumulative score of the nodes, which I fetched the wallet from, is lower than 50% of NScore, I have to make a decision whether I trust the data or not. It has to be my personal decision and it should be based on… the monetary value of the payment I’m expecting.

I simply have to compare the total cost of the network with the amount of payment I’m trying to validate and make a subjective decision. For example, the payment amount is 4.95 ZLD, one ZLD worth one US dollar, total cost of the network is $5,000, and NScore is 12,800. Now, I’m fetching the wallet from a few nodes with a cummulative score of 160, which is 1.25% of NScore. In this case, the biggest payment amount I can trust is 1.25% of $5,000, which is $62.50. Since my expected payment amount is lower than this threshold, I can trust those few nodes. No need to fetch the wallet from the entire network.

Check this page, it demonstrates our current NScore and the cost of the network.