We use a suite of 31 simulated galaxies drawn from the MaGICC project to investigate the effects of baryonic feedback on the density profiles of dark matter haloes . The sample covers a wide mass range : 9.4 \times 10 ^ { 9 } < { { M _ { halo } } } / { { { M } _ { \odot } } } < 7.8 \times 10 ^ { 11 } , hosting galaxies with stellar masses : 5.0 \times 10 ^ { 5 } < { { M _ { \star } } } / { { { M } _ { \odot } } } < 8.3 \times 10 ^ { 10 } , i.e . from dwarf to L ^ { \star } . The galaxies are simulated with blastwave supernova feedback and , for some of them , an additional source of energy from massive stars is included . Within this feedback scheme we vary several parameters , such as the initial mass function , the density threshold for star formation and energy from supernovae and massive stars . The main result is a clear dependence of the inner slope of the dark matter density profile , \alpha in \rho \propto r ^ { \alpha } , on the ratio between stellar-to-halo mass , { { M _ { \star } } } / { { M _ { halo } } } . This relation is independent of the particular choice of parameters within our stellar feedback scheme , allowing a prediction for cusp vs core formation . When { { M _ { \star } } } / { { M _ { halo } } } is low , \lower 2.15 pt \hbox { $ \buildrel < \over { \sim } $ } 0.01 per cent , energy from stellar feedback is insufficient to significantly alter the inner dark matter density and the galaxy retains a cuspy profile . At higher ratios of stellar-to-halo mass feedback drives the expansion of the dark matter and generates cored profiles . The flattest profiles form where { { M _ { \star } } } / { { M _ { halo } } } \sim 0.5 per cent . Above this ratio , stars formed in the central regions deepen the gravitational potential enough to oppose the supernova-driven expansion process , resulting in cuspier profiles . Combining the dependence of \alpha on { { M _ { \star } } } / { { M _ { halo } } } with the empirical abundance matching relation between { { M _ { \star } } } and { { M _ { halo } } } provides a prediction for how \alpha varies as a function of stellar mass . Further , using the Tully-Fisher relation allows a prediction for the dependence of the dark matter inner slope on the observed rotation velocity of galaxies . The most cored galaxies are expected to have { { V _ { rot } } } \sim 50 { { { km s ^ { -1 } } } } , with \alpha decreasing for more massive disc galaxies : spirals with { { V _ { rot } } } \sim 150 { { { km s ^ { -1 } } } } have central slopes \alpha \leqslant - 0.8 , approaching again the NFW profile . This novel prediction for the dependence of \alpha on disc galaxy mass can be tested using observational data sets and can be applied to theoretical modeling of mass profiles and populations of disc galaxies .