A theory of agreements and protection