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;
}