The crypto miner recorded gains in production in June, but higher electricity costs and falling bitcoin prices narrowed its margins.