Peershares - 1st public alpha test release for Windows and Linux

Thank you very much for your explanation, Ben!
It makes sense that the Peershares system doesn’t know whose intention it is to spread dividends.
As you said - the block chain doesn’t “know” who issued the shares and should be the one to distribute dividends…
But at first sight it is a bit confusing. And I don’t like the idea of someone unintentionally distributing dividends (would be a strange “acident”, but I bet it can happen…) instead of transferring shares (yeah, one must really turn the brain off to do that, but in that case I’d like to have one warning as a kind of last resort).
Is there a warning? I can’t test it as I don’t have “testnet PPC”, only some “real ones” :slight_smile:

[feature request]
[edit]explain in an appropriate way (in the qt GUI and the RPC command reference) the meaning of distributing dividends and whose intention it should be to do that and create a warning message before effectively distributing the dividends (just like the warning when you encrypt the wallet)
The notification when trying to distribute dividends should be warning enough as it explains very well what is going to happen, if you continue.[/edit]
[/feature request]

Is it possible welcome to note these kinds of thoughts directly as an “issue” at the Peershares github?
[edit]I’ll leave this question as it might be of general importance.[/edit]

I don’t think in current peershares client it is possible to distribute dividends. How do you get Peercoins into the client? If there is a way please let me know.

I don’t understand “Send shares”. To my knowledge, this is not a term that is generally used

Does it mean “distribute (or “issue”) shares” (from the organsation to individals)

Or does it mean “transfer shares” (between individals)?

Thanks

As far as I understand this, it is done via RPC command. That is why you need to specify the location of the ppcoin.conf if it is not at the standard location.
Without Peercoin client running, an error message “Unable to get Peercoin balance; no response from server” pops up.
With Peercoin client running it changes to a notification “x Peercoins will be sent to y addresses in z transactions. YOur current Peercoin balance is 0. Are you sure.”

I should have tried that before. I’ll change my feature request. This should be enough of a warning…

Is it possible welcome to note these kinds of thoughts directly as an "issue" at the Peershares github?

Certainly. Enhancement requests or questions are welcome there. If it’s something that isn’t relevant, we can always close it out, or add to the ticket with a “will not fix” tag. Keeping track of the tickets there is the easiest way for the developers to see everything in one place, and to then tie those issues to commits.

I don't think in current peershares client it is possible to distribute dividends. How do you get Peercoins that are to be distributed? If there is a way please let me know.

There is. It’s not streamlined yet, and requires a couple of extra steps that I’d like to see go away in the future, but the feature is live today and ready for use. The first thing to understand is that a Peershares address is also paired/bound with a Peercoin address. The Peershares client will interact between the two networks and it will recognize and use funds from the Peercoin address “side” to distribute the dividends.

Here is how you can do it, in the alpha release client:

[ol][li]From your Peershares client, in the menu, select “Export Peercoin keys”[/li]
[li]From your Peercoin client (running on the testnet), import the privkey that you received as output of the previous step[/li]
[li]Once the import process finishes, you’ll have access to the Peercoin address in your Peercoin wallet client.[/li]
[li]Transfer test-peercoins from another address you control into the address you just imported from Peershares (or, have someone else send you (you can visit http://testnet.peercoinfaucet.com/ for coins, if you don’t have any).[/li]
[li]Once that transfer has been confirmed and is available (which should only take six network confirmations), you’ll be able to offer the dividend.[/li]
[li]Back in the Peershares client, from the menu, select “Distribute dividends”[/li]
[li]If the dividend distribution is based on the current list of shareholders, click on the “Get List of Shareholders” button; otherwise, backdate the distribution (which will traverse the block chain and only pick up the addresses that existed at that time) and then click on the button. This will populate the list, below, showing addresses and current holdings.[/li]
[li]Enter the number of peercoins that you’d like to distribute into the text field, and then click “Calculate Dividends”. The list below will update with the amount of peercoins that will be paid out to each shareholder, proportionate to their holdings.[/li]
[li]Click “Ok” in the lower right corner to complete the dividend process and send out the distribution transactions.[/li][/ol]

Great question, and it helped me formally document the process.

I don't understand "Send shares". To my knowledge, this is not a term that is generally used

Does it mean “distribute (or “issue”) shares” (from the organsation to individals)

Or does it mean “transfer shares” (between individals)?

It means “transfer shares (between individuals),” in this case, “send” is probably the wrong verb. If it’s unclear to other people, too, it’s an easy update to make a change to the GUI label. This would not extend to the RPC method names in command line daemon, however. The commands, [font=courier]sendfrom[/font], [font=courier]sendmany[/font], [font=courier]sendtoaddress[/font] would stay the same.

“Send shares” is according to “send xyzCoins” as ownership gets transferred just like in known crypto coin concepts. So it should be known by those who are familiar with that whole crypto coin thingy…
I was talking about “distributing dividends” (menu: shares → dsitribute dividends) as that lead to minor confusion.

The process of issuing shares comes first. The individual Peercoin block chain gets created and initialized with a given number of shares. Then comes the distribution (“send shares”) of the shares according to the invested money.

[quote=“RobertLloyd, post:83, topic:2248”]Or does it mean “transfer shares” (between individals)?

Thanks[/quote]
Shares transfer is one thing (from issuer to new share holders or from share holder to share holder), distributing dividends is another thing (only makes sense: from issuer to share holders!)…

[quote=“Ben, post:85, topic:2248”]

Is it possible welcome to note these kinds of thoughts directly as an “issue” at the Peershares github?

Certainly. Enhancement requests or questions are welcome there. If it’s something that isn’t relevant, we can always close it out, or add to the ticket with a “will not fix” tag. Keeping track of the tickets there is the easiest way for the developers to see everything in one place, and to then tie those issues to commits.[/quote]
great! I’ll do that in the future after performing some more checks to make sure I don’t post only nonsense there^^

[quote=“Ben, post:85, topic:2248”]

I don’t think in current peershares client it is possible to distribute dividends. How do you get Peercoins that are to be distributed? If there is a way please let me know.

There is. It’s not streamlined yet, and requires a couple of extra steps that I’d like to see go away in the future, but the feature is live today and ready for use. The first thing to understand is that a Peershares address is also paired/bound with a Peercoin address. The Peershares client will interact between the two networks and it will recognize and use funds from the Peercoin address “side” to distribute the dividends.

Here is how you can do it, in the alpha release client:
[…][/quote]

What about the RPC controlled distribution of Peercoins as dividends by the Peershares client?
I just requested some testnet PPC and igive that a try. This might be more convenient than to export/import private keys…

[edit]
The 10 testnetPPC arrived in my wallet and I distributed 2 of them as dividends via the Peershares client (no ex-/import of keys!).
It worked like a charm!

Those share holder addresses received dividends:

Peershares Address,Shares,Peercoin Address,Dividend
DtJmPsz7XjqY3TRnNYGzRVkbkXtpA3AgV4,183752270000,mg1RBTXsczSkehSdJgbAjQFkUPFLLR4qv7,0.371141
E1Kv6eqqUz8Rcd7cdiCdu2MjNwKTkRxkRx,100000000000,mo2ZtEPbaEjeDs8TZrWpCvrt6nfyu1hUip,0.201979
E41LGbcPyCPWFTVVt67kQ5pEdSWGTJ2FFQ,9897520000,mqhz4BAA4SzirhWLpERvhzKPMHrng3U34s,0.019991
E89dzcm4gcsCSmiVgTUCZjZAGCbLzmpvue,504518850000,murHnCJpmsUR41jLcbnNse4Jz3ws692zFc,1.019021
EFWefRKhxPtq2BrqPt4eBXkEqQPKMaFrko,192034180000,n3DJSzsU3eW3dRsgL2NpVSFPZFjqWbEf9V,0.387868

and these are the corresponding PPC transactions:

address,amount,ID
"mg1RBTXsczSkehSdJgbAjQFkUPFLLR4qv7","-0.381141","3dcff9e3fae744c50ef2ce58f90f2723771d125742edeecdfec0dea301908287-000"
"mo2ZtEPbaEjeDs8TZrWpCvrt6nfyu1hUip","-0.201979","3dcff9e3fae744c50ef2ce58f90f2723771d125742edeecdfec0dea301908287-001"
"mqhz4BAA4SzirhWLpERvhzKPMHrng3U34s","-0.019991","3dcff9e3fae744c50ef2ce58f90f2723771d125742edeecdfec0dea301908287-002"
"murHnCJpmsUR41jLcbnNse4Jz3ws692zFc","-1.019021","3dcff9e3fae744c50ef2ce58f90f2723771d125742edeecdfec0dea301908287-003"
"n3DJSzsU3eW3dRsgL2NpVSFPZFjqWbEf9V","-0.387868","3dcff9e3fae744c50ef2ce58f90f2723771d125742edeecdfec0dea301908287-004"

[/edit]

What about the RPC controlled distribution of Peercoins as dividends by the Peershares client? I just requested some testnet PPC and igive that a try. This might be more convenient than to export/import private keys...

I’m not sure I’m understanding the use case, or the variation on the use case described above (for the GUI). You can certainly do it through RPC, but you’ll need to have pre-funded the bound Peercoin address somehow. It’s true that you don’t need to import the privkey into your Peercoin client, first – with the address information alone, you can send coins that then can be used for the dividend distribution, but for the distribution to be successful, you will.

If you instructed the faucet to send those testnet peercoins directly to your dividend distribution address, then you’ll still need to let Peershares connect to your Peercoin wallet via RPC to validate that you have the authorization to deduct peercoins for the distribution.

Hopefully we’re describing the same thing. I can outline the steps for doing this from the command line only, using RPC, if anyone is unclear how it would work.

EDIT:

That’s interesting. I suppose it makes sense that it works that way, because the keys are stored in the Peershares client, but I had not really considered doing it that way as a matter of testing. I’ve added that as a test case for the future. Thanks!

@mod, did you have to wait for the testnet faucet transaction to reach six network confirmations before you were able to send out the dividend distribution, or could you do it as soon as it appeared on the network, in an “unconfirmed” state?

[quote=“Ben, post:88, topic:2248”][…]
EDIT:

That’s interesting. I suppose it makes sense that it works that way, because the keys are stored in the Peershares client, but I had not really considered doing it that way as a matter of testing. I’ve added that as a test case for the future. Thanks![/quote]

I’m always good for having strange thoughts^^

One thing that is a biit irritating but - due to the fee structure of Peercoin necessary - if you issue only a small amount of PPC as dividend, small holders (=those with only a little amount of shares) won’t receive any.
I understand that this can be better than wasting a lot of PPC as transactions fees.
But I’ve seen that the PPC transaction must have been executed via “sendmany” to combine lots of receiving addresses in one transaction (because there was only 0.01 PPC fee deducted from the PPC wallet; so it must have been only 1 transaction).
Then again I don’t understand why only big holders received a part of the dividends…

[edit]

I don’t know whether the dividend distribution was executed with completely unconfirmed testnetPPC. But when I looked at the confirmation status it was only 1 confirmation shown and definitely not 6!
Let me test that again once the 30 mintutes is over with some “real fresh testnetPPC” :wink:
I just spent the rest of my testnetPPC for distributing more dividends to make sure I use the new testnetPPC from the faucet.
I’m sooo generous! :smiley:
[/edit]

[edit3]
Trying to distribute dividends in the Peershares client with 0 confirmations for the testnetPPC: “…current balance is 0” followed by an error message if you want to execute the dividend distribution anyway.
So 1 confirmation seems to be the minimum confirmation level the testnetPPC need to have to be used for distributing dividends.
I guess that is like expected.
…but maybe you want to wait for 6 confirmations?
The thing is: once there’s 1 confirmation the testnetPPC get added to the balance, hence they can be used…
[/edit3]

[edit2]
reminder for me to create an issue:
if you change the amount of PPC you want to distribute as dividends and don’t hit “calculate dividends” afterwards ,the initially used calculation is executed when hitting the “ok” button.
That might lead to wrong distribution…
[/edit2]

We will test to see what happens if the peercoins used for a dividend end up on an orphaned chain. We’ll also need to see if we can simulate the affect of a Peercoin network checkpoint rollback (in the very unlikely case it is ever invoked).

I presume it will just back out those dividends, but I’m not sure what it would look like in the UI, or if the transaction lists would be correctly reset/noted so you could understand what had happened.

Just a quick note to confirm I received the 0.25 shares

Funnily enough, the transaction is timed at when I opened the client - is that coincidence, or is the transaction only completed/recorded when I open the client?

that is odd, can you post the tx details?

it might be the time when the client added it to your tx history??

[quote=“Ben, post:85, topic:2248”]

I don’t think in current peershares client it is possible to distribute dividends. How do you get Peercoins that are to be distributed? If there is a way please let me know.

There is. It’s not streamlined yet, and requires a couple of extra steps that I’d like to see go away in the future, but the feature is live today and ready for use. The first thing to understand is that a Peershares address is also paired/bound with a Peercoin address. The Peershares client will interact between the two networks and it will recognize and use funds from the Peercoin address “side” to distribute the dividends.

Here is how you can do it, in the alpha release client:

[ol][li]From your Peershares client, in the menu, select “Export Peercoin keys”[/li]
[li]From your Peercoin client (running on the testnet), import the privkey that you received as output of the previous step[/li]
[li]Once the import process finishes, you’ll have access to the Peercoin address in your Peercoin wallet client.[/li]
[li]Transfer test-peercoins from another address you control into the address you just imported from Peershares (or, have someone else send you (you can visit http://testnet.peercoinfaucet.com/ for coins, if you don’t have any).[/li]
[li]Once that transfer has been confirmed and is available (which should only take six network confirmations), you’ll be able to offer the dividend.[/li]
[li]Back in the Peershares client, from the menu, select “Distribute dividends”[/li]
[li]If the dividend distribution is based on the current list of shareholders, click on the “Get List of Shareholders” button; otherwise, backdate the distribution (which will traverse the block chain and only pick up the addresses that existed at that time) and then click on the button. This will populate the list, below, showing addresses and current holdings.[/li]
[li]Enter the number of peercoins that you’d like to distribute into the text field, and then click “Calculate Dividends”. The list below will update with the amount of peercoins that will be paid out to each shareholder, proportionate to their holdings.[/li]
[li]Click “Ok” in the lower right corner to complete the dividend process and send out the distribution transactions.[/li][/ol]

Great question, and it helped me formally document the process.[/quote]

The steps are not that twisted because I had figured out every step except the last one. I didn’t find a way to see the amount of PPCs ready to be distributed in Peershares client so I didn’t realize after filling the number of peercoins to distribute I could just click OK.

Well here is what I got after clicking OK and confirming

Congratulations! :smiley:

I have in my dividend address in my Peerunity client 0.149977 PPCs which is precisely the amount of dividend I should get myself after distributing 5000 PPCs to every share holder. Well, after the drinking party and morning after hangover, I am wondering who had paid the transaction fee?

I have in my dividend address in my Peerunity client 0.149977 PPCs which is precisely the amount of dividend I should get myself after distributing 5000 PPCs to every share holder. Well, after the drinking party and morning after hangover, I am wondering who had paid the transaction fee?[/quote]

After examine the transaction history in Peerunity, I see the some share holders (see below) didn’t get paid. I guess my dividend address paid transaction fee and ran out of fund before finishing… because I had had exactly 5000PPC in the dividend address before distributing. I think there should be a warning that less than the displayed amount will be distributed to the share holders due to transaction fee.

transactions details by right clicking on the transactions in Peerunity (it doesn;t include the 0.149977 PPC to my own address ) :

mfdxEioMLzN1QwdskF4dfz4sC6A7XqDttT, -0.362211 PPC
mfnUz7S2vLBd5ZeXofDFUXcZZmnS6BLadB, -0.05123 PPC
mg1RBTXsczSkehSdJgbAjQFkUPFLLR4qv7, -918.962123 PPC
mgp1dwm5HpzUZSCG6aAxzJitYVeBaxHDhJ, -0.049981 PPC
mhWutPiDB2T3mg42hVJGKGsDTZxUMCVsiV, -0.032987 PPC
mhhoHy3HmnTHuWq7BumpHYnaAP5SUGz7Mo, -0.012345 PPC
mhj1MkbeURSQJdJbzE6e8GFNakiv1mYTaU, -0.05123 PPC
mk2pkhJtsZK3Gy6tquM5EXQTn89oZZChf4, -0.049981 PPC
mkFDJLJY9GjHAmbCiHy9U5d1map5ecZRPz, -0.05123 PPC
mkUDpX2LcnaLj7Yf3KRVm6uNSUzMnotwES, -0.249904 PPC
mkdYgjPwNyRBYyFVAZpsPqdcP7oZWTUrAp, -0.099962 PPC
mo2ZtEPbaEjeDs8TZrWpCvrt6nfyu1hUip, -499.807614 PPC
mpqeC8epvDsiHhNw9EmVY5nEG65Ly3hWaS, -0.151192 PPC
mqSiS7dybVWj22hcStUhZoa99mw7VyUGoC, -0.041184 PPC
mqhz4BAA4SzirhWLpERvhzKPMHrng3U34s, -48.368782 PPC
mscXj7GVJb2SWLcegq9Cnt1kT3jUHBVv6p, -0.036101 PPC
mtxJbobAkPn5aZipBrjHvr6DtGLRym4jkG, -0.05123 PPC
murHnCJpmsUR41jLcbnNse4Jz3ws692zFc, -2521.650416 PPC
mvrrrJTuwTDeBoFZUywx674p7TXHyw3D1f, -14.981083 PPC
mvyKiaxrajjTeEG71H6DxCzN6yJHwuDABC, -8.124073 PPC
mw9v53RxNKxsz8go2JrrRijFzjGXVyAwh3, -0.05233 PPC
mwL7Kej3ZBStPmXnwRuYmN8uukk64oYR2f, -0.499808 PPC
mwcxMavyvjZrr6Cd71vMZYZjRaxBxQcG19, -0.499808 PPC
mxFZgNBDNjpiaz5gv5zTkyAqox1EeT55Tc, -0.05123 PPC
mzSeufbxCKVD5FJDJuFGWJtsvynWqCmzQK, -0.05123 PPC
n16MZq3nSmyy131GT48ARGjWAV8TbF3Z62, -5.999441 PPC
n1bgxpxQVPDixjmnZyy2hnJcHtuuiwoFDy, -0.151192 PPC
n3DJSzsU3eW3dRsgL2NpVSFPZFjqWbEf9V, -959.812049 PPC
n4TLWzdMF13VPyLjNDZHxPRjRKmoFuGLsU, -19.548076 PPC
tx -0.02 PPC
amount -4999.870023 PPC
txID 7d361b31b6d5e0356c3536cea4a66749cd69a7aa43799d9bddf83e6ab9b32b36

There are some strange/inconsistent things,

  • The Peershares address DswJT… (mfdxE…) should get 0.36PPC divident according to the “calculate dividents” table, and in the transaction details popup window above, but get 0.382211 PPC according to the Trasactions pane of the main window.

  • Apparently shares are calculated and distributed to the 6th digit after the decimal point. Peershares only displays to the second digit after the decimal points, and no share holders whose dividend is less than 0.01 is displayed. This in itself is understandable as a method to save table space, but these share holders’ shares are not 0 to the 6th digit after the decimal point, so they in principle should be listed. It’s not clear if they didn’t get paid because I run out of fund (due to transaction fee) or due to that they were not in the list.

So I will try again. This time I have 10,5000.149977 PPCs in my divident address (those pesky blocks mined on testnet are good for something) and I will distribute 10,0000 of it. 4 share holders have less than 0.01PPC dividends. We will see if they get paid.

After pressing OK, I see Peershares does tell me that it will send dividends to a total of 34 share holders. There are 38 share holders. Peershares doesn’t plan to send dividends to those whose names are not on the calculation list. (Feel sorry for the small share holders especially after 1PPC=$1000 ;D) This is can be seen from transaction details

mfdxEioMLzN1QwdskF4dfz4sC6A7XqDttT -7.244179 PPC
mfnUz7S2vLBd5ZeXofDFUXcZZmnS6BLadB -1.024601 PPC
mg1RBTXsczSkehSdJgbAjQFkUPFLLR4qv7 -18379.161074 PPC
mgp1dwm5HpzUZSCG6aAxzJitYVeBaxHDhJ -0.999611 PPC
mhWutPiDB2T3mg42hVJGKGsDTZxUMCVsiV -0.659743 PPC
mhhoHy3HmnTHuWq7BumpHYnaAP5SUGz7Mo -0.246904 PPC
mhj1MkbeURSQJdJbzE6e8GFNakiv1mYTaU -1.024601 PPC
mioqRNkFqTBWjCS3fDLKPrAQjTnL5hyhCZ -0.019992 PPC
mk2pkhJtsZK3Gy6tquM5EXQTn89oZZChf4 -0.999611 PPC
mkFDJLJY9GjHAmbCiHy9U5d1map5ecZRPz -1.024601 PPC
mkUDpX2LcnaLj7Yf3KRVm6uNSUzMnotwES -4.998054 PPC
mkdYgjPwNyRBYyFVAZpsPqdcP7oZWTUrAp -1.999222 PPC
mknLuEvs4YZVsvNBRuSuunaMiXXwN8UNzY -0.196923 PPC
mo2ZtEPbaEjeDs8TZrWpCvrt6nfyu1hUip -9996.108015 PPC
mpqeC8epvDsiHhNw9EmVY5nEG65Ly3hWaS -3.023823 PPC
mqSiS7dybVWj22hcStUhZoa99mw7VyUGoC -0.823679 PPC
mqhz4BAA4SzirhWLpERvhzKPMHrng3U34s -967.371354 PPC
mscXj7GVJb2SWLcegq9Cnt1kT3jUHBVv6p -0.722019 PPC
mtD33CMqdsa9mFF5ioXtUYzisNzfMSuYCd -0.199922 PPC
mtxJbobAkPn5aZipBrjHvr6DtGLRym4jkG -1.024601 PPC
murHnCJpmsUR41jLcbnNse4Jz3ws692zFc -50432.784995 PPC
mvrrrJTuwTDeBoFZUywx674p7TXHyw3D1f -299.620343 PPC
mvyKiaxrajjTeEG71H6DxCzN6yJHwuDABC -162.480738 PPC
mw9v53RxNKxsz8go2JrrRijFzjGXVyAwh3 -1.046593 PPC
mwL7Kej3ZBStPmXnwRuYmN8uukk64oYR2f -9.996108 PPC
mwcxMavyvjZrr6Cd71vMZYZjRaxBxQcG19 -9.996108 PPC
mxFZgNBDNjpiaz5gv5zTkyAqox1EeT55Tc -1.024601 PPC
mzSeufbxCKVD5FJDJuFGWJtsvynWqCmzQK -1.024601 PPC
mzxhjqkirUnD5muaF6JaVCgU2Vx1zLsrYG -0.02599 PPC
n16MZq3nSmyy131GT48ARGjWAV8TbF3Z62 -119.988283 PPC
n1bgxpxQVPDixjmnZyy2hnJcHtuuiwoFDy -3.023823 PPC
n3DJSzsU3eW3dRsgL2NpVSFPZFjqWbEf9V -19196.155977 PPC
n4TLWzdMF13VPyLjNDZHxPRjRKmoFuGLsU -390.95978 PPC
tx fee -0.03 PPC
amount -99997.030469 PPC
txID e2fe6c236ec152e7ea37d730972229f8f3d0681499b6d24335d4a9a5668016ce

Including the 2.999532 PPC to my own address, totally sent is 10,000.00000 PPC. No one got more than calculated.

In my last test, I couldn’t explain why the address DswJT… (appeared at the top of the list, having the least dividend amount) had an extra 0.02. It should 0.02PPC less because that would explain who paid the tx in the first test.

Can the owner of Dw7BdoCVkCaJ7xRCj5295wfG1cRox3CfFv ( mfdxEioMLzN1QwdskF4dfz4sC6A7XqDttT ) tell us how much did the address receive in the first test? 0.382211 or 0.362211 (or 0.342211 as I suspect) ?

A few notes:

The fee is paid by the distributor. So you must have a little more peercoins than what you send as dividends.
Estimating the fee to deduce it from the distributed amount cannot be done reliably so this is considered an extra cost.

You have the details of the distribution in testnet/debug.log. You should have enough data to send the transaction again manually if something went wrong.

The transactions are not displayed very well in the peercoin wallet when there are multiple source and targets, and when you send coins to yourself.

It’d be good if we had a Peercoin testnet explorer.

Thanks. I looked up the debug.log and saw that the amount to be 0.362211.

In both cases the transaction fee weren’t paid from the PPC account associated with peershares.

The transactions are not displayed very well in the peercoin wallet when there are multiple source and targets, and when you send coins to yourself.

In the first test the display was plain wrong for the last one in the list.

It'd be good if we had a Peercoin testnet explorer.

Yes I was thinking of the same thing.