Innovation, duplication, and the contract theory of patents