<p>Look at lines 401 and 402 of the code you linked to. The block must be signed with the key that can spend the UTXOs.</p>

CC BY-SA 3.0
2015-03-20T21:10:10.943Z
So every block header is serialized with a signature right into it?
morsecoder
CC BY-SA 3.0
2015-02-25T07:38:47.740Z
2015-02-25T07:38:47.740Z
David Schwartz
<p>The parameters included in the staking are listed <a href="https://github.com/ppcoin/ppcoin/blob/master/src/kernel.cpp#L290-L312" rel="nofollow">here</a>: </p>

<pre><code>// ppcoin kernel protocol
// coinstake must meet hash target according to the protocol:
// kernel (input 0) must meet the formula
//     hash(nStakeModifier + txPrev.block.nTime + txPrev.offset + txPrev.nTime + txPrev.vout.n + nTime) &lt; bnTarget * nCoinDayWeight
// this ensures that the chance of getting a coinstake is proportional to the
// amount of coin age one owns.
// The reason this hash is chosen is the following:
//   nStakeModifier: 
//       (v0.3) scrambles computation to make it very difficult to precompute
//              future proof-of-stake at the time of the coin's confirmation
//       (v0.2) nBits (deprecated): encodes all past block timestamps
//   txPrev.block.nTime: prevent nodes from guessing a good timestamp to
//                       generate transaction for future advantage
//   txPrev.offset: offset of txPrev inside block, to reduce the chance of 
//                  nodes generating coinstake at the same time
//   txPrev.nTime: reduce the chance of nodes generating coinstake at the same
//                 time
//   txPrev.vout.n: output number of txPrev, to reduce the chance of nodes
//                  generating coinstake at the same time
//   block/tx hash should not be used here as they can be generated in vast
//   quantities so as to generate blocks faster, degrading the system back into
//   a proof-of-work situation.
//
</code></pre>

<p>I don't see anything that proves ownership of the coins that were staked in a particular output. I assume there must be something, though, or else anyone could stake with anyone else's UTXOs. What am I missing?</p>

<p>Maybe it is just a requirement that there be a transactions spending the output be included in the block? If so, then if someone created that initial transaction, then they could give it to someone else and let them do the manual labor of checking once per second to see if their stake succeeds? </p>

<proof-of-stake><peercoin>
In Peercoin style Proof of Stake, can one person 'stake' for another's address?
morsecoder
# In Peercoin style Proof of Stake, can one person 'stake' for another's address?

(Asked by: username_0 on 2015-02-24)

The parameters included in the staking are listed [here](https://github.com/ppcoin/ppcoin/blob/master/src/kernel.cpp#L290-L312):

```
// ppcoin kernel protocol
// coinstake must meet hash target according to the protocol:
// kernel (input 0) must meet the formula
//     hash(nStakeModifier + txPrev.block.nTime + txPrev.offset + txPrev.nTime + txPrev.vout.n + nTime) < bnTarget * nCoinDayWeight
// this ensures that the chance of getting a coinstake is proportional to the
// amount of coin age one owns.
// The reason this hash is chosen is the following:
//   nStakeModifier: 
//       (v0.3) scrambles computation to make it very difficult to precompute
//              future proof-of-stake at the time of the coin's confirmation
//       (v0.2) nBits (deprecated): encodes all past block timestamps
//   txPrev.block.nTime: prevent nodes from guessing a good timestamp to
//                       generate transaction for future advantage
//   txPrev.offset: offset of txPrev inside block, to reduce the chance of 
//                  nodes generating coinstake at the same time
//   txPrev.nTime: reduce the chance of nodes generating coinstake at the same
//                 time
//   txPrev.vout.n: output number of txPrev, to reduce the chance of nodes
//                  generating coinstake at the same time
//   block/tx hash should not be used here as they can be generated in vast
//   quantities so as to generate blocks faster, degrading the system back into
//   a proof-of-work situation.
//

```

I don't see anything that proves ownership of the coins that were staked in a particular output. I assume there must be something, though, or else anyone could stake with anyone else's UTXOs. What am I missing?

Maybe it is just a requirement that there be a transactions spending the output be included in the block? If so, then if someone created that initial transaction, then they could give it to someone else and let them do the manual labor of checking once per second to see if their stake succeeds?

**Tags:** proof-of-stake, peercoin


---

## 1 answers

### Answer by username_1 on 2015-02-25. Score: 2

Look at lines 401 and 402 of the code you linked to. The block must be signed with the key that can spend the UTXOs.

> **Comments:**
> **username_0**: So every block header is serialized with a signature right into it?  

---

