Read Formalizing and Securing Relationships on Public Networks
By Nick Szabo and couple that with Bitcoin. Think of laws as being online documents with their own git layer, public repo infrastructure.
"We are now entering an era of online communications and software "literacy". The "physics of cyberspace", studied by computer scientists, are radically different from the properties of paper, to an even greater degree than paper was different from string, clay, and metal. "