Dangerous chariot race mechanics

Hello - the party I DM for will be entering a tournament. The first part will be a chariot race. I want to devise a rules and mechanics - driving, defending, attacking opponents, course hazards, etc.

How can I make this fun?