Closed mcgingras closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
web | ✅ Ready (Inspect) | Visit Preview | Dec 14, 2022 at 9:57PM (UTC) |
something didn't work for me going from 2->1 signers on this proposal
Going through another round of testing...
So far the following are successful --
left to test
What's included in this pr + description
Update to the moralis webook to handle changing the amount of signers on the safe.
Motivation & Context
If the number of signers change, it could be confusing to see past data on the UI.
Steps to test
Was a bit confused still how we wanted to handle this. Here's how it goes now.
If the proposal is already approved before the quorum change -- this does not really affect us. The proposal has already been approved, so we don't really care much. We might want to show some UI showing the user that the quorum has changed so we are able to notify them that we understand the change, but thats all thats really required. We also want to make sure that the UI is showing the quorum at the time of approval, and not the current quorum. For this, we need to take a snapshot of the current quorum when the proposal is approved, and persist it to the database. (Realizing this now, but an alternative might be to use the count of the signatures per role.) If a proposal is approved, and the role has 2 signatures, but the quorum is saying 3, we know there is a difference and that the role was valid with 2 signatures (or else we wouldn't have approved it) so we could use that knowledge to keep track of the snapshot.
If the proposal has not yet been approved before the quorum changes, this sort of effects us. The proposal has not yet been approved, so everything that has already happened is in limbo. Lets say we have a signer for the eng team with frog, rie, and sym. Lets say it's a 2/3 multisig, and rie has already signed the proposal.
If the threshold changes to be a 3/3, this doesn't really effect us much. We don't need to update anything.... we just know that we now need to wait for all three signatures, and the UI will automatically update this for us.
The tricker part is if the threshold decreases to 1/3. This does effect us, because now the previously pending proposal that was a 2/3 is now a 1/3. Since rie already signed the proposal, it should be considered valid. It has the 1/3 signatures required. The problem is that we are currently pushing the proposal to approved and making those associated changes at the time of approval, but now we must do it retroactively. We will listen for a moralis webhook, and find all pending proposals where the gnosis safe is a signer. We then look at the roles where the safe is a signer, see how many signers have already signed, and if the proposals should now be considered valid, we want to consider the proposal fully approved and make that mutation.
Anyways -- that leaves us with a few paths to test
For now, I am not handling changing the actual signers. It's possible to change the signers... lets say by removing frog from the mutlisig. This should null all pending proposals from that multisig where frog has already signed, since he is no longer a signer and it should not be considered valid. We can get to this case in a follow up, but it's a different webhook event, so I want to focus on the threshold change for now
Screenshots and/or loom video