--- tags: Specification, Agreements --- # Collab.Land <> Raid Guild <> Talent DAO ⚔️ Spec > Specification introducing the requirements and an overview of the deliverables for this project. <br /> ![Raid Party](https://i.imgur.com/pwllxIO.png) <br /> ## Proposal from RaidGuild See [Smart Contract Scope ](https://hackmd.io/@KyleStargarden/rywvkxYbs) - **Required Resources** - [Collab.Land Docs](https://collabland.freshdesk.com/support/home) - [Zodiac Module Setup](https://gnosis.github.io/zodiac/docs/tutorial-build-a-module/setup) - [Moloch v3 Shaman Docs](https://baal-docs.vercel.app/tools/shaman) (phase 2) - [Discord Bot Docs](https://discord.com/developers/docs/intro) - **Goal** - Provide RaidGuild with a semi-detailed overview of the resources required to build out a Collab.Land Zodiac bot module that can plug-into Collab.Land discord based governance. *This would allow discord communities participating in “polls” to execute transactions on a gnosis safe* Why **Collab.Land Zodiac bot module?** & not bot controlled EOA that can move funds based on discord governance? - Future extendability of Safe - Better Security (veto power / grace-period) - Upgradability into a Moloch v3 & CL bot controlled Shaman --- ### Implementation Overview **High-Level:** - **context:** you have a safe w/ 2/3 or 3/5 & commands in discord control this bot - **voting:** bot handles props & voting - **quorum reached:** lock-up period (grace period), between when a proposal passes & when the propsal is executed. Bot can execute after grace-period ends. *This would give signers the ability to veto and execute a tx to remove funds from the safe in the case there is an attack on the bot attempting to remove funds* **Brief example of flow:** - 1 ETH proposal - proposal passes (quorum is reached) - all happening on the bot level - Then the bot sends a tx to the module which tells the module to transfer some funds out of the safe. --- **Phase 1** ### Zodiac Contract Work #### High-level 1. Create Collab.Land bot Zodiac module that can be added to any Safe 2. Safe can be controlled by CL bot (relayer) - create proposals discord - have discord voting - on-chain execution based on quorum - Account for security risks (pushing through malicious proposals) - **Mitigation path** - add grace period (*on-chain*)& veto signers - After grace period ends, proposal can be executed by bot - ~~Bot stores tx, after couple day grace proposal can execute~~ - ***Note***: **Old Minion Code is close to ready** - Minions don't go thru the traditional multi-sig process - Might still be able to go thru the traditional multi-sig, with the signers signing **or** the module execution - Wrap the tx execution in the grace-period - Veto should be able to be figured out! - **Solution 1:** - on-chain tx immediately following proposal quorum being met (requires an additional light-weight tx (40-50k gas) - grace-period) - **Solution 2:** - automated required EOA signature could be done (Meta Transaction with no upfront gas fee required to be paid at all & less user friction - this is a signature on the module - grace period) - requires Collab.Land to manage an EOA w/ external signers for every instance of this module being deployed. - module takes the data from the proposal - recover signer address - make sure that the signer address is the hardened EOA (less decentralized) - If so, pass tx. - UX around proposal submission, grace, and execution... - Want to show this through status updates in discord or some UI - **Drop down menu for selecting the token (based on gnosis safe balances) during proposal creation** - requirement to create the correct data for safe execution - mock it up using one specific ERC-20 contract Ex. - WETH on a testnet - adding the gnosis safe balance data - create a command to check what the balance is of certain tokens in the gnosis safe ### [Bot Commands ](https://hackmd.io/b26GPTaOQACvyranJ3XIdg) ::: spoiler **Phase 2** 3. Upgrade path vs Summon Moloch v3 from the start - CL bot Zodiac module controlled Shaman - *Setup Shaman to manage shares & loot that is controlled by the Collab.Land bot* *Additional Considerations for Phase 2 dev:* *Adding MetaTx's for Moloch v3* - could pay for tx's via a relayer - Shaman module offers reputational quota that is achieved through merit & some reputational aspect - those people gain enough power to veto or exit. --- ::: **Personnel & Skills Required:** - Solidity dev who has worked with Safe modules (Kyle) - apprentice MantisClone - CL dev to work with CL bots (Agnes w/ Penguin) **Time to Complete:** 2-weeks should be plenty of time for a MVP / PoC - **Low-lift** - Contract (bot holds a private key) that can relay discord interactions to result in on-chain tx's in the zodiac enabled safe - If we wanted, add a shaman module (optional later on) - **Heavier-lift** - interface & bot stuff will be heavier - More difficulty on the bot side, e.g.writing logic on who can vote / how people vote / when a vote is complete / & tracking the status of votes! --- **Final Deliverables Due ...** | | Amount | Time | | ---------------- | ------------- | ------------- | | Contract Engineering | 6240 wxDAI| 20 hours | | Testing | 6240 wxDAI| 20 hours | | **Total Due** | **12480 wxDAI**| **40 Hours** | *Note: the above figures include design, administration, and project management.* ## Escrow Payment Full deposit and release of 1st payment (x DAI) are expected now, while the second and last installment should be released on delivery. https://smartescrow.raidguild.org/ https://handbook.raidguild.org/docs/how-does-it-work After sending us written confirmation that you’d like to proceed and an Ethereum address to identify you as a client, we'll send the Raid ID (to be used in the escrow platform). ## In case of dispute If you lose confidence in the Raid Party at any time, you may `Lock` the remaining funds in escrow. If you do not release funds upon completion of deliverables, the Raid Party may `Lock` the remaining funds in escrow. In both cases, the `Lock` triggers the arbitration provider (i.e., LexDAO) to review the dispute. Based on their review, the arbitration provider will decide which party should receive what amount of funds, and will send a transaction to the escrow contract that will transfer the appropriate amounts to each party. We sincerely hope this won't be the case, but all parties are protected nevertheless. **We look forward to Raiding, please reach out with any questions or concerns!** <br /> ![RaidGuild Emblem](https://i.imgur.com/NTP6FC5.png)