My question is how to discover the current CW for the bancor algorithm in the current RAM market.

Below you can see where in the system contract RAM and the RAMCORE token is created for the market upon the network's inception.

eosio.system.cpp code line 28:

if( itr == _rammarket.end() ) {

    //system_token_supply is set to current outstanding EOS supply                          

    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; 

    // 100 trillion smart token reserve created with "RAMCORE" token namespace

    m.supply.symbol = S(4,RAMCORE);

    // base.balance.amount set to outstanding free RAM, 64GB

    m.base.balance.amount = int64_t(_gstate.free_ram()); 
    m.base.balance.symbol = S(0,RAM);

    // EOS used for acting as counter party to trade (connector balance)    

    m.quote.balance.amount = system_token_supply / 1000; 

    // balance.symbol is given EOS token namespace

    m.quote.balance.symbol = CORE_SYMBOL;

  • If you have answered your own question please remove the Answer content from the Question and add it as an Answer to clarify this has been properly answered OK. Commented Jul 9, 2018 at 11:46
  • Sorry about that. I cleaned it up.
    – Nat
    Commented Jul 9, 2018 at 11:50

1 Answer 1


An Answer to this was provided:

EOSIO RAM Market & Bancor Algorithm | The bytemaster July 4th

Due to an unintentional configuration of the Bancor Relay weights on the EOS blockchain, this parameter is set at .05% rather than 50%. This introduces some heavy slippage for buying and selling large quantities and causes more volatility than desired.

Dan suggests hard coding a static 20% annual inflation in RAM into the system contract along with the change in CW to 50%.

You can find the weight by going:

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

To provide some visual clarity on different CW's and how they affect price as supply is taken up, I've included a visual from the Bancor WP.

enter image description here

  • Why 10,000,000,000 RAMCORE?
    – abhi3700
    Commented Jul 27, 2020 at 16:40
  • The eosio token style/standard is to include a total supply. This total supply will take a long time to get to. It's interesting because there does not need to be a max supply. Maybe a legal decision on b1's part.
    – Nat
    Commented Jul 28, 2020 at 17:48
  • but I can use bancor algorithm w/o having RAMCORE using this formula: RAM price (in EOS) = (n * quote.balance) / (n + base.balance / 1024) .......where, n = RAM needed (in KB)
    – abhi3700
    Commented Jul 28, 2020 at 18:09
  • Hm should be able to yes.
    – Nat
    Commented Jul 29, 2020 at 14:57
  • Thanks!...I just used in my dApp - Decentralized Ride Hailing Platform
    – abhi3700
    Commented Jul 29, 2020 at 20:59

Your Answer

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

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