---
# System prepended metadata

title: DAO-owned Colinks Account PoC

---

## DAO-owned Colinks Account Proof of Concept

### A. Setup: initialize Colinks by buying your own CoLink
1. Call buyLinks via a DAO proposal. Params:
    - function: buyLinks
    - contract: 0x7154cA7E4C756E06151aefA2D765404950FA0EE1
    - value: 0
    - linkTarget: 0x67Bdee1074C3c1d662caD482c2d2760840c0e83B
        - Note: must be the same address that is sending the transaction
    - amount: 1
2. Example DAO proposal: https://admin.daohaus.club/#/molochV3/0xa/0x0eeb24606dbf6c1c54d57b09fa2be1c58b650015/proposal/1
3. Tx: https://optimistic.etherscan.io/tx/0xeb3a3e8ab8287f4602c4aac469d5921dc3c28ab0d6783fb72ff9f4def9cf0dda

### B. Anyone can buy the DAO's CoLink directly from the contract
1. Go to contract on etherscan https://optimistic.etherscan.io/address/0x7154ca7e4c756e06151aefa2d765404950fa0ee1#readContract
2. Call getBuyPriceAfterFee read function with the DAO's address and desired number of links. Params:
    - linkTarget: 0x67Bdee1074C3c1d662caD482c2d2760840c0e83B
    - amount: 1
    - response: 849687500000000
3. Convert the number to decimal --> 0.000849687500000000
    - Note: inputting as decimal in etherscan was unusual from my exp, but worked
4. Call buyLinks write function from any address. Params:
    - buyLinks: 0.000849687500000000
    - linkTarget: 0x67Bdee1074C3c1d662caD482c2d2760840c0e83B
    - amount: 1
5. How it looks in the CoLinks UI:
    - ![telegram-cloud-photo-size-1-4907178557667650778-x](https://hackmd.io/_uploads/BJe8t-Zwp.jpg)


### C. Buy other CoLinks via DAO proposal
1. Go to contract on etherscan https://optimistic.etherscan.io/address/0x7154ca7e4c756e06151aefa2d765404950fa0ee1#readContract
2. Call getBuyPriceAfterFee read function with the desired target's address and number of links. Params:
    - linkTarget: 0x0204909194588909ea98244b9d5A2D074a3ABdF2
    - amount: 1
    - response: 574687500000000
3. Ensure there are sufficient funds inside the DAO treasury (in the example case here: inside the treasury Safe inside the Moloch DAO)
4. Call buyLinks via a DAO proposal with the price above. Params:
    - function: buyLinks
    - contract: 0x7154cA7E4C756E06151aefA2D765404950FA0EE1
    - value: 574687500000000
    - linkTarget: 0x0204909194588909ea98244b9d5A2D074a3ABdF2
    - amount: 1
5. Note: this will error out if someone else buys the link before the proposal passes and is executed
6. Example DAO proposal: https://admin.daohaus.club/#/molochV3/0xa/0x0eeb24606dbf6c1c54d57b09fa2be1c58b650015/proposal/4
7. Tx: https://optimistic.etherscan.io/tx/0xc4337e5448cb6e9d298670994f15491b384fb23504eab9eb15da2662cc65b7b6
8. How it looks in the CoLinks UI:
    - ![telegram-cloud-photo-size-1-4907178557667650786-x](https://hackmd.io/_uploads/SkJmKbZD6.jpg)
