  We endow the set of lattices in Q_p^n with a reasonable algebro-geometric
structure. As a result, we prove the representability of affine Grassmannians
and establish the geometric Satake correspondence in mixed characteristic. We
also give an application of our theory to the study of Rapoport-Zink spaces.
