An empirical model for the star formation history in dark matter haloes | Synapse