Designing an ownership contract