gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
588 stars 173 forks source link

Staking creates one cent output #311

Closed tomasbrod closed 7 years ago

tomasbrod commented 7 years ago

Coin stake seems to always produce one cent output in addition to the normal output.

I merged this output with the normal output and testing it in testnet. So far it seems to work. Other proof of stake coins seem to split the stake output in half. Gridcoin changed that code (src/wallt.cpp/CreateCoinStake) with a comment:

Place all but one cent in the first output so stakes dont get smaller - Note: the .01 GRC will be consolidated on any outbound transaction so this should NOT become a nuisance anymore.

tomasbrod commented 7 years ago

When a stake transaction is successfully created, it it very flexible. More inputs can be added to receive interest on all of them. This can be used to harvest interest on all coins at once. The output is flexible too. One can choose to have only one output with all the input funds and reward combined. Or split to two or more equal parts. Or create separate outputs for stake, fees, interest and research. Splitting output may be beneficial when you want to stake a lot of blocks (16 hour maturity). Adding coins from other addresses is a privacy concern.

I propose this to be configurable.

iFoggz commented 7 years ago

This would explain a lot. Thanks for the info! I run 10 grc addresses in my wallet dedicated to staking (which 5 are in use) with coins split over them. It allows me to stake more frequently. I've noticed other high grc balance users do the same. For example I staked 3 blocks within ~12 hours as there were mature coins in other wallets allowing my weight to still be reasonable. cheers

tomasbrod commented 7 years ago

@Foggyx420 You can do the same with single wallets. Just create more addresses and send money there. Use coin control features to see your coins.

iFoggz commented 7 years ago

yea i use coin control that how i devised up my coins between the grc addresses. I was doing some testing on how it would pick coins for staking and if u could stake more often. This has proven true it seems. I do plan to expand to all 10 staking address.

tomasbrod commented 7 years ago

Fixed in #301. But more research is needed on why other Coins split the stake output to half.