The scattering theory formulation of the stopping power of a homogeneous electron gas is implemented by consistent velocity-dependent potentials, which are needed to calculate transport cross sections for bare intruders. The method of volume averaging, over the Wigner-Seitz atomic cell of a solid Al target, is employed to characterize inhomogeneities of the electronic system and define average stopping powers for cases of protons and antiprotons. The theoretical results for average energy losses of both projectiles are in remarkable agreement with recent experimental data over a broad range of projectile velocities.