We study the impact on electroweak baryogenesis from a swifter cosmological expansion induced by dark matter. We detail the experimental bounds that one can place on models that realize it, and we investigate the modifications of these bounds that result from a non-standard cosmological history. The modifications can be sizeable if the expansion rate of the Universe increases by several orders of magnitude. We illustrate the impact through the example of scalar field dark matter, which can alter the cosmological history enough to enable a strong-enough first-order phase transition in the Standard Model when it is supplemented by a dimension six operator directly modifying the Higgs boson potential. We show that due to the modified cosmologi...