Security

This document covers the security architecture, patterns, and practices implemented across Built By DAO's smart contract system.


circle-info

🔐 Security Overview

🔒 Access
🛡️ Guards
📊 Limits
🔍 Audits

Role-based

Reentrancy

Safety rails

External review

circle-info

🎯 Purpose: Protect user funds and ensure system integrity

🔒 Principle: Defense in depth with multiple security layers


🔒 Access Control Model

Role-Based Access

Pattern
Implementation

📜 Standard

OpenZeppelin AccessControl

🔑 Hierarchy

Admin can grant/revoke

🏷️ Granular

Per-function permissions


Standard Roles

Role
Purpose
Holder

DEFAULT_ADMIN_ROLE

Super admin

Multisig

ADMIN_ROLE

Admin functions

Ops team

MINTER_ROLE

Token minting

Authorized contracts

GOVERNANCE_ROLE

Governance execution

Timelock


Role Assignment

// Only admin can grant roles
function grantRole(bytes32 role, address account)
    public virtual onlyRole(getRoleAdmin(role));

// Role-protected function
function mint(address to, uint256 amount)
    external onlyRole(MINTER_ROLE);

Founder → Multisig Transition

Phase
Control

🔵 Launch

Founder single-sig

🟡 Transition

enableMultisig()

🟢 Operational

Multisig control


One-Way Transition

No way to disable once enabled.


chevron-right📊 Security Checklisthashtag

Access Control:

Token Security:

Financial Security:

Governance Security:


circle-check

🔐 Security Principles


💻Overviewchevron-rightArchitecturechevron-rightTreasurychevron-rightTestingchevron-right

Last updated