We analyze the exchange of dark matter between halos , subhalos , and their environments in a high-resolution cosmological N -body simulation of a \Lambda CDMÂ cosmology . At each analyzed redshift z we divide the dark matter particles into 4 components : ( i ) isolated galactic halos , ( ii ) subhalos , ( iii ) the diffuse medium of group and cluster halos , and ( iv ) the background outside of virialized halos . We follow the time evolution of the mass distribution and flows between these components and provide fitting functions for the exchange rates . The exchange rates show gradual evolution as z decreases to 2 , and become more steady thereafter . For { { { { z \mathrel { \mathchoice { \vbox { \offinterlineskip \halign { \cr } $ \displaystyle < $ \cr$% \displaystyle \sim$ } } } { \vbox { \offinterlineskip \halign { \cr } $ \textstyle < $ \cr$% \textstyle \sim$ } } } { \vbox { \offinterlineskip \halign { \cr } $ \scriptstyle < $ \cr$% \scriptstyle \sim$ } } } { \vbox { \offinterlineskip \halign { \cr } $ \scriptscriptstyle < $% \cr$ \scriptscriptstyle \sim$ } } } } 2 about 15 \% of the isolated galactic halos cluster per Gyr to become subhalos and a similar fraction of their mass returns to the unvirialized background . Mass accumulation onto subhalos is equally shared between previously isolated halos and unvirialized matter , and is dominated by accretion from the host ’ s diffuse matter beyond z \simeq 1 . This accumulation is balanced for z \simeq 0.5 by subhalo disruption at a rate of about half of their mass per Gyr . The diffuse component in host halos is built by accreting isolated halos and un-virialized material in mass shares of 40 % and 60 % , respectively , and at z < 0.5 also by disruption of subhalos . The unvirialized IGM is enriched mostly by stripping of isolated halos , and at z < 1 also by mass loss from groups and clusters . We go on to use our derived exchange rates together with a simple recipe for metal production to gauge the importance of metal redistribution in the universe due solely to gravity-induced interactions . This crude model predicts some trends regarding metallicity ratios . The diffuse metallicity in clusters is predicted to be \sim 40 \% that in isolated galaxies ( \sim 55 \% of groups ) at z = 0 , and should be lower only slightly by z = 1 , consistent with observations . The metallicity of the diffuse media in large galaxy halos and poor groups is expected to be lower by about a factor of 5 by z \sim 2 , in agreement with the observed metallicity of damped Ly \alpha systems . The metallicity of the background IGM is predicted to be ( 1 - 3 ) \times 10 ^ { -4 } that of z = 0 clusters , also consistent with observations . The agreement of predicted and observed trends indicates that gravitational interaction alone may play an important role in metal enrichment of the intra-cluster and intergalactic media .