Financial Risks and Research Contracts in a Model of Endogenous Growth