I am a little bit confused about the upward band bending in a n-type Si which is in contact with a metal. Suppose that electrons flow from Si to the metal to align the chemical potentials such that positive donor levels become depleted. In equilibrium one ends up with a negative charge density in the metal, that is balanced by the donors in the depletion layer of Si, which produce the upward band bending. My problem concerns the chemical shift of Si 2p core-states, when such a junction is created. Because electrons leave the semiconductor, the repulsive Coulomb interaction between the core-state and the rest electrons should be lower (simply because there are less electrons), resulting in a shift toward higher binding energies. So why do the Si 2p states move toward lower binding energies (higher energies), when electrons are leaving? how is this explained in the "initial state model".