How miners have come to the rescue of the fiscus – and shareholders