near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
108 stars 77 forks source link

Auto kill time for the DAO #39

Open ilblackdragon opened 3 years ago

ilblackdragon commented 3 years ago

Set an auto-kill time -> if there were no passed proposals for X days/weeks/months => it kills the DAO and sends funds to the dedicated account

This might be a good requirement for Treasury DAO investing into other DAOs - they should have auto kill setup toward it, in case the council bails/looses access/or whatever.

mikedotexe commented 2 years ago

Seems like this can be an optional case, designated when calling the new function and giving it parameters.

ctindogaru commented 2 years ago

Hey, can you please be more explicit about what do you want to happen when you kill the DAO? Is there any option to delete a DAO at the moment?

ctindogaru commented 2 years ago

Also, would this work for you if there were no proposals created for X days/weeks/months instead of if there were no passed proposals for X days/weeks/months?

We have access to the last proposal created so it's easy to check if the last proposal was created in the last week/month etc. But if we need the last passed proposal, we need to iterate through all of the proposals which requires a bit more time and gas.

TrevorJTClarke commented 2 years ago

Chiming in on this: I've heard & needed the following types of DAO deletions:

  1. DAO is dissolving - allow the DAO to fully remove its account from factory & storage. This is needed if a DAO is ever an entity that needs to have an end event.
  2. Locked DAO - allow a DAO to set a preference that will allow any external account to remove the DAO, following all pre-defined exit parameters (Beneficiary list for any funds / etc.)
  3. NON-Dissolvable DAO - In some cases it makes sense to not allow DAOs to ever be removed, as they could be owners of data or other assets (think collections of NFTs, indexed data other contracts rely on like a DEX, etc) which would be broken if this DAO didn't exist.

I want to call out the part about an "auto-kill" time - I don't think it should be an automatic thing but rather a threshold of time that can then get a finalize_remove method triggered by any account. The DAO can reset the threshold by activity, resetting each DAO's internal TTL. Minor distinction so the built feature doesn't include logic about automatic removing.