it's based off which quest you assign! Each hero takes a cut of the quest reward, with a small degree of randomness to stop it from being 100% predictable