How Smartcash Smartnode payments worksteemCreated with Sketch.

in smartcash •  7 years ago  (edited)

For the first few blocks of the payments, the queue is not active. Every node is elegible for receiving the rewards, because all nodes have the same age. The network is said to be in "upgrading mode", and this period lasts for as many blocks as 1/3 of the eligible smartnodes. So if there are 6000 smart nodes active, this upgrading period lasts for 2000 blocks.

After the network is out of the upgrading mode, there will be a queue. The position in the queue depends on how long the smartnode is active. On each block, the protocol takes the top 10% of the queue, and calculates the rank of each one. The rank is the difference between the txid of the smartnode and the block hash. The node with the largest rank is paid, and gets to the end of the queue.

Even if the payment looks random, it is deterministic. It cannot be determined beforehand, but as soon as the block is closed, anyone on the network will reach the same result, and the winner will be the same. This is useful to avoid an attacker to knock offline the top nodes and increase his position. In a simple queue, the node #12 in the queue could force the first 11 to get offline and be the next paid. In the current system, there is no way to doing it without knocking offline a lot of nodes.

If any node goes offline for less than one hour, its place on the queue is kept. As soon as it gets back online, it goes to his place. But if the downtime lasts for more than one hour, it will go to the end of the queue when it goes online. This allows operators to update software or hardware, empty a full disk, test startup scripts, and not lose the smartnode payment. It creates an incentive to operators to keep their nodes up to date without fear of losing a reward.

The payments will have some fluctuation on the short term, because the hash of the block cannot be known before closing the block. But in the long term, the "Law of Large Numbers" takes over and keeps the frequency very close to perfection.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thanks for clearing up how this process works. It's humorous how many people flip about about not seeing a payment when it hasn't even been 5000 blocks yet. It will all average out, and I trust that the devs will adjust things as needed as well.

Great write-up! Looks completely correct. Code is here and I also have the same interpretation as you. Basically upgrade mode is a lottery system for early adopters -- everyone who had a node was eligible, and nodes can get more than one payout during that period.

That period is now over so it's in queue mode now.

https://github.com/SmartCash/smartcash/blob/1.1/src/smartnode/smartnodeman.cpp

Interesting stuff. I now understand how the smartnode payment system works now thanks to you. Truly informational

Great post,very informative.

Thanks for the explanation, makes more sense now!

Now it makes sense. The first part a lottery and then the queue kicks in. I would have liked to have won at least once in the lottery to shorten the 23days of waiting for something to happen.

23 days isn't too long 🙂

A reason why 2 of my 4 SmartNode dont receive payment while my 1 SmartNode get paid twice in a day.

It´s good to know that, now I can go to beach knowing my SN will get paid soon and then constantly