Natural Language Programming
Programs used to be behind an hermetic wall. Most of us had to trust other people to create, validate, interprete and maintain programs for us. Not any more.
Lexon is the next generation of program language: human readable like natural language.
Lexon can be used to describe agreements and business logic. It was designed to make the code of blockchain smart contracts readable for non-programmers.
• Regarding clarity, it goes back to the original concept of Smart Contracts.
• For auto-execution Lexon utilizes blockchains in a truly agnostic way.
• For safety, it surpasses existing blockchain languages by built-in formal verification.
LEX Escrow. Chapter: Pay In. A Payer pays an Amount into Escrow and appoints the Payee and the Arbiter. Chapter: Pay Out. The Arbiter or the Payer may pay the Escrow to the Payee. Chapter: Pay Back. The Arbiter or the Payee may pay the Escrow to the Payer.
The above is a valid legal contract. This can be surprising to laymen but is obvious for legal professionals. The reason is that there is no style requirement for a text to pass as a valid contract. There is a requirement though that a contract clearly documents a meeting of the minds. This is where other smart contract languages fall short, for almost all jurisdictions.
With one click, the above code can be compiled to a blockchain smart contract and deployed to a blockchain, e.g. to the Ethereum mainnet. This makes it untamperable and auto-executing. No-one can stop this agreement from performing. But the blockchain is optional. Lexon code is useful in many trustful situations.
Business poeple, legal professionals, regulators and really anyone interested can take part in crafting, debating and voting on smart contracts, DAOs, blockchain governance and bricks-and-mortar TOS. This allows lawyers, attorneys and judges to reason about smart contracts without getting involved into a battle of experts. A complete layer of indirection is taken out.
Lexon merges law and automation. The legal and the program text are ONE.
A high proporation of legal prose of commercial contracts can be translated into useful blockchain code. The remainder that is purely non-functional text, Lexon ignores. Importantly, there is only one document. Lexon code and non-functional text are freely mixed. Lexon is part of the overall expression of the contract. The Lexon compiler analyzes each sentence to automatically tell apart what is what.
Lexon does not aim to make every legal contract a blockchain smart contract. Instead, vice versa, the ambition is to be able to make every smart contract as legal as possible. There is no 100% guarantee as any legal contract - blockchain or not - can be thrown out in court, being interpreted in unforseen ways. However, the direction from blockchain to legal - instead of vice versa - is the more modest and sensical approach. Arguments regarding the required bluriness of contracts are therefore inherently moot.
⇨ show code example
LEX: Service Agreement with Escrow. CLAUSE: Offer. The "Service Provider" pays half of the "Assessment Fee" into escrow, sets the amount of the "Service Fee", sets the "Delivery Time", and also appoints the "Assessor". By executing all of the above, the Service Provider creates a binding offer. CLAUSE: Acceptance. A "Client" pays the Service Fee into escrow, and also pays half of the Assessment Fee into escrow. The "Due Date" is defined as the duration of Delivery Time after the current time at that point in time. By executing all of the above, the Client accepts the offer. CLAUSE: Provision of Services. The Assessor may certify either that the "Provision of Services Have Met the Defined Service Criteria" or not, and also certify the "Time of Provision of Services". CLAUSE: Pay Out. The Service Provider may, if Time of Provision of Services is certified to be before or on the Due Date, and the Provision of Services Have Met the Defined Service Criteria then pay the Service Fee from escrow to themselves, and also pay the Assessment Fee from escrow to the Assessor. CLAUSE: Pay Back. The Client may if the Due Date is past and it is not the case that the Provision of Services Have Met the Defined Service Criteria, then pay the Service Fee from escrow to themselves, and also pay the Assessment Fee from escrow to the Assessor. GENERAL TERMS: I. The Service Provider will provide to the Client the Services on or before the Due Date. II. The Service Provider will provide the Services with the applicable standard of care. II. Both the Service Provider and the Client will carry their respective tax and applicable levies.
The above code is a mix of
• in blue: smart code that is part of both the legal prose and the automation of it e.g. in form of a blockchain smart contract.
• in gray: boilerplate that is for human consumption only to clarify terms of the contract. Even where it would not strictly have to be present to make the text a legal contract. Boilerplate can repeat what is implied by context or blue code, for the avoidance of doubt.
A language and virtual machine2 is proposed to allow lawyers, lawmakers and judges to read and write legally correct smart contracts3 that can build on comprehensive legal code libraries and can express and adjust to court decisions, fictions, changes in regulations, arbitration and the differences between jurisdictions ...
⇨ Get the 2017 Lexon whitepaper as PDF.
Lexon is created and will be distributed by the Lexon Foundation under Open Source license.
(c) 2019 Lexon Foundation