Designing an intelligent contract with communications and risk data