Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r/boards] initialize realm-level AdminDAO #3345

Open
11 tasks
salmad3 opened this issue Dec 16, 2024 · 1 comment
Open
11 tasks

[r/boards] initialize realm-level AdminDAO #3345

salmad3 opened this issue Dec 16, 2024 · 1 comment
Assignees

Comments

@salmad3
Copy link
Member

salmad3 commented Dec 16, 2024

Context:

⚠️ Criteria is a WIP

The AdminDAO is a crucial component of the boards realm, responsible for managing high-level configurations and permissions. It serves as the primary administrative entity for the entire boards realm, separate from individual board management. The AdminDAO needs to be initialized with appropriate permissions and functionalities to oversee the boards realm effectively.

Acceptance Criteria:

  • Implements an AdminDAO struct with necessary fields:

    Example
    type AdminDAO struct {
        Members []Address
        Proposals []Proposal
        Config BoardsRealmConfig
    }
    
    type BoardsRealmConfig struct {
        MinBoardNameLength int
        DefaultBoardCreationCost uint64
        BoardNameValidationCallback func(string) (bool, uint64)
    }
  • An InitializeAdminDAO function sets up the initial state:

    Example
    func InitializeAdminDAO(initialMembers []Address) *AdminDAO {
        return &AdminDAO{
            Members: initialMembers,
            Proposals: []Proposal{},
            Config: BoardsRealmConfig{
                MinBoardNameLength: 3,
                DefaultBoardCreationCost: 1000000, // 1 GNOT
                BoardNameValidationCallback: defaultBoardNameValidation,
            },
        }
    }
    
    func defaultBoardNameValidation(name string) (bool, uint64) {
        if len(name) < 3 {
            return false, 0
        }
        if len(name) <= 6 {
            return true, 10000000 // 10 GNOT for short names
        }
        return true, 1000000 // 1 GNOT for regular names
    }
  • Implements a proposal system for AdminDAO decisions:

    • Create proposals
    • Vote on proposals
    • Execute approved proposals
  • Includes a mechanism to add or remove AdminDAO members through proposals.

  • Functions for the AdminDAO to manage global boards realm settings:

    • Set minimum board name length
    • Set default board creation cost
    • Set board name validation callback
  • Ensures the AdminDAO can set and update the callback function for board name validation:

    Example
    func (dao *AdminDAO) SetBoardNameValidationCallback(callback func(string) (bool, uint64)) {
        dao.Config.BoardNameValidationCallback = callback
    }
    
  • Includes a function for the AdminDAO to freeze a board in case of policy violations:

    Example
    func (dao *AdminDAO) FreezeBoard(boardName string) error {
        // Implementation
    }
    
  • Includes a function for the AdminDAO to set realm-wide notifications:

    Example
    func (dao *AdminDAO) SetRealmNotification(message string) {
        dao.Config.RealmNotification = message
    }
    
  • Ensures the AdminDAO can manage the upgrade process for the boards realm:

    • Set upgrade path
    • Approve upgrades
    • Manage transition to new versions
  • Implements a mechanism to handle name change lookups:

    Example
    type NameChangeRecord struct {
        OldName string
        NewName string
        Timestamp time.Time
    }
    
    func (dao *AdminDAO) RecordNameChange(oldName, newName string) {
        // Implementation
    }
    
    func (dao *AdminDAO) LookupCurrentName(name string) string {
        // Implementation
    }
    
  • Unit tests to verify the functionality of the AdminDAO

    • Member management
    • Proposal system
    • Configuration updates.

Notes:

  • The AdminDAO should reside within the boards realm, not as a separate realm.
  • The AdminDAO should not have direct control over individual boards but should be able to intervene in extreme cases (e.g., freezing a board).
  • The initial implementation should be simple, with the expectation that more complex governance mechanisms may be added in future versions.
  • The AdminDAO should be designed with the possibility of future integration with a chain-level governance system (GovDAO) in mind.
  • For the MVP, the AdminDAO will have no owner, only admins. The chain-level governance (GovDAO) will have the ability to replace admins in the future.
  • The board name validation should initially enforce the same rules as the users realm (e.g., ending with three digits for free names).
@salmad3
Copy link
Member Author

salmad3 commented Dec 16, 2024

Initial work includes the following:

  • An AdminDAO struct has been implemented, which includes members, proposals, and configuration fields.
  • Functions for adding and removing members from the AdminDAO have been created.
  • The AdminDAO has been integrated with the board creation process.
  • Functions for inviting members and assigning roles have been implemented.
  • A basic proposal system structure has been added to the AdminDAO (though it's noted that it needs further implementation).

@salmad3 salmad3 changed the title [r/boards] initialize global AdminDAO [r/boards] initialize realm-level AdminDAO Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

2 participants