Hand-in-cap is an old English trading procedure that gave rise to the modern word handicap.
[1][2] It was used to fairly trade items of potentially unequal value.
[3] Here’s how the procedure works: This game was played in Piers Plowman, a poem from the 14th century.
[4] The concept of a neutral person evening up the odds was extended to handicap racing in the mid-18th century.
In handicap racing, horses carry different weights based on the umpire's estimation of what would make them run equally.