function calculatePrice(uint256 offerAmount, uint256 wantAmount, uint256 sellSide) private pure returns(uint256) {
        return sellSide == 0
            ? safeDiv(safeMul(10**8, offerAmount), wantAmount)
            : safeDiv(safeMul(10**8, wantAmount), offerAmount);
    }