# CIP: XCP Dividends for PoS voting

**URL:** <https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895>\
**Category:** Counterparty\
**Created:** [March 16, 2016, 1:51pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895 "2016-03-16T13:51:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 16, 2016, 1:51pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/1 "2016-03-16T13:51:04Z")

</div>

With the lack of PoW ‘voting’ by miners there’s no good way to reach / poll for consensus on changes to the protocol that aren’t completely uncontroversial.  
The Counterparty Devs should be able to issue tokens for voting to all XCP holders to initiate a vote (for example for a protocol change).

Being able to let all XCP owners vote on a particular issue by sending out a voting token and providing a list of addresses to send the token to can be very useful to poll the consensus / desire of the community.

The votes done with these tokens are not part of this CIP and the initial intention is not to have other protocol changes activate automatically based on these votes, though that could be a future CIP if there’s a reason to do so.

We will re-enable (it has been disabled in the past) sending dividends to XCP holders, but only when the source is a multisig address consisting of keys held by group of devs / board members.

Asuming the CIP is OK, the list of key holders would have to be determined by the community, to avoid unneccesary updates with key changes it’s important that the holders are active and most likely remain active in the community.

Named it CIP-0004 for now, but this is unofficial until after community discussion, feel free to submit patches against my repo:

> <https://github.com/rubensayshi/cips/blob/cip-0004/cip-0004.md>

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [March 16, 2016, 1:57pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/2 "2016-03-16T13:57:37Z")

</div>

I like the idea of specifying some governance for the Counterparty project.

Some questions that come to mind immediately are:

How do we determine the initial key holders? (Probably the original founders).

Will these key holders change over time? What is the process for that?

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 16, 2016, 2:22pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/3 "2016-03-16T14:22:15Z")

</div>

It’s a good idea and I like it from a **pragmatic** point of view. However, won’t a special privilege for a few addresses lead to bad PR? Some are very obsessed with decentralization.

Alternative ways to arrange a vote are

- Send vote tokens to every address with \>= 1 XCP. That’s currently 3534 addresses, which will cost ~$200 in fees.
- Vote by broadcast. Votes count proportional to XCP balances at a specific block. This worked well for the CP Foundation election.

> [@rubensayshi](#):
>
> the initial intention is not to have other protocol changes activate automatically based on these votes, though that could be a future CIP if there’s a reason to do so.

I’m glad you mention this. Obviously it’s complex and for the future, but having some key parameters set automatically by votes would be very beneficial. The asset issuance fee could be set by votes. It would be good for smart contract limits too, I guess.

–  
**EDIT:** Maybe the best solution would be to enable dividend to XCP holders for everyone, with a high XCP fee?

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 16, 2016, 2:31pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/4 "2016-03-16T14:31:58Z")

</div>

I agree that the idea of someone having some form of extra control isn’t amazing, but it’s very minor and I personally wouldn’t mind.

I think ‘manually’ sending the token to each XCP holder through singular transactions is too costly and it will only increase.

voting by broadcast and counting proportional to the XCP balances would be a good option too!  
however how would we initiate a vote?  
and would the software counting the votes (and freezing the balances when the voting period starts) then be a small seperate script?

we could maybe build into counterwallet an easy UI with list of active votes and you can cast a vote through a broadcast from there (easy to update to, doesn’t require any1 other than Robby to update)?

other wallets could easily add the same feature into the UI of their wallet and the maintainer of the wallet would be responsible for updating the list of active votes.

and make a small script that allows everyone to reproduce the counting of the votes.

what we want to avoid I think at all costs is allowing anyone to initiate a vote because it allows for advertisment / spam (see related; [https://github.com/CounterpartyXCP/counterparty-lib/issues/350](https://github.com/CounterpartyXCP/counterparty-lib/issues/350) [https://github.com/CounterpartyXCP/counterparty-lib/issues/254](https://github.com/CounterpartyXCP/counterparty-lib/issues/254))

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 16, 2016, 2:37pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/5 "2016-03-16T14:37:42Z")

</div>

Blockscan did the counting for the foundation election.  
[http://blockscan.com/vote/XCPELECTION](http://blockscan.com/vote/XCPELECTION)

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 16, 2016, 2:48pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/6 "2016-03-16T14:48:06Z")

</div>

I thought the disabling of XCP dividends was done after the board election and that the board election still used it, good to know it the actual facts 😃

I could add something to counterparty-lib that tracks votes based on contents of a broadcast, for example:  
broadcast `text=INITVOTE XCPELECTION XCP 4000`  
would initiate a vote for all XCP holders within the next 4000 blocks called ‘XCPELECTION’ and store a list of frozen XCP balances at the height of this broadcast.

and then anyone can broadcast `text=DOVOTE XCPELECTION` to cast their vote and counterparty-cli can display a list of votes with their XCP weight taken into account.

that way everyone can list all current votes going on and their results and anyone can initiate a vote.  
as a result if you list the votes there might be some spam … but because it’s not with actual tokens it’s less obnoxious.  
and a wallet could list all open votes or a subset that’s hardcoded into the wallet itself (again moving the responsibility to the wallet to choose which votes to display or not instead of baking it into the protocol).

I head you liked metaprotocols? so I put a metaprotocol in your metaprotocol?

hmm for my information; if someone LOCKs his broadcast feed he’s never able to broadcast anything ever again right?

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [March 16, 2016, 4:02pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/7 "2016-03-16T16:02:54Z")

</div>

> [@rubensayshi](#):
>
> hmm for my information; if someone LOCKs his broadcast feed he’s never able to broadcast anything ever again right?

I think once a positive value is broadcast, that broadcast feed is closed, but a new broadcast can be initiated from the same address, using a negative value.

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 16, 2016, 4:28pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/8 "2016-03-16T16:28:06Z")

</div>

> [@rubensayshi](#):
>
> hmm for my information; if someone LOCKs his broadcast feed he’s never able to broadcast anything ever again right?

I’m testing it now. WiIll update here as soon as i find out

**RESULT:** An address with locked feed can still broadcast messages and values. The ‘lock’ only prevents the values from resolving bets, I suppose. [Explore Decentralized Web](http://blockscan.com/feedinfo?q=11862787)

---

<div class="post-metadata">

**Author:** ![loon3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/loon3/32/1018_2.png) [@loon3](https://forums.counterparty.io/u/loon3)\
**Post date:** [March 16, 2016, 6:25pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/9 "2016-03-16T18:25:53Z")

</div>

Why build into the protocol? I don’t remember there being any issues voting via broadcast for the community director positions. We could expand the URI schema CIP ([https://github.com/tokenly/cips/blob/master/cip-0002.md](https://github.com/tokenly/cips/blob/master/cip-0002.md)) to include broadcast voting to set a standard for wallets to use.

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 17, 2016, 11:27am UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/10 "2016-03-17T11:27:27Z")

</div>

okay, so broadcasts seem to be preferred.

however as soon as a LOCK broadcast is send no futher broadcasts will ever be proccessed / accepted, which would lock someone out of being able to vote…

would you guys want with some code in counterparty-lib/client to parse vote broadcast msgs and be able to list them?  
or you guys feel it should only be a seperate script and only some additions to counterwallet?

the hard part is freezing the balances at the moment the vote is initiated and make sure other ppl can (easily) reproduce that, for a seperate script that would require someone to reparse the blockchain up to a particular block and then query the balances, when it’s integrated into counterparty-cli/lib it can do that automagically.  
however the disadvantage is that you could have a big list of different votes going on because ppl use it to spam …

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 17, 2016, 11:54am UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/11 "2016-03-17T11:54:04Z")

</div>

> [@rubensayshi](#):
>
> as soon as a LOCK broadcast is send no futher broadcasts will ever be proccessed / accepted, which would lock someone out of being able to vote…

[This broadcast](http://blockscan.com/feedinfo?q=11862787) was sent after the address was locked. The message and value still shows up. LOCK only locks bet settlement, not the broadcast itself.

However, an issue with voting through broadcasts is that active oracles will settle bets unless the value is less than -3, in which case the value does not influence any bet. This concern is negligible though. There are no active oracles and an oracle does not need to hold XCP anyway.

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 17, 2016, 12:00pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/12 "2016-03-17T12:00:03Z")

</div>

hmm, it’s marked “Status: invalid: locked feed”, but if we’d ignore that, how did you manage to do that?  
because `broadcast.compose` requires `broadcast.validate` to return no errors and it does … ?

> <https://github.com/CounterpartyXCP/counterparty-lib/blob/master/counterpartylib/lib/messages/broadcast.py#L90>

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 17, 2016, 12:40pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/13 "2016-03-17T12:40:07Z")

</div>

This is the LOCK broadcast : [http://blockscan.com/txInfo/11862784](http://blockscan.com/txInfo/11862784)  
The is a later broadcast : [http://blockscan.com/feedinfo?q=11862787](http://blockscan.com/feedinfo?q=11862787)

For the latter, Blockscan shows  
`Text: test - am i still able to broadcast? Value: 1 Status: invalid: locked feed`

Counterpartychain also shows the message and value  
[https://counterpartychain.io/broadcasts/1Ch9trfp2ULuPxnU81cA3TDvW17L8YRw6r](https://counterpartychain.io/broadcasts/1Ch9trfp2ULuPxnU81cA3TDvW17L8YRw6r)

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 17, 2016, 12:45pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/14 "2016-03-17T12:45:10Z")

</div>

yea, once broadcast it ‘works’ (just shows as invalid) but how did you manage to broadcast it? it won’t let me broadcast because the `validate` fails

---

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [March 17, 2016, 12:54pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/15 "2016-03-17T12:54:20Z")

</div>

I use CounterTools.  
Maybe it’s your client that won’t let you broadcast from a locked address?  
I think initially the devs designed broadcasts for oracles/feeds. Lately it’s being used for everything except feeds 😃

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 17, 2016, 1:25pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/16 "2016-03-17T13:25:04Z")

</div>

yea, counterparty-client / counterwallet won’t let me, and it shouldn’t because the broadcast is invalid …

the only reason it shows up is because we store invalid messages (sends, broadcasts) for (to me unknown) reasons too, but it’s definetely not considered valid.

My node is reparsing, but I’m curious if the LOCK functionality is used for anything other than bets or if the code should be updated to specifically only LOCK the feed for betting…?

but we’re getting off-topic; I’ll create a new topic for discussing the LOCK stuff cause either I’m missing something or something isn’t right here!

**back on-topic;**

would you guys want with some code in counterparty-lib/client to parse vote broadcast msgs and be able to list them?  
or you guys feel it should only be a seperate script and only some additions to counterwallet?

the hard part is freezing the balances at the moment the vote is initiated and make sure other ppl can (easily) reproduce that, for a seperate script that would require someone to reparse the blockchain up to a particular block and then query the balances, when it’s integrated into counterparty-cli/lib it can do that automagically.  
however the disadvantage is that you could have a big list of different votes going on because ppl use it to spam …

---

<div class="post-metadata">

**Author:** ![loon3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/loon3/32/1018_2.png) [@loon3](https://forums.counterparty.io/u/loon3)\
**Post date:** [March 17, 2016, 4:02pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/17 "2016-03-17T16:02:40Z")

</div>

Storing invalid txs happens with dex tx types too, I think that should probably be addressed first. Not really sure why they’re stored at all except for maybe testing purposes.

Regarding freezing the balances at a particular block, you could query the balances, debits and credits tables to determine the asset balance at a particular address at any given block. No need to reparse the blockchain. That could even be written into an API call with address, asset and block as the inputs.

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [March 19, 2016, 7:21pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/18 "2016-03-19T19:21:32Z")

</div>

> [@rubensayshi](#):
>
> I think ‘manually’ sending the token to each XCP holder through singular transactions is too costly and it will only increase.

Could sidechains or some other approach that’s on the horizon make that cheaper?

> would you guys want with some code in counterparty-lib/client to parse vote broadcast msgs and be able to list them?

That seems better to me.

---

<div class="post-metadata">

**Author:** ![rubensayshi](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@rubensayshi](https://forums.counterparty.io/u/rubensayshi)\
**Post date:** [March 20, 2016, 12:23pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/19 "2016-03-20T12:23:09Z")

</div>

I think betting on sidechains is a bit long term xD

It’s not a whole lot of work to build it into counterparty-lib/client, the question is if people are OK with building it into it or would prefer to see it as a seperate script that requires some manual config to get the voting results.  
Regardless of the above choice I’d build the voting part into counterwallet.

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [March 21, 2016, 1:05am UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/20 "2016-03-21T01:05:46Z")

</div>

> [@rubensayshi](#):
>
> would prefer to see it as a seperate script that requires some manual config to get the voting results.

It seems easier to have this built in so that there’s a way for everyone to do a check (specifically related to the state of token ownership at a point in time) on their own.

Actually - now that I mention it - it would be nice to provide a way to get token distribution by address at a point in time (or at given block height) as part of this command. Where this came up several times was people would - technical difficulties or other - not pay out dividend on time and there’s no easy way for them to tell what was the status in the past. I think various voting would also require that users be able to not only determine, but also display at will, who was _supposed_ to have the right to vote and how many votes - vote auditing of sorts. Today if you have a token-holder meeting and everyone lists holding addresses, it’s easy to agree who was supposed to vote and broadcast a hash of the list of addresses.  
But if you finish the meeting and want to see who owned what just before the meeting begun (to prevent front-running of meeting conclusions for example), it is not easy. Also you may need to send voting tokens (or announce qualified broadcast addresses) to the holders at the time before the meeting started, which may be different from the current list.  
One part that bothers me a bit is that there is no good way to eliminate stock exchange holdings, but I guess who wants to vote may need to withdraw their tokens to a controlled address if they want to be able to vote.

Edit: I am thinking about the equivalent of “SELECT address FROM balances WHERE asset=‘LTBCOIN’ AND block\_height=‘390000’” which isn’t possible to do in a straightforward way in SQLite either.

[Next page](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895.md?page=2)
