If none, check out some of the foundation legal principles of contract law, including, but not limited to: offer, acceptance, bargained for exchange, mutual assent, consideration, "four-corners", contractual intent, illusory promises, statute of frauds, UCC (uniform commercial code), illegal per se.
The contract isn't the "code", the contract is the contract and if anything the law is the "code" (in fact in many states and federally laws are called code), just because layman and tech people don't understand the law/code, doesn't mean its full of loopholes, technicalities and bugs...though as a layman watching the disaster that is smart contracts executing in ways people did not understand and authors marketed in plain language, I would says smart contracts are full of bugs.
In reality, a lawyer trying to "hack" a contract with some technicality will run afoul of a judge telling them to sit down and shut up. Judges exist to discern the intent behind the contract and thereby fix "bugs" in the contract that would otherwise lead to absurd, unintended outcomes.
"Loopholes" matter a hell of a lot less in real life than in episodes of Law & Order or whatever you've been watching.
both. Lawyers are just hackers of the legal system. the runtime environment is the courtroom. The contract is the code. loopholes and technicalities are another name for bugs.