Jump to content
Tranz

HBN Trouble Shooting and User Guide: Stake For Charity

Recommended Posts

Tranz

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.

 

How do I use it?

For now this is activated by a RPC command. Future releases will have full gui support. For default unlocked wallets you simply enter the RPC command, or using 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?

Not yet, but soon a list will be available on hobonickels.info.

 

Can I get added to the list?

If you run a charity and would like to get added to the list, please feel free to drop us a line in this thread or PM Tranz or Presstab here or at bitcointalk.  We will need your website and your HBN address.

 

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.

 

Can I send to multiple different addresses?

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 2 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 safelty backedup.  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 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.

 

I have plans to address most of these issues in future releases.

 

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 then 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.

  • Like 2

Share this post


Link to post
Share on other sites
presstab

Adding this write up and stake for charity to the wiki.

 

I am excited for this and am going to test it on my version of 1.3.8 daemon once it gets synced.

Share this post


Link to post
Share on other sites
Tranz

Prefect thanks. I was just about to update my git hub with a few small changes to the stake icon.  Having some issues with that box though. Running through check-disk.

 

I only have 4 or 5 more things and I am ready to release 1.4 :)

 

I am pretty excited myself.

  • Like 1

Share this post


Link to post
Share on other sites
presstab

1.4 is going to be awesome, I can't wait to see the differences with faststaker as well.

Share this post


Link to post
Share on other sites
rgm108

Hey Tranz

 

Currently running cline version: v1.4.0.0-g4ddc7a0a-hobo and I'm not seeing any options to enable S4C so I guess it's still on it's way.

 

Anyhoo... Someone needs to get us a list of addresses for charities before this goes live. Am willing to support any deserving charity out there as part of a larger community since community involvement would mean better support than each of us sending small amounts to random charities.

 

Cheers :)

Keep up the good work.

Share this post


Link to post
Share on other sites
Tranz

Hi rgm108. You can use stakeforcharity by using the rpc command.

 

Click on debug window, then the console tab. Then type stakeforcharity <HBN ADDRESS> <percentage>

 

So for example.

stakeforcharity EqetNzLNdk3YtXdsSRvj84VU8bWdyD1Qbp 25

 

Edit:

 

Right now I only know of 2 charities that are on board. Songs For Love (address show above) and the HBN Foundation. Not really a charity, but a good place to donate to.  Ex3Z1roGMsaHbPRdvLZdeaMKn5ys5ZsEAn

Share this post


Link to post
Share on other sites
rgm108

Thanks Tranz

 

I moved coins around a few days ago to get 1 big block for staking. Should be ready in the next 6 days so I'll test this with 10% for each of the addresses mentioned above.

 

PS. I noticed the wallet should be unlocked before the rpc command is accepted. Just a little tip if others want to try it.

Share this post


Link to post
Share on other sites
rgm108
Should be ready in the next 6 days so I'll test this with 10% for each of the addresses mentioned above.

 

 

Erm... Is it possible to S4C for more than 1 address at a time?

Share this post


Link to post
Share on other sites
Tranz

No sorry right now it is only 1 address per wallet. Next major release should have multiple address per wallet.

Share this post


Link to post
Share on other sites
presstab

Testing out s4c right now. Two quick questions: Is there any way to confirm/check the current status of s4c, for instance typing a command that will return wallets using s4c, the address being sent to and the percentage?  And also if I would like to do 2% of each stake, the I would enter "usewallet stake stakeforcharity <HBN address> 2" or would it be ".02" or "2%"?

 

EDIT-----------

 

Just got my first stake for charity stake and I can say that the answer to my question is: usewallet stake stakeforcharity <HBN address> 2

 

Wow I really like this new feature it is awesome.  Thanks for the hard work Tranz!

Share this post


Link to post
Share on other sites
Tranz

Cool glad you got it. You can check it by clicking on the stake arrow. It will show you that wallets current giving address and percentage.

Share this post


Link to post
Share on other sites
presstab

Also I am guessing that it might be best to try to make sure that there is a young small block that can be used to make change out of so that my blocks that are being aged aren't eaten into.  Since the staked blocks wait 25 confirms until s4c is sent, this younger block should continue to be youngest until a new block of coins is sent into the wallet from another address. s4c seems to make successful maturation a bit more difficult, but shouldn't be a problem if I am attentive.

Share this post


Link to post
Share on other sites
Tranz

This is what I see, yes. Plus if you have a lot of small blocks, if you use 1 or 2, it shouldn't be much of an issue.   But please let me know your findings.

  • Like 1

Share this post


Link to post
Share on other sites
presstab

So I was paying attention during a stake I just had.  The three least mature blocks I had at the time of stake:

 

3340 HBN - 5008 confirms

186 HBN - 5004 confirms

401 HBN - 216 confirms

 

Surprisingly, the s4c chose the 186 HBN block to make change with rather than the 401 HBN block.  The 186 HBN block had more coin days than the 401 so I expected it not to be chosen. This makes me think that perhaps the change is selecting the smallest block first and disregarding age.  I will continue to monitor further stakes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Cryptocurrenytalk Logo

 

News, information, and discussions about cryptocurrencies, blockchains, technology, and events. Blockchaintalk is your source for advice on what to mine, technical details, new launch announcements, and advice from trusted members of the community. Cryptocurrencytalk is your source for everything crypto. We love discussing the world of cryptocurrencies.

 

   
×
×
  • Create New...

Important Information

By using CRYPTOCURRENCYTALK.COM, you agree to our Terms of Use.