CIP: XCP Dividends for PoS voting

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

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);
1 Like

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.