Understanding the mining value-chain