Galen and Valerian's father work on the spear The Blacksmith created as a weapon against the dragon Vermithrax. When Tyrian — fulfilling The Dragon trope — tries to stop Galen from rescuing Princess Elspeth, Galen uses that spear to kill Tyrian.
One better according to the novelization: The spear was specifically enchanted to kill dragons. Galen is lacking in combat skills, but the spear itself was drawn to the dragon symbol on Tyrian's chest.
Some complain that if Galen simply had sex with Valerian, she'd be spared from the Lottery. However, "virgin" in the Middle Age setting context may just mean a woman below a certain age, since if being a virgin was a qualification, it's pretty obvious other girls in the village would have thought of that escape clause far earlier. Besides, Vermithrax is not a god - she is a mother feeding her young and herself. Doubtful she'd care if the food had sex or not (it's also unlikely that Vermithrax would be able to tell).
Though in turn, it becomes bizarre that Vermithrax only wanted young girls.
Only girls were served to it. There's no indicator that Vermithrax chose only to eat women or even just virgins.
Also, guess how young the girls would be if older teens did have sex? Would you rather offer up a teenager or a little girl?
In the novelization it's explained that Valerian's own mother was selected by the lottery and sacrificed to the dragon. Either the lottery officials were not too particular about the definition of "virgin", or they chose non-virgins at times because they knew of potential virgin sacrifices getting themselves deflowered to try and avoid it/adjusted the selection criteria accordingly when they found out.
The horse that shows up at the end wasn't magic. It was the horse from the wagon carrying the first girl to be sacrificed. It was wandering around, avoiding the dragon, and came out when it saw some friendly looking people!
Elspeth had hundreds of clay tablets with her name on them created in less than 24 hours. She obviously had help, and you can bet a lot of people agreed with her that the lottery was unfair.
The fiery lake was a nice touch. Then you remember that Vermithrax is an elderly dragon, and implied to be decrepit, if large, by dragon standards. Then you remember that Vermithrax has heat-resistant scales. It's possible Vermithrax either chose the burning lake for its lair/ nest because it would soothe the aches and pains from the dragon's dotage, or Vermithrax made the fiery lake that way.
The film hints at Vermithrax's biology with the long inhale of air. There is probably a dual mechanism in its throat that ignites — and the expelled air thrusts the superheated air out.