The chemical evolution of the Proterozoic biosphere