Cost

This function returns the total volume traded on the AMM.

function cost() public view onlyAfterInit() returns (int128) {
    int128 sum_total;
    for(uint i=0; i< numOutcomes; i++) {
      sum_total = ABDKMath.add(sum_total, ABDKMath.exp(ABDKMath.div(q[i], b)));
    }
    return ABDKMath.mul(b, ABDKMath.ln(sum_total));
  }

This function returns the total trade volume of the market maker. This can be viewed as the total amount of money within the market maker. Note that it does not include the initial funding liquidity. Every time there is a trade, this number increases.

This could also be thought of as the total volume.