  In this paper we study the asymptotic behavior of solutions to an elliptic
equation near the singularity of an inverse square potential with a coefficient
related to the best constant for the Hardy inequality. Due to the presence of a
borderline Hardy potential, a proper variational setting has to be introduced
in order to provide a weak formulation of the equation. An Almgren-type
monotonicity formula is used to determine the exact asymptotic behavior of
solutions.
