1

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

-

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:

enter image description here


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"

1 Answer 1

1

There was no need for any initial eos token balance for the bancor algorithm to work properly.

The bancor algorithm calculates the price based on initial parameters set in the code and the current balance of both sides of the deal. In this case, the amount of RAM and amount of EOS in its bags and the amount in the buy or sell order requested.

In the early days, the bancor dApp had all the RAM and no EOS. People could buy RAM for a low price marked in EOS and this changed the ratio of RAM and EOS in the bancor dApp.

The 1 million EOS is just a parameter, not actual EOS created for this formula to work.

On aditional thought, perhaps this has to do with the amount of RAM in the posession of the genesis accounts. Approximately 4KB RAM each.

3
  • In the white paper, you can see on page 20 that they allocate 20% of "use of contributions" to the connector balance. What is different about their model versus EOS's RAM market? Is it that their model is post-ico so users would need the ability to sell into it? For CW to be valid (.05%) wouldn't there still need to be EOS to maintain that initial balance? storage.googleapis.com/website-bancor/2018/04/… Well I guess not because no one could sell into it at inception because there was no RAM to sell because the contract owned it all.
    – Nat
    Jul 7, 2018 at 15:02
  • " the Ether contributed to the BNT Token Generation Event has been allocated for specific uses as outlined below: - 20% held by the ETH connector balance of the BNT Smart Token, establishing a strong and dynamic initial 10% weight. " Page 19
    – Nat
    Jul 7, 2018 at 15:05
  • 1
    The Bancor project started with an ICO. They had no initial coin and no initial assets to trade against. In EOS the situation was different. The RAM was available and no EOS was needed. People wanted to buy RAM and gladly gave their EOS token in exchange for RAM on the EOS blockchain.
    – Ami Heines
    Jul 7, 2018 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.