Stake for Charity
See this thread on the hosted forum for updates from Tranz and the original post.
What is Stake For Charity?
Stake for charity is a new function added to HBN in version 1.4+. This new function will allow sending a percentage of your Proof of Stake reward to another address. So for instance if you held 100 HBN and for 20 days, and you allowed them to stake on the network, You would receive a reward of 4 coins, for your work on the network. Assuming you are donating 25% of your PoS reward, your wallet will send 1 HBN to your designated address. == How does it work? ==
When activated the wallet will watch for new blocks coming in from you or the network. After a new block is found and accepted by the network the wallet will check if you have any PoS blocks that have matured. Matured means they have 25 confirmations. At this point the wallet will calculate your reward and send a percentage of that to your address of choice.
In a nutshell
- You can send MAX 50% of each stake to a specified address
- You can setup one receiving address per wallet (.dat file)
- You can set and min amount to send
- You can set the max amount to send
- You can set an address to receive the change
- The wallet will keep S4C active after shutdown and resart.
- stakeforcharity needs to be setup BEFORE your coins stake successfully, as it will automatically send out the percentage specified at activation, upon maturity of the staked coins
How do I use it?
This is activated by a RPC command stakeforcharity. And by using the stakeforcharity tab in gui.
For default unlocked wallets you simply enter the RPC command or use the gui in the debug window/console tab: stakeforcharity <HBNAddress> <percentage>
For secondary wallets you can enter the same command, but you need to preface it with: usewallet <wallet name> stakeforcharity <HBN Address> <percentage>
If your wallet is locked you will need to unlock it via the RPC command walletpassphrase or using the gui unlock. To stop stake for charity you will need to issue the same type of commands, but set the percentage to zero.
Do you have a list of charities?
Yes, please visit http://www.hobonickels.info/donate.php
Can I get added to the list?
How can I tell I am running S4C?
By clicking on the staking icon (green arrow in the bottom right) a window with information will pop up, in there you will get information about your current address and percentage your are giving. You can also view the information on the S4C tab in the gui.
Can I send to multiple different addresse
At the current time, no. Each loaded wallet can only send to 1 other address. However each wallet can choose another or no other address to send to. Future releases may allow for multiple s4c from the same wallet.
What risk are involved if any?
For the network I think the risk is very low. This will only add a small amount of extra transactions being sent out. It will grow the block chain size a little bigger then without it. But shouldn't be very much at all.
For the user i think there are 3 risks. First off I have to allow for sending coins using S4C even if the wallet is only unlocked for mint. So an intruder could start up stake for charity and send coins off to himself. But could still not use any of the normal send money commands or gui. So the risk is quite low, and should be noticed by the user very quickly.
Another issue that I see is in dealing with wallets. As each S4C is sent out, the change(what is left over) from your block is returned to you to a new address. As the amount of cached keys is used, new ones are generated. If a user lost a wallet and had to restore from an older backup, they may lose some of those coins.
There are 3 very quick and easy work around for this. First off the user can use coin control to send the change back to an address they know is safely backed up. Another way is to use the rpc command keypoolrefill <keys> or usewallet <walletname> keypoolrefill <keys> where keys could be say 500 or 1000. This will generate and store the amount of new keys into that wallet. After that you would then backup that wallet and you would have many keys before new ones are generated. Finally in version 1.5+ the user can choose a specific address to send the change back to.
Finally the last issue that I can think of is the potential of lost coin days. The wallet will choose which coin block to use to send the coins to your charity. For all my testing it seems to use the very smallest and the youngest block. But it potentially could choose one that is a bit older. This can be seen and tracked via coin control. So far this issue is pretty low, based on my initial testing.
For the charity receiving the coins. The biggest risk i would see is theft. If someone was able to steal the private key of the wallet being used. They would be able to capture the coins. This is no different than any other user. But they will be a bit more a target.
This issue could be combated by generating a wallet offline and using that for the public address. Thereby protecting it.
A recipient of S4C may also have a higher network fee when going to spend the coins, as they will be most likely be made up of many small blocks.