Snakes have evolved in various ways to catch food. Some snakes have adapted to constriction with immense musculature and weigh. Other snakes have adapted into several different types of venom. Cytotoxic venom targets cells in general, hemotoxic specializes in blood cells and neurotoxic venom attacks the nervous tissues. The king cobra's venom falls into the latter category. Their diet is consisted of only snakes, so the venom that a king cobra needs must be relatively fast acting on prey to keep them from escaping.
A University of California article details how the genome of the king cobra was fully mapped out along with a Burmese python genome for comparison. There were the typical alleles for legless in the genomes for both snakes. What was then interesting was that the venom in the king cobra correlates to pancreatic cells in the Burmese python. Scientists have figured out that several copies for the pancreas travelled to the mouth and then mutated to become the venom. A Nature article also compares the venom from king cobra's akin to insulin produced by the pancreas of mice and humans.
It would be interesting to see how would snake venom change over time now concerning the gradual warming of Earth. Also prey are locked in an evolutionary arms races to resist venom from predators. In several millions of years, it took the snake to develop venom due to random mutation.