Danny Sinton, 21, of Cragview Road, Belford, and Craig Sweenie, 20, of Wallaceneuk, Kelso, were both found in possession of the class-A drug at the Borders track on May 27.
Jedburgh Sheriff Court was told the pair each had cocaine to the value of £50.
The men were each fined £350.
The pair were part of a group of 10 people arrested for drugs offences as part of a police operation aimed at stamping out anti-social behaviour at race meetings.
Some 34 of the 5,000 race-goers there on the day were searched by police using sniffer dogs, with eight seizures of cocaine and two of cannabis being made.
Earlier this year, it was reported that track bosses in Britain are working hard to clamp down on violence and drug use at UK race meets.