Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Working-Stake
by
SebastianJu
on 02/07/2015, 10:21:04 UTC
Thanks, looks like i understood the orphan thing correctly then.

Youre numbers might be right and it might be, that the one who only got 2 orphans for 50 good ones, was connecte to jd directly. Though was able to propagate practically instantly and jd had to confirm that block before jd could orphan it by creating its own.

Though i wonder how blocks are found at all. It sounds like calculating like with bitcoin but its not the case. I heard its random but that doesnt account for how orphaned blocks can happen then. You dont need to explain when you think i should investigate myself. Wink

Then why do you earn more on jd?

As BAC said, it's to do with the orphaning.

CLAM divides time into blocks of 16 seconds. You only get to check for opportunities to stake each 16 seconds. Let's say there are 4 of these blocks per minute (it's close).

We aim to set the difficulty such that a block is found once per minute. That means that there's about a 25% chance of a block being found by someone in any particular 16 second time slot. If you (solo staking) and JD both find a block in the same time slot, you will start trying to build on top of your block, and JD will try to build on top of its block. The rest of the network will try to build on top of which ever one of the two they heard about first.

So when we both find blocks in the same time slot, if JD has 75% of the staking weight, it has a 75% chance of building on top of its block and orphaning yours. Of course there's a chance that the JD block gets orphaned too. If you solo-stake, find a block at the same time as JD and then stake again shortly after, or one of the peers who saw your block before he saw the JD block stakes next, he'll build on top of your block not JD's.

I've attempted to do some back-of-an-envelope calculations to determine what that means it real terms, and came up with a number like 14% orphan rate I think (*). Someone posted recently saying that they tried solo-staking and only got 2 orphans out of 50 or so blocks they staked, so maybe 14% is too high.

Basically if the orphan rate inflicted by JD is higher than the commission charged by JD, then you would make more staking at JD than solo staking. But we don't have a good number for that orphan rate.

Here's a list of the blocks that JD's staking wallet found recently which ended up being orphaned. Only one on 28th, 5 on 29th, 10 on 30th, 5 on 1st. So you can see there's a lot of variance:

Quote
2015-06-27 01:59:59 REORGANIZE: Disconnect 1 blocks
2015-06-27 01:59:59 stake -1.0006 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-27 01:59:59 SetBestChain: height=529060

2015-06-27 04:50:58 REORGANIZE: Disconnect 1 blocks
2015-06-27 04:50:58 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-27 04:50:58 SetBestChain: height=529239

2015-06-28 10:06:06 REORGANIZE: Disconnect 1 blocks
2015-06-28 10:06:06 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-28 10:06:06 SetBestChain: height=530977

2015-06-29 00:41:17 REORGANIZE: Disconnect 2 blocks
2015-06-29 00:41:17 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-29 00:41:17 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-29 00:41:17 SetBestChain: height=531838

2015-06-29 07:57:41 REORGANIZE: Disconnect 1 blocks
2015-06-29 07:57:41 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-29 07:57:42 SetBestChain: height=532279

2015-06-29 20:13:13 REORGANIZE: Disconnect 1 blocks
2015-06-29 20:13:13 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-29 20:13:13 SetBestChain: height=533008

2015-06-29 20:42:23 REORGANIZE: Disconnect 1 blocks
2015-06-29 20:42:23 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-29 20:42:23 SetBestChain: height=533040

2015-06-30 00:01:18 REORGANIZE: Disconnect 1 blocks
2015-06-30 00:01:18 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 00:01:18 SetBestChain: height=533233

2015-06-30 01:56:36 REORGANIZE: Disconnect 1 blocks
2015-06-30 01:56:36 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 01:56:36 SetBestChain: height=533344

2015-06-30 02:45:01 REORGANIZE: Disconnect 2 blocks
2015-06-30 02:45:02 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 02:45:03 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 02:45:03 SetBestChain: height=533386

2015-06-30 10:41:39 REORGANIZE: Disconnect 1 blocks
2015-06-30 10:41:39 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 10:41:39 SetBestChain: height=533862

2015-06-30 12:05:11 REORGANIZE: Disconnect 1 blocks
2015-06-30 12:05:27 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 12:05:27 SetBestChain: height=533951

2015-06-30 12:16:35 REORGANIZE: Disconnect 1 blocks
2015-06-30 12:16:35 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 12:16:36 SetBestChain: height=533963

2015-06-30 13:23:03 REORGANIZE: Disconnect 1 blocks
2015-06-30 13:23:03 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 13:23:03 SetBestChain: height=534035

2015-06-30 19:28:52 REORGANIZE: Disconnect 2 blocks
2015-06-30 19:28:52 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 19:28:52 stake -1.0002 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-06-30 19:28:52 SetBestChain: height=534386

2015-07-01 00:04:51 REORGANIZE: Disconnect 1 blocks
2015-07-01 00:05:13 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-07-01 00:05:13 SetBestChain: height=534665

2015-07-01 06:15:17 REORGANIZE: Disconnect 1 blocks
2015-07-01 06:15:17 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-07-01 06:15:18 SetBestChain: height=535032

2015-07-01 07:15:20 REORGANIZE: Disconnect 1 blocks
2015-07-01 07:15:21 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-07-01 07:15:21 SetBestChain: height=535090

2015-07-01 09:31:04 REORGANIZE: Disconnect 1 blocks
2015-07-01 09:31:04 stake -1.00 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-07-01 09:31:04 SetBestChain: height=535213

2015-07-01 23:50:14 REORGANIZE: Disconnect 1 blocks
2015-07-01 23:50:14 stake -1.0001 for xJDCLAMZsZg1YqGytiP9CRzYYdsrJXX9Kh
2015-07-01 23:50:14 SetBestChain: height=536081

Edit: I've not checked, but it's quite possible that most of these orphaned blocks were orphaned by JD's hot wallet. They run completely separately, and don't "go easy" on each other. They're competing with each other for stakes just like every other wallet is.

(*) Suppose JD has 75% of the stake weight, and that there are 4 16-second blocks per minute. Suppose you are solo staking. Suppose you just staked a block. There is a 1/4 probability that someone else staked in the same 16-second period (1 in the 4 windows per minute). And there is a 3/4 probability that it was JD. So there's a 3/16 probability that JD stakes at the same time as you when you stake. To orphan your block, JD would also have to stake the next block. That's also a 3/4 probability (JD has 3/4 of the stake weight). So for each block you stake, there's a (3/16)*(3/4) = 9/64 = 14.0625% that JD will orphan it. That was how I got the 14% figure, but I don't know whether my reasoning is valid or not. I'm not taking a bunch of things into account, like the chance of you orphaning a JD block, or the change of us both finding the next block in the same time period as well.