Optimal Design Of Research Contests And Giveaways