Against All Odds: Securing Randomness on the Blockchain