Value of my currency?

+2 votes
Hello,
As far as I know, bitcoins are revalued according to the number of people who use them.
But how can I see, the value of my currency? Can it only be through an exchange?

thanks you.
asked Mar 11, 2018 by javi

2 Answers

0 votes
Like any asset, bitcoins are valued according to what the market is willing to pay for them, i.e. the place where supply meets demand. It's the same for any other currency as well.
answered Mar 12, 2018 by MultiChain
I understand that the value of the cryptocurrency is:

the total of existing currencies / currencies in circulation

I can find the total coins with getbalance ()
But I do not know how to find the coins in circulation.

That is what I meant.
thanks, best regard.
OK, understood. The node doesn't currently give you that information, but you can calculate it in the following way:

complete-blocks = [set to current block number]
complete-epochs = floor((complete-blocks+1) / reward-halving-interval)

total-issued=initial-block-reward * reward-halving-interval * (1-(0.5^complete-epochs)) * 2 +
initial-block-reward * (0.5^complete-epochs) * (complete-blocks - (complete-epochs * reward-halving-interval) + 1)

if first-block-reward is not -1, then add (first-block-reward - initial-block-reward) to adjust for first block

finally, divide everything by native-currency-multiple
Thanks for the prompt response.
But I'm afraid I need a little more help.
I attached the code in php that he used to check that all the concepts are correct:


$balance=$bitcoin->getbalance(); $arr=$bitcoin->getinfo(); $blocks=$arr["blocks"];
/**
params.dat
first-block-reward = 10000000000000
initial-block-reward = 10000000000000
reward-halving-interval = 52560000
*/

$completeblocks = $blocks;
$completeepochs = floor(($completeblocks+1) / 52560000);
$totalissued=10000000000000 * 52560000 * (1-(0.5^$completeepochs)) * 2 + 10000000000000 *
(0.5^$completeepochs) * ($completeblocks - ($completeepochs * 52560000) + 1);

echo $totalissued."<br>";
echo $balance/$totalissued."<--value??<br>";
I used ^ as mathematical notation. The PHP equivalent of a^b is pow(a,b).
Thank you,
But the rest would be correct?
because my result is very low: 6.5300734221874E-9
thanks you.
What is your $blocks value? And can you show the value of $completeepochs?
Hello,
I have finally created another blockchain with the following parameters:

$firstblockreward = 20;
$initialblockreward = 10;
$rewardhalvinginterval = 52560000;
$nativecurrencymultiple = 100000000;

and I do the following operations:

$completeblocks = $blocks;
$initialfirstblockreward=$firstblockreward-$initialblockreward;
$completeepochs = floor(($completeblocks+1) / $rewardhalvinginterval);

$totalissued=$initialfirstblockreward * $rewardhalvinginterval * (1-(pow(0.5,$completeepochs))) * 2 + $initialfirstblockreward *                (pow(0.5,$completeepochs)) * ($completeblocks - ($completeepochs * $rewardhalvinginterval) + 1);

as a result I get:

83<-blocks
840<--totalissued
8.4E-6<--value

Please tell me if in any operation I was wrong.
And the final result would be in dollars, I suppose?

Thanks you.
Your calculation applied the adjustment for the first block incorrectly, but this is only a minor difference. Apart from that it's right. You might want to use a larger value for the first and initial block rewards, because these are express in raw integer units, and will be divided by native-currency-multiple to give display values.
0 votes

Version 1.0.5 of MultiChain has just been released, adding a chainrewards field to the getblockchaininfo API to provide the total quantity of native currency issued on the blockchain so far.

answered Jun 7, 2018 by MultiChain
...