War Heroes is based on the ELO rating system of scores for competitive multiplayer games. So, after each battle, the winner will be rewarded a medal amount based on the difference of medals he/she has with the opponent.

This means that winning against players with higher scores gives you more medals and winning against players with lower scores will give you fewer medals. Losing medals works the same way: losing against players with higher scores removes less medals than against players with lower scores.