Permalink
Browse files

Add committee supply fund in process_funds.

Add inflation define STEEM_COMMITTEE_FUND_PERCENT in protocol config.
Issue: #1
  • Loading branch information...
On1x committed Apr 4, 2018
1 parent 27f56b5 commit 1760da1043924e66d4e76959597b80eefd5cd37b
Showing with 6 additions and 2 deletions.
  1. +5 −2 libraries/chain/database.cpp
  2. +1 −0 libraries/protocol/include/steem/protocol/config.hpp
@@ -1844,7 +1844,8 @@ void database::process_funds()
if( has_hardfork( STEEM_HARDFORK_0_17__774 ) )
content_reward = pay_reward_funds( content_reward ); /// 75% to content creator
auto vesting_reward = ( new_steem * STEEM_VESTING_FUND_PERCENT ) / STEEM_100_PERCENT; /// 15% to vesting fund
auto witness_reward = new_steem - content_reward - vesting_reward; /// Remaining 10% to witness pay
auto committee_reward = ( new_steem * STEEM_COMMITTEE_FUND_PERCENT ) / STEEMIT_100_PERCENT;
auto witness_reward = new_steem - content_reward - vesting_reward - committee_reward; /// Remaining 10% to witness pay

const auto& cwit = get_witness( props.current_witness );
witness_reward *= STEEM_MAX_WITNESSES;
@@ -1860,11 +1861,12 @@ void database::process_funds()

witness_reward /= wso.witness_pay_normalization_factor;

new_steem = content_reward + vesting_reward + witness_reward;
new_steem = content_reward + vesting_reward + committee_reward + witness_reward;

modify( props, [&]( dynamic_global_property_object& p )
{
p.total_vesting_fund_steem += asset( vesting_reward, STEEM_SYMBOL );
p.committee_supply += asset( committee_reward, STEEM_SYMBOL );
if( !has_hardfork( STEEM_HARDFORK_0_17__774 ) )
p.total_reward_fund_steem += asset( content_reward, STEEM_SYMBOL );
p.current_supply += asset( new_steem, STEEM_SYMBOL );
@@ -2483,6 +2485,7 @@ void database::init_genesis( uint64_t init_supply )
p.time = STEEM_GENESIS_TIME;
p.recent_slots_filled = fc::uint128::max_value();
p.participation_count = 128;
p.committee_supply = asset( 0, STEEM_SYMBOL );
p.current_supply = asset( init_supply, STEEM_SYMBOL );
p.virtual_supply = p.current_supply;
p.maximum_block_size = STEEM_MAX_BLOCK_SIZE;
@@ -128,6 +128,7 @@
#define STEEM_INFLATION_NARROWING_PERIOD (250000) // Narrow 0.01% every 250k blocks
#define STEEM_CONTENT_REWARD_PERCENT (75*STEEM_1_PERCENT) //75% of inflation, 7.125% inflation
#define STEEM_VESTING_FUND_PERCENT (15*STEEM_1_PERCENT) //15% of inflation, 1.425% inflation
#define STEEM_COMMITTEE_FUND_PERCENT (15*STEEM_1_PERCENT)

#define STEEM_MINER_PAY_PERCENT (STEEM_1_PERCENT) // 1%
#define STEEM_MAX_RATION_DECAY_RATE (1000000)

0 comments on commit 1760da1

Please sign in to comment.