The Hubble tension poses a significant threat to the, otherwise extremely successful, LCDM model. The mismatch between the value of H0 inferred from the CMB and the independent local measurements has become increasingly worrying, to the point where we may need to start looking for alternatives. Many LCDM extensions have been proposed to address this problem. However, many of them seem to alleviate the $H_0$ tension at the cost of increasing the tension with other cosmological parameters, like the clustering amplitude $\sigma_8$. In our work we study, analytically and in a model-independent way, the conditions that any late-time extension to LCDM must met to simultaneously solve both the $H_0$ and the $\sigma_8$ tension. We obtain a set of necessary conditions that can be applied to a generic model. As a particular application, we derive conditions on the equation of state of a dark energy model.