-
Notifications
You must be signed in to change notification settings - Fork 8
Reduction of coins
Shall the total sum of promised amount become less than the Dcoin volume of a particular currency, or shall miners vote to decrease the coin volume, all nodes become ready to accept the new_reduction transaction. And as soon as it is added to the next block all local nodes’ databases send the following sql-requests
UPDATE `wallets` SET `amount` =`amount` * {$k} WHERE `currency_id` = {$currency_id}and
UPDATE `promised_amount` SET `tdc_amount` = `tdc_amount` * {$k} WHERE `currency_id` = {$currency_id}where $k = (100 - $pct) / 100;
If the sum of promised amounts is below the Dcoin volume of a particular currency, new_reduction with 10% for such currency is launched. At that, if situation doesn’t change within 2 days, another 10% reduction takes place. This repeats until the sum of promised amounts exceeds the Dcoin volume.
Request to determine the Dcoin volume:
SELECT SUM (`tdc_amount`) + (SELECT SUM (`amount`) FROM `wallets` WHERE` currency_id` = {$currency}) FROM `promised_amount` WHERE `currency_id` = {$currency}Request to determine the sum of promised amounts:
SELECT sum (`amount`) FROM `promised_amount` WHERE `status` = 'mining' AND `del_block_id` = 0 AND `del_mining_block_id` = 0 AND `currency_id` = {$currency} AND (`cash_request_out_time` = 0 OR `cash_request_out_time`> " . (time () - $this-> variables['cash_request_time']) . ")«Other» -> «Statistics» cabinet shows the total amount of Dcoins and the sum of promised amounts.
Shall 50% of miners that have such a currency in their promised amount vote to decrease its volume, in such a case the new_reduction, transaction launches, which specifies a percentage voted for by the majority. Number of votes is stored in the votes_reduction table.