We study the limiting behaviour of the empirical measure of a system of
diffusions interacting through their ranks when the number of diffusions tends
to infinity. We prove that the limiting dynamics is given by a McKean-Vlasov
evolution equation. Moreover, we show that in a wide range of cases the
evolution of the cumulative distribution function under the limiting dynamics
is governed by the generalized porous medium equation with convection. The
uniqueness theory for the latter is used to establish the uniqueness of
solutions of the limiting McKean-Vlasov equation and the law of large numbers
for the corresponding systems of interacting diffusions. The implications of
the results for rank-based models of capital distributions in financial markets
are also explained.