"contracts" is civil law. to be illegal it would have to be criminal law. defamation is legal. it's a tort, you can get sued for it and lose. in civil court.
there is contract law, but breaking contract law is not illegal. a tort for example, is a tort, not a crime.