That's how it gonna works Luke. The losing bets are gonna go to the budget which is used by the script to pay off the winners.
Basicly what Teddy is developing, is the realistic horse racing betting system, the same one used in real life, in which your winnings wont depend on how many people have placed their bets, nor will the amount you bet be spread into the winning cash(jackpot), yet your bet(lets say 5k) is gonna be multply by the odds you pick on the horse(lets say Gusty has an odd 4), so if your horse win you'll get 20,000$.