The new era of gravitational waves measurements offers a way to obtain insight into the evolution the Universe before big bang nucleosynthesis. Of particular interest are the electroweak (EW) epoch at roughly 100 GeV and the epoch of quantum-chromodynamics (QCD) at roughly 150 MeV. While according to the standard model of particle physics both transitions are expected to be cross-overs, there are many non-standard scenarios leading to a first-order cosmic EW transition but only a few that could lead to a first-order cosmic QCD transition. I will discuss how large lepton flavour asymmetries impact the cosmic trajectory during the QCD epoch. Lepton asymmetry is one of the key parameters to understand the origin of the matter-antimatter asymmetry but also one of the most poorly constrained cosmological parameters. I will introduce two different methods to calculate the cosmic trajectory including large lepton flavour asymmetries, one using results from lattice QCD and another one using results from functional QCD.