Moloch
👹 Moloch whose mind is pure machinery! Moloch whose blood is running money!
Install / Use
/learn @MolochVentures/MolochREADME
STEAL THIS CODE
Moloch v2

Moloch whose love is endless oil and stone! Moloch whose soul is electricity and banks! Moloch whose poverty is the specter of genius! Moloch whose fate is a cloud of sexless hydrogen! Moloch whose name is the Mind!
Moloch! Moloch! Robot apartments! invisible suburbs! skeleton treasuries! blind capitals! demonic industries! spectral nations! invincible madhouses! granite cocks! monstrous bombs!
~ Allen Ginsberg, Howl
Moloch v2 is an upgraded version of MolochDAO that allows the DAO to acquire and spend multiple different tokens, instead of just one. It introduces the Guild Kick proposal type which allows members to forcibly remove another member (their assets are refunded in full). It also also allows for issuing non-voting shares in the form of Loot. Finally, v2 fixes the "unsafe approval" issue raised in the original Nomic Labs audit.
For a primer on Moloch v1, please visit the original documentation.
Design Principles
In developing Moloch v2, we stuck with our ruthless minimalism, deviating as little as possible from the original while dramatically improving utility. We skipped many features again and believe our design represents a Minimally Viable For-Profit DAO, yet one flexible enough to support a variety of use decentralized cases, including venture funds, hedge funds, investment banks, and incubators.
Overview
Moloch v2 is designed to extend MolochDAO's operations from purely single-token public goods grants-making to acquiring and spending (or investing in) an unlimited portfolio of assets.
Proposals in Moloch v2 now specify a tribute token and a payment token, which can be any whitelisted ERC20. Membership proposals which offer tribute tokens in exchange for shares can now offer any token, possibly helping balance the DAO portfolio. Grant proposals can now be in both shares and a stablecoin payment token to smooth out volatility risk, or even skip shares entirely to pay external contractors without awarding membership. Members can also propose trades to swap tokens OTC with the guild bank, which could be used for making investments, active portfolio management, selloffs, or just to top off a stablecoin reserve used to pay for planned expenses.
In addition to standard proposals above, there are two special proposals. The first is for whitelisting new tokens to be eligible as tribute, and the second is for removing DAO members via Guild Kick. Both follow the same voting mechanics as standard proposals (no quorum, simple majority rules).
MolochLAO
In order to limit legal liability on members of a for-profit deployment of Moloch v2, the members may opt to form a LAO. LAOs are DAOs wrapped in a legally compliant entity, such as an LLC or C-Corp. The LAO can enter legal contracts, custody offchain assets (e.g. SAFTs), and distribute dividends. Investors in a LAO must be accredited, but service providers compensated in LAO shares can earn their shares of the LAO portfolio.
The current Moloch v2 contract standard was designed through a collaborative effort between MetaCartel, ConsenSys’s The LAO, and Moloch. The MetaCartel Venture DAO is expected to be the first deployment of Moloch v2 and blaze the trail for other for-profit DAOs to follow. Check out the Venture DAO whitepaper for more information.
Security Tokens
To interface with offchain securities like SAFTs, the MolochLAO will issue security tokens that follow the Claims Token Standard ERC-1843 and the Simple Restricted Token Standard ERC-1404. Upon distribution of the SAFT tokens, the LAO custodian would send them to the claims token contract to be distributed to the claims token holders.
For equity, debt, or other revenue yielding securities the LAO custodian would receive the proceeds, liquidate to a token suitable for dividends (e.g. DAI) and then send the dividend tokens to the claims token contract to be distributed to the claims token holders.
Members that ragequit and receive their fraction of all LAO-held security claims tokens will still be able to use their various claims token to withdraw their dividends from each claims token contract.
Transfer restrictions will be enforced such that the security claims tokens can only be transferred to other DAO members, or other addresses whitelisted by the LAO admins.
Installation
To intall this project run npm install.
Testing
To tests the contracts run npm run test.
To compute their code coverage run npm run coverage.
Deploying an interacting with a Moloch DAO and a Pool
This project includes Hardhat tasks for deploying and using DAOs and Pools.
Deploying a new DAO
Follow this instructions to deploy a new DAO:
- Edit
hardhat.config.js, setting the values forINFURA_API_KEYandMAINNET_PRIVATE_KEY. - Edit
deployment-params.js, setting your desired deployment parameters. - Run
npx hardhat moloch-deploy --network mainnet - Edit
hardhat.config.js, setting the address of the DAO innetworks.mainnet.deployedContracts.moloch.
Deploying a new Pool
Follow this instructions to deploy a new Pool:
- Edit
hardhat.config.js, setting the values forINFURA_API_KEYandMAINNET_PRIVATE_KEY. - Make sure you have the right address in
hardhat.config.js'snetworks.mainnet.deployedContracts.molochfield. - Run
npx hardhat pool-deploy --network mainnet --shares <shares> --tokens <tokens>with the initial amount of tokens you want to donate to the pool, and how many shares you want in return.
Interacting with the smart contracts
This project has tasks to work with DAOs and Pools. To use them, you should first follow this instructions:
- Edit
hardhat.config.js, setting the values forINFURA_API_KEYandMAINNET_PRIVATE_KEY. - Make sure you have the right address in
hardhat.config.js'snetworks.mainnet.deployedContracts.molochfield. - If you want to use a Pool, make sure you have the right address in
hardhat.config.js'snetworks.mainnet.deployedContracts.poolfield.
After following those instructions, you can run npx hardhat to get a list with all the tasks:
$ npx hardhat
AVAILABLE TASKS:
clean Clears the cache and deletes all artifacts
compile Compiles the entire project, building all artifacts
console Opens a hardhat console
flatten Flattens and prints all contracts and their dependencies
help Prints this message
moloch-deploy Deploys a new instance of the Moloch DAO
moloch-process-proposal Processes a proposal
moloch-ragequit Ragequits, burning some shares and getting tokens back
moloch-submit-proposal Submits a proposal
moloch-submit-vote Submits a vote
moloch-update-delegate Updates your delegate
pool-add-keeper Adds a keeper
pool-deploy Deploys a new instance of the pool and activates it
pool-deposit Donates tokens to the pool
pool-keeper-withdraw Withdraw other users' tokens from the pool
pool-remove-keeper Removes a keeper
pool-sync Syncs the pool
pool-withdraw Withdraw tokens from the pool
run Runs a user-defined script after compiling the project
test Runs mocha tests
You can run npx hardhat help <task> to get help about each tasks and their parameters. For example:
$ npx hardhat help moloch-submit-proposal
hardhat version 2.0.0
Usage: hardhat [GLOBAL OPTIONS] moloch-submit-proposal --applicant <STRING> --details <STRING> --shares <STRING> --tribute <STRING>
OPTIONS:
--applicant The address of the applicant
--details The proposal's details
--shares The number of shares requested
--tribute The number of token's wei offered as tribute
moloch-submit-proposal: Submits a proposal
For global options help run: hardhat help
Changelog v2

To expect God to care about you or your personal values or the values of your civilization, that’s hubris.
To expect God to bargain with you, to allow you to survive and prosper as long as you submit to Him, that’s hubris.
To expect to wall off a garden where God can’t get to you and hurt you, that’s hubris.
To expect to be able to remove God from the picture entirely…well, at least it’s an actionable strategy.
I am a transhumanist because I do not have enough hubris not to try to kill God.
~ Scott Alexander, Meditations on Moloch
Moloch v2 is minimally different from Moloch v1, please read the original documentation first, and then the changelog below.
Moloch.sol
General Changes
In order to circumvent Solidity's 16 parameter "stack too deep" error we combined several proposal flags in the Proposal struct into the flags array.
struct Proposal {
// ...
bool[6] flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
// 0. sponsored - true only if the proposal has been submitted by
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
