<p>In Nextcoin, proof of stake is used.  So the "mining" process there is just about holding coins <strong>and</strong> leaving your computer on.  It <strong>doesn't</strong> involve powerful CPUs.</p>

<p>Each block (every 60 seconds), a random Nextcoin is selected to be the next "miner".  There are 1 billion coins so the odds of a single wallet being selected is the number of Nxt in that wallet divided by 1 billion.  (Also, it's possible to calculate and agree on who that node is so the transactions need only be sent to that particular wallet.)</p>

<p>If a node with the selected wallet is running, it will collect the transactions, make a block, and send it to the rest of the network and collect the fees.  If the computer is turned off, however, then the entire network will have to select a different nextcoin to make the transaction.  This time, the unresponsive wallet will be ignored.  The network would suffer in that the time to make a block is decreased, but the thought is that people wouldn't leave their computers off if they have a lot of NXT because they're missing out on all the fees that they could have collected.</p>

<p>If you only have a few NXT, you can leave your computer off: You probably wouldn't have collected much fees anyway.  But, your odds of being selected were low so it probably won't decrease transaction times much.</p>

CC BY-SA 3.0
2014-12-22T22:44:45.617Z
How can a network with different incentives agree on a random number in a way that can't be manipulated?
ike
CC BY-SA 3.0
2015-07-24T11:29:03.357Z
also, couldn't i build a chain where i'm the only miner because i was the only person online at those moments? wouldn't my chain win against the current chain?
Luca Matteis
CC BY-SA 3.0
2018-03-19T07:36:47.290Z
The best explanation I found [until now]
Aminadav Glickshtein
CC BY-SA 3.0
2018-03-17T15:15:06.890Z
so as I understand, a node with lesser stake coin will have **less** probability to be a miner right ?
hqt
CC BY-SA 3.0
2014-01-07T08:48:59.613Z
2014-01-07T08:48:59.613Z
Eyal
<p>For Peercoin specifically, PoW and PoS blocks are independent. Just as you're betting your consumed electricity and CPU-time vs. the possible PoW-blok's reward, in the PoS blocks you're betting your coin-age: the amount oF PPC you own multiplied by the number of days they've sitted idly at your wallet. It must be a minimum of 30 and a maximum of 90 days for your coins to start generating tickets for the PoS raffle.</p>

<p>Should your ticket win, you earn 1% interest and lose all your coin-age, so your coins are, from the network POV, as though you had just received them. I.e. you'll need to wait another 30 days for them to be able to pay you interest again. Over time, though, you're just supposed to earn about 1% annually.</p>

<p>Since code for PoS and PoW are independent of each other and the concept of PoS so new, there have been a couple bugs to be fixed plus a kind of attack was found that allowed users to generate a lot of PoS raffle-tickets for "free" - fortunately Sunny King has been able to fix such problems quickly.</p>

CC BY-SA 3.0
2014-12-23T20:15:49.890Z
What is included in the hash for a PoS raffle ticket?
morsecoder
CC BY-SA 3.0
2014-03-03T00:32:38.970Z
2014-03-03T00:32:38.970Z
Joe Pineda
<p>Proof of Stake uses fundamentally the same process as Proof of Work, but with a few key differences.</p>

<p>In Proof of Work miners are searching for a hash of the transactions in mempool + data from the last blockheader, and that hash must be below a certain target value to be accepted by the network.  The target is the inverse of difficulty, essentially the new hash must have a number of leading zeros, the more leading zeros, the less likely it is to find a hash by chance.  PoW uses the nonce (number once) and the mempool transactions and previous blockheader data, and iterates over as many random nonces as it can per second to output hashes hoping to find a hash with an amount of leading zeros that will be accepted by the network.  So in PoW the more nonces and hashes per second you can create, the better chance you have of finding a hash that meets the target.</p>

<p>Proof of Stake varies in that there is no nonce that can be iterated over, rather the unspent transaction outputs (UTXO) in the nodes local wallet are iterated over.  The main variable then becomes time, the time of each hash attempt is part of the hashing, and thus allows 1 hash, per UTXO, per second.  So a wallet with 100 UTXOs can only create 100 unique hashes per second (the node could create more hashes but that would be pointless as they would just repeat).  Some coins mask the bottom bits of the epoch time, to limit the amount of hashing further, often to hashes every 8 or 16 seconds.
To prevent users creating many tiny UTXOs there is a lower limit of coins that are viable for staking in a UTXO (often around 0.01 coins) and the difficulty is modified by the number of coins in a UTXO; a UTXO with 2 coins has a hash target that is twice as easy as a UTXO with 1 coin.  In this way then we can see that every coin staking has a roughly equal chance of creating a block, and a user with a large number of coins will be likely to make more blocks and earn more transaction fees than a user with less coins. </p>

<p>There are variants of PoS, but they all basically work in this same way, and by doing so prevent the need for massive quantities of computing power to spew out zillions of nonces and hashes to secure a block-chain.</p>

CC BY-SA 4.0
2021-05-06T16:42:09.183Z
The word "nonce" has been in the English language for centuries (https://www.merriam-webster.com/dictionary/nonce), and it does not mean "number once".
kjo
CC BY-SA 4.0
2020-01-25T12:39:27.980Z
2020-01-25T12:39:27.980Z
Scalextrix
<p>I know and understand the concept of proof-of-stake. Instead of requiring users to do a certain amount of power-intensive hashing "work", it requires you to own a certain stake of the currency in order for you to mine new coins. </p>

<p>But how does the actual mining process work? In PoW mining, people "find" blocks by generating a hash that fulfills a certain condition. How can one mine a PoS block? Is a miner required? Or does just anyone holding coins get their share after a certain amount of time? </p>

<p>In Peercoin specifically, is PoW and PoS mining done independently or do they interfere or influence one another? </p>

<mining-theory><proof-of-work><proof-of-stake><peercoin>
How does proof-of-stake "mining" work?
Steven Roose
# How does proof-of-stake "mining" work?

(Asked by: username_0 on 2014-01-07)

I know and understand the concept of proof-of-stake. Instead of requiring users to do a certain amount of power-intensive hashing "work", it requires you to own a certain stake of the currency in order for you to mine new coins.

But how does the actual mining process work? In PoW mining, people "find" blocks by generating a hash that fulfills a certain condition. How can one mine a PoS block? Is a miner required? Or does just anyone holding coins get their share after a certain amount of time?

In Peercoin specifically, is PoW and PoS mining done independently or do they interfere or influence one another?

**Tags:** mining-theory, proof-of-work, proof-of-stake, peercoin


---

## 3 answers

### Answer by username_1 on 2014-01-07. Score: 24

In Nextcoin, proof of stake is used. So the "mining" process there is just about holding coins **and** leaving your computer on. It **doesn't** involve powerful CPUs.

Each block (every 60 seconds), a random Nextcoin is selected to be the next "miner". There are 1 billion coins so the odds of a single wallet being selected is the number of Nxt in that wallet divided by 1 billion. (Also, it's possible to calculate and agree on who that node is so the transactions need only be sent to that particular wallet.)

If a node with the selected wallet is running, it will collect the transactions, make a block, and send it to the rest of the network and collect the fees. If the computer is turned off, however, then the entire network will have to select a different nextcoin to make the transaction. This time, the unresponsive wallet will be ignored. The network would suffer in that the time to make a block is decreased, but the thought is that people wouldn't leave their computers off if they have a lot of NXT because they're missing out on all the fees that they could have collected.

If you only have a few NXT, you can leave your computer off: You probably wouldn't have collected much fees anyway. But, your odds of being selected were low so it probably won't decrease transaction times much.

> **Comments:**
> **username_2**: How can a network with different incentives agree on a random number in a way that can't be manipulated?  
> **username_3**: also, couldn't i build a chain where i'm the only miner because i was the only person online at those moments? wouldn't my chain win against the current chain?  
> **username_5**: so as I understand, a node with lesser stake coin will have **less** probability to be a miner right ?  
> **username_4**: The best explanation I found [until now]  

---

### Answer by username_6 on 2014-03-03. Score: 9

For Peercoin specifically, PoW and PoS blocks are independent. Just as you're betting your consumed electricity and CPU-time vs. the possible PoW-blok's reward, in the PoS blocks you're betting your coin-age: the amount oF PPC you own multiplied by the number of days they've sitted idly at your wallet. It must be a minimum of 30 and a maximum of 90 days for your coins to start generating tickets for the PoS raffle.

Should your ticket win, you earn 1% interest and lose all your coin-age, so your coins are, from the network POV, as though you had just received them. I.e. you'll need to wait another 30 days for them to be able to pay you interest again. Over time, though, you're just supposed to earn about 1% annually.

Since code for PoS and PoW are independent of each other and the concept of PoS so new, there have been a couple bugs to be fixed plus a kind of attack was found that allowed users to generate a lot of PoS raffle-tickets for "free" - fortunately Sunny King has been able to fix such problems quickly.

> **Comments:**
> **username_7**: What is included in the hash for a PoS raffle ticket?  

---

### Answer by username_8 on 2020-01-25. Score: 3

Proof of Stake uses fundamentally the same process as Proof of Work, but with a few key differences.

In Proof of Work miners are searching for a hash of the transactions in mempool + data from the last blockheader, and that hash must be below a certain target value to be accepted by the network. The target is the inverse of difficulty, essentially the new hash must have a number of leading zeros, the more leading zeros, the less likely it is to find a hash by chance. PoW uses the nonce (number once) and the mempool transactions and previous blockheader data, and iterates over as many random nonces as it can per second to output hashes hoping to find a hash with an amount of leading zeros that will be accepted by the network. So in PoW the more nonces and hashes per second you can create, the better chance you have of finding a hash that meets the target.

Proof of Stake varies in that there is no nonce that can be iterated over, rather the unspent transaction outputs (UTXO) in the nodes local wallet are iterated over. The main variable then becomes time, the time of each hash attempt is part of the hashing, and thus allows 1 hash, per UTXO, per second. So a wallet with 100 UTXOs can only create 100 unique hashes per second (the node could create more hashes but that would be pointless as they would just repeat). Some coins mask the bottom bits of the epoch time, to limit the amount of hashing further, often to hashes every 8 or 16 seconds.
To prevent users creating many tiny UTXOs there is a lower limit of coins that are viable for staking in a UTXO (often around 0.01 coins) and the difficulty is modified by the number of coins in a UTXO; a UTXO with 2 coins has a hash target that is twice as easy as a UTXO with 1 coin. In this way then we can see that every coin staking has a roughly equal chance of creating a block, and a user with a large number of coins will be likely to make more blocks and earn more transaction fees than a user with less coins.

There are variants of PoS, but they all basically work in this same way, and by doing so prevent the need for massive quantities of computing power to spew out zillions of nonces and hashes to secure a block-chain.

> **Comments:**
> **username_9**: The word "nonce" has been in the English language for centuries (https://www.merriam-webster.com/dictionary/nonce), and it does not mean "number once".  

---

