You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/03-onchain-architecture.md
+50-28Lines changed: 50 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,77 +14,99 @@ The Guild’s smart contract architecture is modularized as follows:
14
14
15
15
### Vesting Contract
16
16
17
-
- Official documentation: [https://docs.splits.org/core/vesting](https://docs.splits.org/core/vesting)
18
-
19
-
The Guild’s donation address is an immutable vesting contract which irrevocably vests donated funds on a linear, block-by-block, basis over 4 years. Here, "irrevocably" means donations **cannot** be stopped or otherwise redirected during the vest by anyone, be it the donor or Protocol Guild membership.
20
-
21
-
Anyone can donate ETH and ERC-20 tokens to the vesting contract on mainnet.
17
+
The Guild’s donation addresses on Ethereum mainnet, Arbitrum, Base and Optimism are immutable vesting contract, built by the [Splits](https://splits.org/) team, which irrevocably vests donated funds on a linear (block-by-block), basis over 4 years. Here, "irrevocably" means donations **cannot** be stopped or otherwise redirected during the vest by anyone, be it the donor or Protocol Guild membership. Anyone can donate ETH and ERC-20 tokens to these vesting contract.
22
18
23
19
**NFT donations are not supported** - standard NFT transfers (safeTransfer) will be rejected by the contract (i.e. meaning the transaction will fail), while non-safeTransfer NFT donations will be lost.
24
20
25
21
**How it works:**
26
22
- Donated tokens will accrue in a per-asset queue until a vesting stream is started for that batch of tokens, by triggering the `startStream` function (permissionless, as in any actor can trigger this function, regardless of whether they are a Guild member)
27
23
- Once the vesting stream is started, the tokens will vest linearly over 4 years, and anyone can permissionlessly trigger `releaseStream` to push any vested tokens into a pass-through wallet (this must be done per vesting stream)
24
+
- Official documentation: [https://docs.splits.org/core/vesting](https://docs.splits.org/core/vesting)
28
25
29
26
All donated tokens are thus forced to vest - there is no way to do anything with them until they are vested into the pass-through wallet.
30
27
31
-
### Pass-Through Wallet
28
+
**Deployed Vesting Contracts:**
32
29
33
-
- Official documentation: [https://docs.splits.org/core/pass-through](https://docs.splits.org/core/pass-through)
All funds from the mainnet vesting contract go into a pass-through wallet (PTW), which pools vested tokens to be pushed to the split contract. (A PTW is not deployed on Optimism, there funds from the vesting contract go straight to the split.)
37
+
### Pass-Through Wallet
38
+
39
+
All funds from vesting contracts go into a pass-through wallet (PTW), built by the [Splits](https://splits.org/) team, which pools vested tokens to be pushed to split contracts.
36
40
37
-
The PTW allows the Guild’s membership to make arbitrary calls with vested tokens if needed, since the current split contract does not have arbitrary call functionality. For the avoidance of doubt: the PTW can only be used to interact with tokens which have already finished vesting. Tokens still vesting in the [vesting contract](https://app.splits.org/accounts/0x25941dc771bb64514fc8abbce970307fb9d477e9/) cannot be prematurely interacted with.
41
+
The PTW allows the Guild’s membership to make arbitrary calls with vested tokens if needed, since the current split contract does not have arbitrary call functionality. For the avoidance of doubt: the PTW can only be used to interact with tokens which have already finished vesting. Tokens still vesting in vesting contracts cannot be prematurely interacted with.
38
42
39
43
**How it works:**
40
44
- The PTW has a permissionless `passThrough` function, which allows anyone to push vested funds accumulated in the PTW to the contract's `passThrough`, which is set to the Guild’s split contract.
41
45
- The PTWs owner (the Guild’s multisig), can pause / unpause the contract by changing the `paused` value, allowing the owner to move specific tokens using arbitrary calls instead.
42
46
- The PTW owner can also update the `passThrough` recipient if needed e.g. if the Guild migrates to a different split contract in the future
47
+
- Official documentation: [https://docs.splits.org/core/pass-through](https://docs.splits.org/core/pass-through)
The split contract contains all Guild members’ addresses and their respective share of vested funds (based on the time-weight formula).
56
+
### Split Contract
51
57
52
-
Unlike the vesting contract, the split contract is mutable, as it needs to be updated quarterly to reflect changes to the membership (i.e. members being added or removed), as well as to update member weights over time.
58
+
Split contracts, built by the [Splits](https://splits.org/) team, contain all Guild members’ addresses and their respective share of vested funds (based on the time-weight formula). Unlike the vesting contract, the split contract is mutable, as it needs to be updated quarterly to reflect changes to the membership (i.e. members being added or removed), as well as to update member weights over time.
53
59
54
-
**How split distributions work:**
55
-
- The `distribute` function allocates tokens in the split contract to Guild members according to their weights (it does not move the funds into the member wallets)
56
-
- Once distribute has been triggered, members can trigger the `withdrawForMyself` function to deposit tokens into their wallets
60
+
**How it works:**
61
+
- Distributions:
62
+
- The `distribute` function allocates tokens in the split contract to Guild members according to their weights (it does not move the funds into the member wallets)
63
+
- Once distribute has been triggered, members can trigger the `withdrawForMyself` function to deposit tokens into their wallets
64
+
- Updates:
65
+
- Membership changes are ratified once a quarter with a vote in the Guild’s Moloch V3 DAO, where new members are added / old members are removed in an onchain “Signal Proposal”
66
+
- Once the DAO proposal is executed, the Guild’s 6/10 multisig exports the offchain membership registry (with member addresses and weights), and uploads it as a CSV into the split contract to update it
- Membership changes are ratified once a quarter with a vote in the Guild’s Moloch V3 DAO, where new members are added / old members are removed in an onchain “Signal Proposal”
60
-
- Once the DAO proposal is executed, the Guild’s 6/10 multisig exports the offchain membership registry (with member addresses and weights), and uploads it as a CSV into the split contract to update it
- Official documentation: [https://moloch.daohaus.fun/](https://moloch.daohaus.fun/)
66
-
67
84
The Guild uses [DAOhaus'](https://daohaus.club/) Moloch V3 contracts for onchain governance. The DAO includes all Guild members, with one person one vote, including vote delegation.
68
85
69
86
The DAO does not keep track of member weights, nor does it hold any funds. Currently, it is only used to ratify changes to the membership onchain. These changes are then processed by the Guild’s multisig (by updating the split contract).
70
87
71
-
**Proposal flow:**
88
+
**How it works:**
72
89
- Once a quarter, “Signal Proposals” are used to ratify changes to the membership onchain, which adjusts the DAO’s members in bulk (i.e. adding and removing members)
73
90
- All proposals need to be sponsored by a DAO member before the voting period starts
74
91
- The voting period lasts 5 days, with a 33% quorum required for proposals to pass
75
92
- Proposals that reach quorum have a 2-day grace period before they can be executed
93
+
- Official documentation: [https://moloch.daohaus.fun/](https://moloch.daohaus.fun/)
76
94
77
-
### Multisigs
95
+
**Deployed DAOs:**
78
96
79
-
- Official documentation: [https://docs.safe.global/](https://docs.safe.global/)
The Guild has deployed 6/10 [Safe](https://safe.global/) multisig contracts to control the PTW and split contract, and to claim funds on mainnet and optimism (when donations cannot be sent to the vesting contact directly). Multisigs are also used to receive donations on most L2s, and then bridge those funds to mainnet.
82
102
83
103
The multisigs’ signers are not disclosed publicly, and are rotated regularly.
84
104
85
105
The aim is to reduce reliance on multisigs over time, to replace them with the DAO or other more trustless alternatives as the become available.
86
106
87
-
Multisigs associated with Protocol Guild:
107
+
Safe official documentation: [https://docs.safe.global/](https://docs.safe.global/)
0 commit comments