Enter LexDAO Corpus Contracts

Ross Campbell
LexDAOism
Published in
7 min readSep 8, 2020
source.

FIRST, a digression into Legal History ⚖️:

Promises and a sense of finality matter for markets. We need to plan around what we promise each other. So far on our collective journey from cave-painters to moon-walkers, legal systems have given us predictability and escape velocity from tribalism into scaled cooperation via sovereign enforcement of claims (woo! 🎉).

. . . oh? source.

Given this need for sovereigns to order us to work together, or really, a respected referee role to settle disputes, guilds with special legal acumen have emerged to maintain protocols for promises — the good stuff of Lawyering; despite the heat lawyers get, their ordering effects have generally been a boon to us all, making life less “nasty, brutish, and short.” Good, right?

To sum up the protocol around promises that has just kinda worked so far to make them happen at scale: (i) lawyers translate promises that ‘compute’ with judges 📜, (ii) judges parse and render decisions on rightful ‘state’ of said promises 👩‍⚖️, and (iii) law ‘enforcers’ such as sheriffs provide ultimate finality against promises as ordered 👮 .

source.

But what if there was another tool to hold people to their promises, incentive cooperation? 🔧

If this sounds at least *worth* exploring:

(\____/)
( ͡ ͡° ͜ ʖ ͡ ͡°)
\╭☞ \╭☞

JOIN US!!, LexDAO, an autonomous guild of legal engineers distributed across the globe, who are utterly obsessed with programmable mediums for agreements, such as EVM smart contract platforms. IN plain speak, we believe in lean legal code to power our lives — cutting out annoying middlemen with executable code, and scour the internet for the best tools at hand to accomplish this, though we largely end up just building them ourselves :~0):

Enter LexCorpus

We believe in building a new open, more transparent financial system for the world. But “open” is more than just “open source”, it also requires the language to be the most acessible possible, that allows the largest possible amount of eyes to look into it. — Alex Van de Sande ~ MuchClearerDai

LexDAO legal engineers have been furiously writing source code for promises into LexCorpus, a completely open repository of legal and solidity contracts written and used by lawyers in our global network 🌐.

In case you missed out on our hacking and musing over our formative year, we have demonstrated approaches to digital arbitration, payments, banking/savings, tokenization, org. docs, and are highly cognizant of the very real regulatory frameworks that wrap onto these transactions. We simply crave to write unnecessary costs out of our deals and companies, and solidity has been high yield so far. But overall, we also want to engineer and change the way the market thinks about lawyers and the law in general (but that’s a whole ‘nuther riff~~).

source.

We also well know our limitations, and thus firmly believe that the best way to grow a more programmable legal system that benefits all of us is to consolidate our work into a legible corpus, thus sketching a shelling point for other legal engineers 🏛️.

In this realm, it has been our great pleasure to work with top development shops, like Raid Guild, to explore code-chartered companies for freelancers, and start rolling out templates for digital arbitration that work for real dealers.

To begin to consolidate this research into an actionable base of LexCorpus, we have selected four pillars for engineers and lawyers to begin studying and incorporating EVM into their promises, a new ROTE, if you will’ : Registry, Org., Token, & Escrow 📚.

Let’s take these core contracts for LexCorpus in turn, shall we?

REGISTRY 📜

An initial mission of LexDAO was merely to map lawyers onto accounts that can hold stakes in DAOs and begin messing around with smart contracts. There is, of course, a variety of valuable ways to use blockchain registries beyond club membership, such as whitelisting certain addresses in a composable manner based on subjective, and often, legalistic conclusions (*Can `this account` join `this DAO`? *Can `this account` purchase `this asset`?).

LexList.

To this end, we are starting simple and providing a public registry contract pattern, LexList, for Ethereum token and other Q&A vetted by LexDAO, as well as LexAIR, a similar contract for account accreditation managed by lawyers granted LXLAW token by LexDAO (see below)🏅. LexDAO has put its social capital at stake here, and we are excited to see how this proves out as an asset for markets, like Uniswap DEX. To illustrate the ‘wet’ or legal dimension of our Ethereum contracts, we have further provided a template for accreditation letter that can be filled out by a lawyer, in conjunction with registering an account to LexAIR.

ORG. 🗣️

~ get mystical with organization ✨

In combo with the excellent cross-pollination of ideas and DAO pain points over the Summer 2020 DAO hackathons (gas costs = tops! ⛽), we have upgraded Moloch DAO v2 to “MYSTIC” contracts to make it easier and more cost-effective to run digital organizations 🧙.

We have further incorporated community extensions to this code, such as Raid Guild Minion and WhalerDAO eip-1167 gas optimization, to give Moloch DAO more feature-parity with other frameworks, such as the ability to make direct liquidity and other external contract deals (cf. Agent) 🕴️.

To add a selection of legal layers, we have also included various forms of governance docs to help establish predictability among org. members and the public, such as this generalized form of Delaware Smart Co. Operating Agreement, and the LexDAO Constitution (Wy.).

To demonstrate MYSTIC contracts in action, we are dogfooding and using this code to run our own membership, LexList registries, as well as proofs-of-concept of digital arbitration across our apprentices and the Aragon Network juror pool 🦅.

TOKEN 🏵

We have been designing lean ways to upload assets into digital markets, starting with a token contract that could more easily represent offers, such as Personal Tokens. Our stylistic preference here, as in other LexCorpus contracts, is to make contract code lean and as plain english as solidity syntax permits, to better match with our legal wrappers.

To begin, we have consolidated our favorite design ideas into LexToken, which has the core ERC-20 token functionality from the OpenZeppelin library, but also our custom extensions for opt-in governance, collateral staking, sales, and more descriptive updates on ‘legal state changes’ on offers. To save gas, and to reduce complexity for more basic offerings, we have also created a minimal version of LexToken (Lite) in ~220 lines of solidity with eip-1167 deployment, making it only a few $$$ to create a new token on Ethereum mainnet.

For demonstrative legal terms, we have provided our adapted form of Reuben Bramanathan’s Themis ToS for Personal Token, that can be associated with an offer for services and establishes clear ground rules for token redemption.

To demonstrate LexToken in the wild, we have tokenized access to chatrooms and advance LexCorpus contracts, “LexDAO Engineering (LEX)”, using the full implementation. This is an experiment for us, and likely, you as well — If you want to support out work, or otherwise gain access & influence over LexCorpus and other LexDAO Engineering works, LEX can be purchased by sending ETH to lex.codeslaw.eth, 0xA5C5C8Af327248c4c2dce810a3d3Cffb8C4F66ab (1 Ξ = 1000 LEX). Note: LexDAO MYSTIC may vote to update LEX sale status and rate in the future. More importantly, read the LexToken code, and let us know what you think!

If staking LEX ⚔️ (i.e., holding it in your MetaMask wallet 🦊), you can access our LEX chatroom on telegram and discuss LexCorpus after passing our trusty collab.land bot 🤖 (need at least 10 LEX to enter): $LEX CORPUS CHAT 📕

ESCROW 🔐

Our formative research (TLDR) was into smart contracts to make remote deals more secure with digital escrows.

After a year of tire-kicking, our apprentices and Raid Guild boiled things down from ~1000 to ~300 lines of code, in a pattern built for DAO agreements we call LexGuildLocker, that allows parties to arrange timed, multi-party, milestone payments from an escrow contract with their choice of arbitrator account (can be LexDAO, Aragon, Kleros, you name it!).

Further, we have completed a basic pattern for direct arbitration, LexLocker, where parties (already having problems …) can co-deposit a sum for swift resolution by a selected ‘resolver’ account. See for example, our demo ADR on xDAI chain using LexDAO MYSTIC (see above, ORG.) remote calls: https://blockscout.com/poa/xdai/tx/0x8816baf5b7f246de492bf7d1b610d2d61454db9a8dcabebbafb6deda3a634886/token-transfers.

We have illustrated a minimum viable sale of goods/services legal template for use in LexGuildLocker, and will be releasing procedures and guides to using LexDAO Arbitration to add finality to your dealings in the coming weeks 👩‍⚖️.

This is just the beginning of lawyers and coders huddling together and making their commercial lives more predictable. Watch our repo for updates and make PRs to join our cause: https://github.com/lexDAO/LexCorpus

Questions on how to use our contracts or build with us? Check out our Discord 🎮. Follow us on Twitter 🐦. Snag some lex.codeslaw.eth ;9.

Until next time ~ soon! 👋

--

--