  We present a theory of vortex liquid-to-solid transition in homogeneous quasi
2D superconductors. The free energy is written as a functional l of density of
zeroes of the fluctuating order parameter. The transition is weakly first-order
and well below the Hc2(T) line. Transition temperature, discontinuities of the
average Abrikosov ratio and of the average superfluid density, the Debay-Waller
factor and the latent heat are in good agreement with Monte Carlo simulations.
The density is only weakly modulated in the "vortex-solid" phase, consistent
with the density-wave behavior.
