The first full paragraph of Robin Malloy’s Law and the Invisible Hand reads thus (footnote omitted):
“Fundamentally, law is to society as gravity is to the solar system; it is the invisible force that holds society together and keeps it operating smoothly and productively. Law enchances social cooperation, facilitates trade, and extends the market. In these ways, law functions like Adam Smith’s invisible hand, guiding and facilitating the progress of humankind.“
Alas, as Brett tells Jake at the end of Hemingway’s novel The Sun Also Rises, Isn’t it pretty to think so? Although I am a law professor, I don’t agree with this “law-centric” view of the world for three reasons. First off, what if the causation between law and markets runs in the opposite direction? That is, are legal institutions necessary for markets to evolve, or is law a by-product of prosperous markets?
Secondly, what about laws that protect monopolies and prohibit free trade, such as zoning and licensure requirements? Also, the existence of too many laws and regulations might actually deter trade and economic growth. As a result, we need some criterion or set of criteria for distinguishing laws that promote markets from those that inhibit trade. (Paging public choice theory!)
Last but not least, even if we could agree on how to distinguish “good” laws from “bad” ones, law’s role in life is often secondary to the role of ethics and morality, to our sense of right and wrong. To begin with, from a purely economic or “rational actor” perspective, the efficacy of law depends on two key variables: p1 and p2, the probability of detection and the severity of the punishment if one is caught, and p1 and p2, in turn, will vary depending on the costs of monitoring behavior and the costs of enforcement. Morality, by contrast, relies on self-monitoring and self-enforcement.
But what is the relationship between law and morality, and what happens when people have different conceptions of right and wrong, different moral codes? I will proceed with my review of “Law and the Invisible Hand” in my next post.

Your first two refutations of a law-centric view of markets seem to be on point.
Whether rule-of-law is a necessary precondition or a byproduct of markets is a difficult chain of causation to pin-point. Certainly a chicken-or-the-egg problem.
Regarding your second point, laws certainly can constrain the Invisible Hand. The mechanism of laws regulating commerce seems to be more a mechanism of the Man of System (TMS, 1759) than a consequence of emergent order.
Law-makers hope that legislation will guide behavior in an advantageous direction, but like meddling in any other complex system, the results are unpredictable and nonlinear. Even resulting in worse outcomes (Prisoner Dilemmas, rent-seeking, and cobra effects) depending on the actual repercussions of the law.
On point!