What are DAOs?
One of the main benefits of Ethereum is that it enables a community of strangers to pool value together and execute on their shared goals with less need for trust or organizational overhead. Disparate groups of people online can organize by relying on the predictability of blockchain-based “smart contracts” to execute on their group decisions and transfer value according to hard-coded rules in a highly “tamper proof” digital environment.
reference: https://medium.com/@OpenLawOfficial/the-era-of-legally-compliant-daos-491edf88fed0
What I am personally interested in OpenLaw DAO framework is their potential use cases of off-chain physical assets, like real estate. The use case is highly fit into the dPassive Finance’s limited liability DAO and Off-chain Real Estate Investment and Collateral Management.
Below is a quick tutorial of Tribute DAO dApp Deployment (Guide provided by OpenLaw):
https://tributedao.com/docs/tutorial/dao/installation
Pre-Requisite
- Node.js version >= 12.12.0 or above
- Git version 2.15.0 or above.
- Solc version 0.8.0
- truffle
- Metamask Chrome Extension
- Infura Rinkeby API
- The graph API Access Token
- Alchemy API Access Token
Installation of Pre-requisite:
https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
https://git-scm.com/download/mac
npm install -g solc
npm install -g truffle
Checking the pre-requisite version:
node -v
git –version
solcjs -V
Clone from OpenLaw Team repository for the tribute contract:
git clone https://github.com/openlawteam/tribute-contracts.git
> npm run compile
### Now we have completed the compilation of the tribute DAO code, next we need to prepare Infura Project ID and thegraph.com API for the tribute DAO configurations purpose.
### Go to infura => Ethereum => create a new project => Settings => End Points => Rinkeby
To get your Infura Project ID
And below is your Infura Rinkeby https and web socket end points:
### Go to thegraph.com => Subgraph Studio => API keys => connect your metamask chrome wallet => key in your email
Note: Ensure your metamask wallet is in Rinkeby Test Network
### Create your API and name the API
### Hence you will be able to get thegraph API key (Please create your own, the api key below is trimmed for usage limit purpose)
2489c9d037053510ca26d99da9455ff4
### In project root directory, create a “.env” environment file with below content:
> nano .env
# The name of the DAO.
DAO_NAME= “dPassive Lawyer DAO"
# The public ethereum address that belongs to the Owner of the DAO,
# in this case, it is your public ethereum address on Rinkeby network.
# Make sure you have some ETH, otherwise the deployment will fail.
DAO_OWNER_ADDR= "Your-Rinkeby-ETH-wallet-address”
# The name of the ERC20 token of your DAO.
ERC20_TOKEN_NAME=“dPassive Lawyer DAO Token"
# The symbol of your ERC20 Token that will be used to control the
# DAO units that each member holds.
ERC20_TOKEN_SYMBOL=“DPLD"
# Number of decimals to display the token units in MM. We usually
# set 0 because the DAO units are managed in WEI, and to be able
# to see that in the MM wallet you need to remove the precision.
ERC20_TOKEN_DECIMALS=0
# The Infura Key to connect to Rinkeby network. You can follow
# these steps to get your ProjectId/API Key from Infura:
# https://blog.infura.io/getting-started-with-infura-28e41844cc89/
INFURA_KEY=“Your-Infura-Project-ID”
# The Truffle mnemonic is a 12 word string which is used to create
# the HD Wallet, and sign transactions on your behalf. Remember that
# the DAO_OWNER_ADDR that you set above need to be the public address
# derived from this 12 word mnemonic.
# WARNING: this wallet must not contains any mainnet actual balance, revealing
# these 12 word mnemonic might cause you to lost those holding balance.
# In actual implementation we will use another local secret file to reference
# to avoid security vulnerability due to carelessness
TRUFFLE_MNEMONIC=“toitose…."
# The Graph API Access Token that will be used to deploy the Subgraph.
GRAPH_ACCESS_TOKEN="Your-Rinkeby-thegraph-API”
Note: In case you are not subscribing to the Infura’s paid plan, deploying Tribute DAO might exceed the daily request limit of Infura. Below is a workaround to avoid hitting the infura daily request limit of 100,000.
- Ensure the DAO_Name in .env file is unique (i.e. different from default or any name you have deployed previously)
- Add below DAO artifact contract as a reusable contract artifact
DAO_ARTIFACTS_CONTRACT_ADDR=0xf8761171797510AAF1481105be9a9D5C92901622
### After completing the configuration of the Tribute DAO, please get some testing Rinkeby ETH (Refer to my post https://farmoutain.wordpress.com/2021/07/31/how-to-request-for-rinkeby-testsing-eth/)
# Tribute DAO deployment process is trigger by <npm run deploy:XXX> script, in which XXX
# is the target network you want to deploy to
# npm run deploy: mainnet => deploying to ethereum mainnet
### Once you have at least 2 Rinkeby Testing ETH in your wallet, then you may begin deploying your Tribute DAO to Rinkeby test net
> npm run deploy:rinkeby
……
Up to here, we have successfully deployed the Open Law Tribute DAO smart contracts to the Rinkeby Test Net. Next we will begin setup and configure the Tribute DAO UI.
> git clone https://github.com/openlawteam/tribute-ui.git
### Change Directory to tribute-ui
> cd tribute-ui
### Create another .env under tribute-ui folder
> nano .env
# It can be the same value you used for the Tribute DAO deployment.
REACT_APP_INFURA_PROJECT_ID_DEV=…
# The address of the DaoRegistry smart contract deployed to the Rinkeby network.
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=…
# The address of the Multicall smart contract deployed to the Rinkeby network.
REACT_APP_MULTICALL_CONTRACT_ADDRESS=…
# The url of snaphot-hub running locally in a container.
REACT_APP_SNAPSHOT_HUB_API_URL=http://localhost:8081
# The unique name registered in Snapshot Hub under which proposals, votes, etc. will be stored.
REACT_APP_SNAPSHOT_SPACE=tribute
# The url of the subgraph running locally in a container.
REACT_APP_GRAPH_API_URL=https://api.thegraph.com/subgraphs/name/<GITHUB_USERNAME>/tribute-dao-tutorial
REACT_APP_ENVIRONMENT=development
Example .env file under tribute-ui folder:
Note: get your DAO Registry address, multi call address, DaoFactory Address and DaoFactory block number from the tribute-contracts/logs/rinkeby-deploy.log
> nano Rinkeby-deploy.log
Command + W ===> search for relevant keyword to locate the addresses and block number
Next, configure the tribute-contracts subgraph config
> cd ..
> cd tribute-contracts/subgraph/config
> nano subgraph-config.json
### Keep only 1 entries of the config and change to your daoFactory address and daoFactory starting block, subgraph name
### Install the dependencies, under tribute-contract/subgraph folder
> npm ci
### start deploying the subgraph
> npx ts-node subgraph-deployer.ts
### Launch the snapshot hub ERC712 service
Clone from the openlaw github
> git clone git:openlawteam/snapshot-hub.git
### Create the .env.local file with below parameters:
# The port number to start the service.
PORT=8080
# The type of the ethereum network.
NETWORK=testnet
# The flag to indicate if the snapshot-hub should use IPFS to store data.
USE_IPFS=false
# The 64 digits private key of the hd wallet that will be used to sign messages.
RELAYER_PK=0x..
# The allow list of domain that will be using the service.
ALLOWED_DOMAINS=http://localhost:3000
# The Alchemy API URL and access token to talk to Rinkeby ethereum network.
ALCHEMY_API_URL=https://eth-rinkeby.alchemyapi.io/v2/<ACCESS_TOKEN>
### install the dependencies in the snapshot-hub folder
> npm ci
### start the snapshot hub service
> docker-compose up
### and finally start the dApp in the tribute-ui folder
> npm start
Connect wallet with Rinkeby Test Network
You will be able to see some of the standard functions of the Tribute DAO
The above is a quick demo of the openlaw Tribute DAO smart contract and Web App demo UI.
There are 3 business scenarios we have explored with open law DAO framework:
- Investible Real Estate DAO
- Investment Banking DAO for business brokering
- Asset (Securities & Bonds) Management DAO
With the existing open law infrastructure framework, we can build the use cases using below open law libraries:
https://github.com/openlawteam/openlaw-core
https://github.com/openlawteam/openlaw-client
https://github.com/openlawteam/openlaw-elements
Below is a demonstration of the Open Law Open Investment Banking Web App built with their forms flow https://docs.openlaw.io/forms-flows/
Evernote helps you remember everything and get organized effortlessly. Download Evernote. |