  We consider an electronic phase separation process that generates regions of
different charge densities, or local dopings, as the origin of the
inhomogeneous charge density of high $T_c$ superconductors. We show that it
gives rise to a phase boundary potential between such doping disordered regions
or grains. The Bogliubov-deGennes self-consistent calculations in this
disordered medium yield position dependent superconducting gaps which are, for
all dopings, smaller than those derived from the local density of states with a
pseudogap behavior. Studying these two sets of gaps for different temperatures
and dopings, we are able to reproduce many many observed properties of
superconducting cuprates. This scenario is consistent with a resistivity
transition driven by Josephson coupling among the superconducting grains.
