ORDAO (Optimistic Respect-based DAO) is a toolset for DAOs that use a non-transferrable reputation token (Respect). It provides smart contracts, a client library, a backend service, and a frontend — everything needed to run a DAO where proposals are voted on using reputation token and executed onchain via OREC.
For understanding of design philosophy and context, start with the OREC whitepaper.
The codebase is inspired by principles of clean architecture. The smart contracts and shared type library (ortypes) form the innermost domain layer. The client library (orclient) and backend service (ornode) depend on ortypes but not on each other or on any UI. The frontend (gui) sits at the outermost layer and can be swapped without affecting the rest. See the ortypes README for more detail on how this design enables code reuse, keeps contracts simple, and makes the system independent of UI and storage choices.
Only proposal hashes are stored onchain — full proposal content and metadata lives on the ornode. Orclient abstracts this split: it translates user inputs into contract calls, uploads proposal data to the ornode, and merges onchain + offchain data into consistent reads. See the orclient README for more.
---
title: "Architecture layers (arrows = dependencies)"
---
flowchart TD
subgraph apps["Apps"]
gui[apps/gui]
docs[apps/orclient-docs]
end
subgraph clientlibs["App-facing Libraries"]
orclient[libs/orclient]
privy[libs/privy-react-orclient]
end
subgraph domain["Domain Model"]
ortypes[libs/ortypes]
orec[contracts/orec]
respect[contracts/respect1155]
end
subgraph backend["Backend"]
ornode[services/ornode]
end
gui --> privy
gui --> orclient
gui --> ortypes
docs --> orclient
privy --> orclient
orclient --> ortypes
ortypes --> orec
ortypes --> respect
ornode --> ortypes
- OREC — Optimistic Respect-based Executive Contract. Enables DAOs to execute onchain actions democratically while avoiding voter-apathy through a low quorum + veto period design.
- Respect1155 — ERC-1155 Respect token. Non-transferrable awards (NTTs) with a denomination that sums to a fungible Respect balance.
- SolidRespect — ERC-20-compatible non-transferrable Respect token where the entire distribution is fixed at deployment.
- ornode — Backend API service that stores proposal content, attachments, votes, and Respect token metadata offchain. OREC only stores proposal hashes onchain; the ornode holds the full data.
- orclient — Client library for ORDAO apps. Handles proposal creation (translate → submit onchain → upload to ornode), voting, execution, and querying — abstracting the onchain/offchain split. (Full API docs)
- privy-react-orclient — React hooks and context provider for integrating orclient with Privy authentication. Includes fallback to read-only mode when no wallet is connected.
- ortypes — Shared domain model: TypeScript types, Zod validation schemas, and the translation layer between user inputs and contract calls. The core that all other components depend on.
- ts-utils — Shared TypeScript utilities (serialization, object helpers, error handling).
- zod-utils — Zod schema reflection and introspection utilities.
- ethers-decode-error — Decode ethers.js smart contract errors into human-readable messages.
- gui — ORDAO frontend built with React, Chakra UI, and TanStack Router. Currently implements breakout-result submission and proposal management for fractals.
- orclient-docs — Generated API documentation site for orclient. (Live)
- OREC whitepaper — Design and specification of the Optimistic Respect-based Executive Contract.
- Optimism Fractal update to ORDAO — Comparison with older Optimism Fractal software and the proposed upgrade path. Provides historical context for how ORDAO was created.
- Upgrade path details - details of the upgrade procedure used by Optimism Fractal. A precedent for how communities can transition to ORDAO and how ORDAO can be renewed in the communities that already use it.
ORDAO components combine to create apps for community DAOs. Several fractal communities are running ORDAO instances today:
| Community | ORDAO Instance | Comments |
|---|---|---|
| Eden Fractal | eden.frapps.xyz | |
| Optimism Fractal | optimism.frapps.xyz | ORDAO originated as an upgrade to Optimism Fractal's older software. See the upgrade document for a comparison and migration path. |
| ZAO Fractal | zao.frapps.xyz |
To deploy an ORDAO instance for your community, you can use the orfrapps repository. It provides configuration files, deployment scripts, and CLI tools for setting up and maintaining ORDAO instances for fractal communities. This repository (ordao) contains the source code and is included in orfrapps as a submodule.
You can run individual ORDAO components or the whole ORDAO fractal app locally by using scripts in package.json. The project uses Lerna workspaces.
To run the full ORDAO stack locally against a local Hardhat chain:
-
Start a local chain (keep running in its own terminal):
npm run dev:chain
-
Deploy contracts to the local chain:
npm run dev:cdeploy
Alternatives:
dev:cdeploy:erc20deploys with an ERC-20 parent Respect token. -
Start ornode (connects to local chain and local MongoDB):
npm run dev:ornode-clean
Use
dev:ornodeto keep existing data, ordev:ornode-erc20-clean/dev:ornode-erc20for ERC-20 variants. -
Start the GUI dev server (keep running in its own terminal):
npm run dev:gui
Alternative:
dev:gui-erc20for the ERC-20 variant. -
Watch for code changes (optional, rebuilds libraries automatically):
npm run dev:watch
This watches all packages except the GUI and rebuilds dependents on change.
Scripts are also available for running against live testnets:
| Ornode | GUI | Network |
|---|---|---|
dev-op-sepolia:ornode |
dev-op-sepolia:gui |
OP Sepolia |
dev-of2:ornode |
dev-of2:gui |
Optimism Fractal |
dev-zaof:ornode |
dev-zaof:gui |
ZAO Fractal |
npm run build # build all packages (via Lerna)
npm run build-no-ornode # build all except ornode
npm run build-clean # clean and rebuild all from scratch
npm run clean # clean all build outputs| Command | Description |
|---|---|
npm test |
Run tests across all packages |
npm run test-integration |
Run integration tests |
npm run watch |
Watch all packages and rebuild on change (including dependents) |
npm run gen-ornode-client |
Regenerate the ornode API client and copy it into orclient |
npm run dev:orclient-docs |
Serve orclient-docs locally on port 5174 |