# 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:** 2\
**Page:** 2

<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 21, 2016, 4:11pm UTC](https://forums.counterparty.io/t/cip-xcp-dividends-for-pos-voting/1895/21 "2016-03-21T16:11:21Z")

</div>

> [@something](#):
>
> 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.

I mentioned how to do this in my previous reply, wrote a quick script to demonstrate…

[http://joelooney.org/xcp-wallet/pastbalance.php?addr=15ZiVuWWVbEGzeukANouKG85K5gUnoJ42n&block=398640&asset=XCP](http://joelooney.org/xcp-wallet/pastbalance.php?addr=15ZiVuWWVbEGzeukANouKG85K5gUnoJ42n&block=398640&asset=XCP)

```
header("Access-Control-Allow-Origin: *");
header('Content-Type: application/json');

require 'Client.php';
use JsonRPC\Client;

$client = new Client('http://public.coindaddy.io:4000/api/');
$client->authentication('rpc', '1234');

$addresses = array($_GET["addr"]);
$assets = array($_GET["asset"]);
$block = $_GET["block"];

$filters = array(array('field' => 'address', 'op' => 'IN', 'value' => $addresses), array('field' => 'asset', 'op' => 'IN', 'value' => $assets));

$balances_result = $client->execute('get_balances', array('filters' => $filters, 'filterop' => "AND", 'start_block' => $block));
$credits_result = $client->execute('get_credits', array('filters' => $filters, 'filterop' => "AND", 'start_block' => $block));
$debits_result = $client->execute('get_debits', array('filters' => $filters, 'filterop' => "AND", 'start_block' => $block));
$current_bal = $balances_result[0]["quantity"];

$total_credits = 0;
$total_debits = 0;
foreach ($credits_result as $key => $value) {$total_credits += $value["quantity"];}
foreach ($debits_result as $key => $value) {$total_debits += $value["quantity"];}

$past_bal = $current_bal - $total_credits + $total_debits;

$result = array('asset' => $assets[0], 'current_balance' => $current_bal, 'past_block'=> $block, 'total_credits_since_past_block' => $total_credits, 'total_debits_since_past_block' => $total_debits, 'past_balance' => $past_bal);

echo json_encode($result);

```

---

<div class="post-metadata">

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

</div>

IMO - Voting like this is a bad idea.

There is nothing keeping people from commenting on a CIP or in any other number of forums. You don’t want to inject “democracy” here.

I suspect the kinds of people who would bother to do any voting are the exact same people who already are active in the discussion right now. And I expect a lot of those people are large holders of XCP. So, this would ultimately just give the larger holders more say and veto power. I don’t think this will have the outcome you desire or well I’m not sure what you desire.

What’s the contentious thing you’d like to change that this CIP would help you achieve in a “non-contentious” way?

Good luck. I won’t be voting, of course, as I hold no XCP.

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