šŸ° DAOhaus x Fork the World šŸ“

Dekan Brown
DAOhaus.club
Published in
6 min readAug 28, 2020

For the Fork the World hackathon DAOHaus sponsored some bounties related to the exploration of the Moloch Minion.

Moloch Minion is a Moloch contract extension that can receive tokens, send tokens, and call external contracts. It has itā€™s own GuildBank and itā€™s own proposal process, however, for Minion proposals to pass they need to be approved by their parent Moloch. Think of Minion as a sidecar to Moloch that allows it to do more things in the wild world of Ethereum.

But how does it work!? Minion is a contract that stores the data about a transaction and only allows execution after a Moloch proposal passes to approve the transaction. In keeping with the Moloch principle of simplicity itā€™s only 95 lines of code, but itā€™s very powerful. Because itā€™s so simple itā€™s easy to read, understand, and modify. We encourage you to fork it and create Minions of your own!

We thought this idea of a Moloch DAO that can vote on running any arbitrary contract call was pretty cool so we created bounties for DAO Hack Month to help people hack on it. We kept the bounties vague because we really wanted to get some creative discussion around different possibilities. Amazing things happened!

Right off the bat we got some great discussion and great ideas coming in from the community. Things like DAO owned NFT minters, DeFi enabled DAOs that can interact with Uniswap, DAOs that manage their own metadata updates through proposals, and all new types of Minion proposals ones that use quorum to fast track proposals though grace periods or even proposals that mint tokens, and a bunch of other crazy ideas.

Now for the winners

The winners were very active in discussion and had many ideas and creative solutions. The best kind of hackers āš”

NFT Welcome Kit

Notes from @tarun:

I have been learning Solidity and web3 development and was looking for a project to contribute to. While exploring bounties on Gitcoin during DAO hack month I found this bounty by DAOHaus. I looked at the github repo and started looking more into Moloch DAO, Raid Guild and DAOHaus. Earlier I was learning about Aragon and wanted to try my hand at creating a DAO but was not able to do so because of the complexity of the DAO deployment process. Turned out that DAOHaus is solving the exact same problem, they have developed a platform that allows anyone to create a DAO and also provides them with an interface to interact with DAO contracts. This bounty is part of one of many extensions they plan to implement for standard Moloch DAO. They have developed a contract called Minion that allows extending Moloch DAO with arbitrary logic. Suddenly Moloch DAO along with Minion looked like a dead simple micro framework for custom DAO development that anyone can start with over a weekend. It was enough to get me involved.

After applying for the bounty I joined DAO hack month discord there I got answers to all my questions regarding specifics of feature requirements from DAOHaus and Raid Guild members. Later I joined the Raid Guild discord and got to work with the Raid Guild community. They all helped me throughout the development process. They are very flexible and always ready to help (including members of the core team). Itā€™s been a really great experience working with the Raid Guild team to complete POC for this feature.

Minion Public Resolver, Minion Defi Explorations, & Minion 51% attack

Notes from @heavychain:

Minion Public Resolver Writeup
The Minion Public resolver takes the regular minion contract and narrows its functionality to one thing. It allows a minion to change an ENS content hash via a moloch DAO minion proposal.

Using this tool, a DAO can control an IPFS website. Any changes to the website have to be approved via a DAO proposal. This can also be a solution for managing a DAOā€™s metadata. In order for the MPR to function, the MPRā€™s address must be set as the ā€˜controllerā€™ for the ENS domain. The DAOā€™s general minion ought to be set as the domain ā€˜registrantā€™ so that more complex interactions beyond changing the ENS content hash can be handled accordingly.

In order to create this tool, I consulted the ENS public resolver contract. The function setContentHash(bytes32 node, bytes calldata hash) is used to change the ENS content hash, and this is the single function that the MPR gives access too. To make an MPR proposal, one must call proposeSetContentHashand input a node(unique identifier for each domain), hash (the domainā€™s content hash record), and description (standard text description for moloch dao proposals). Once this is called correctly, a standard moloch DAO proposal is created and just waiting to be sponsored.

Something to consider
Part of this experiment is looking at using a refined minion (as opposed to a general minion). The MPR only allows one specific function call type to one specific contract. It would be cheaper in terms of gas costs to launch a single general minion for a DAO. The general minion can handle any arbitrary function call to any contract. This means that one can already control ENS content hashes with the general minion.

It is possible, however, that the costs of launching refined minions for a DAO, in addition to a general minion, could be justified. It may be easier for DAO members to make sense of minion proposals when they come from a contract with more constrained functionality. Those familiar with the MPR, for example, would see a new proposal from the MPR and know exactly what type of function call is being proposed by virtue of it being the only function call available to the MPR.

The refined minion may be particularly well-suited for relatively frequent interactions. If a DAO has a set of websites that it updates somewhat frequently, it may make sense to manage those sites with a dedicated, more strictly defined, minion.

On the other hand, it is possible that the front end UI could handle making minion proposals more digestible to its human owners without the need for refined minions. The front end could reserve a special badge for minion proposals that follow the exact specifications of calling function X at contract address Y using correct formatting Z.

The tradeoffs between these two minion patterns is something this author would like to explore more.

Win Win

Extra bonus both winners were championed into RaidGuild for their contributions. If youā€™re hacking on cool stuff we want you to level up with us!

Thanks for reading, and big congrats to the winners. Watch for more bounties around the Moloch Minion and if you are Web3 hacker that is into this kind of stuff check out Raidguild. If you want to join the growing DAOHaus community join the DAOhaus or RaidGuild Discords. And if youā€™re ready to summon a DAO yourself share your ideas in the DAOhaus tavern šŸ», then go to the DAOhaus Club to launch your own!

--

--