First paper by PhD student Milan Pešta developing a method to estimate mass-ratio distribution of contact binaries simply from the distribution of their light curve amplitudes. This was originally proposed by Rucinski (2001), but in this paper we reach sufficient sensitivity to determine the minimum mass ratio, when contact binaries merge due to the Darwin instability. This is possible thanks to a new Bayesian method to filter contaminants and Kepler data. The method can be easily extended to much bigger samples from TESS or Gaia. The paper is submitted to A&A and the preprint can be accessed at https://arxiv.org/abs/2212.02553.