Update 7-12-18:
Dan's changes | A Three Step Plan for Lowering EOS Account Creation Costs:
Code updates | https://github.com/EOSIO/eosio.contracts/pull/9
- Added setramrate to eosio.system/abi/eosio.system.abi at 50% CW, recommends adding 1KB per block or 64GB growth/year
- Hard coded 0 as how many bytes to add, so this let's the community decide.
-
struct eosio_global_state2 {
+ eosio_global_state2(){}
+
+ uint16_t new_ram_per_block = 0; // here
+ block_timestamp last_ram_increase;
+ block_timestamp last_block_num;
+ uint8_t revision = 0; ///< used to track version updates in the future.
+
+
+ EOSLIB_SERIALIZE( eosio_global_state2, (new_ram_per_block)(last_ram_increase)(last_block_num)(revision) )
+ };
-
/**
+ * Increase or decrease the amount of ram for sale based upon the change in max
+ * ram size.
+ */
+ _rammarket.modify( itr, 0, [&]( auto& m ) {
+ m.base.balance.amount += new_ram;
+ m.base.weight = 500; // 50%
+ m.quote.weight = 500; // 50%
+ });
+ _gstate2.last_ram_increase = _gstate2.last_block_num;
+ }
Other updates:
- only 1.5KB bytes are required for each new account
- 64 GB / 1.5KB = 42.6M total possible eos accounts not accounting for other smart contracts' shared needs for RAM. At a 64GB / year growth rate, we could also say that 42.6M accounts worth of RAM is created / year
- Block.one will be able to offer a free EOS account to unique users of our iOS wallet.
If you look at the system contract, you can see where the RAMCORE token is created then the RAM token is set to the total outstanding RAM supply then the EOS total supply is added as the quote balance, so ~1M EOS.
Was this m.quote.balance.amount
of EOS just created and added to the total EOS token supply as inflation at the inception of the network? I'm curious about this as it relates to the barrier to entry of using the algorithm for a dapp's token supply.
if( itr == _rammarket.end() ) {
auto system_token_supply = eosio::token(N(eosio.token)).get_supply(eosio::symbol_type(system_token_symbol).name()).amount;
if( system_token_supply > 0 ) {
itr = _rammarket.emplace( _self, [&]( auto& m ) {
m.supply.amount = 100000000000000ll; // (supply amount) 100 Trillion RAMCORE Smart Token created
m.supply.symbol = S(4,RAMCORE); // (supply symbol) set to RAMCORE with 4 decimal places of prevision so 10B tokens
m.base.balance.amount = int64_t(_gstate.free_ram()); // (base balance amount) RAM balance set tot total free bytes
m.base.balance.symbol = S(0,RAM); // (base balance symbol) RAM smart token created
m.quote.balance.amount = system_token_supply / 1000; // (quote balance amount) RAM coin set to 1M EOS
m.quote.balance.symbol = CORE_SYMBOL; // (quote balance symbol) RAM Token changed name to "EOS" CORE_SYMBOL namespace
});
}
} else {
//print( "ram market already created" );
}
}
https://github.com/EOSIO/eos/blob/master/contracts/eosio.system/eosio.system.cpp#L24
You can see an example of the connector balance in the bancor white paper:
cleos -u https://nodes.get-scatter.com:443 get table eosio eosio rammarket
{
"rows": [{
"supply": "10000000000.0000 RAMCORE",
"base": {
"balance": "11870290976 RAM",
"weight": "0.50000000000000000"
},
"quote": {
"balance": "5789275.3804 EOS",
"weight": "0.50000000000000000"
}
}
],
"more": false
}
CW (connector weight) was .05% (5,789,275.3804 EOS / 11,870,290,976 RAM = 0.00048771132 or ~ .05%).
After update will be: "weight": "500.0000"