A modular, protocol-level governance infrastructure designed for long-term institutional control.
Engineered with Account Abstraction (ERC-4337), Real-time Treasury Telemetry, and Automated Yield Strategies.
π» View Source Code β’ π System Documentation β’ π View On-Chain Registry
Sentinel DAO represents a paradigm shift in on-chain organization management. It is not merely a voting tool; it is critical infrastructure designed to survive the adversarial nature of the dark forest. Engineered as a modular 'Operating System' for sovereign capital, Sentinel bridges the gap between rigorous, immutable smart contract security and frictionless user experience. By strictly separating state (Kernel) from logic (Plugins) and integrating a non-custodial Account Abstraction layer, it ensures that complex voting strategies never compromise the security of the treasury, while offering a gasless, "Web2-like" experience for stakeholders.
- ποΈ Architectural Philosophy
- β Verified Contract Addresses
- π§© Smart Contract Topology
- π» Frontend Engineering
- π§ͺ Testing & Security Vectors
- π οΈ Installation & Deployment
Sentinel DAO addresses specific failure modes observed in earlier DAO generations (Governance Attacks, Treasury Draining, and Apathy) by enforcing a strict "Code is Law" hierarchy.
- Zero Implicit Trust: The architecture follows a strict separation of concerns. No contract possesses implicit power over another. Even system administrators cannot bypass the TimelockController.
- Deterministic Execution: All state-changing proposals execute exclusively through a Timelock. This creates a transparent, immutable delay window, ensuring no governance decision is applied instantly.
- Governance as an OS: The system is designed as an Operating System. Modules (Voting Strategies, Yield Engines, Account Abstraction) are "Pluggable," allowing the DAO to upgrade logic without migrating the underlying asset-holding contracts.
All contracts are deployed and verified on the Sepolia Testnet. Click the address to view the contract on Etherscan.
| Module | Contract Name | Contract Address |
|---|---|---|
| Kernel | DAO Registry (Core) | 0xf4ffd...8cf6 |
| Security | Timelock Controller | 0xC4c57...6FCd |
| Security | Role Manager (RBAC) | 0xa5720...9d8F |
| Config | DAO Configuration | 0x2DE65...6EC1 |
| Security | Emergency Pause | 0x54078...Ba96 |
| Module | Contract Name | Contract Address |
|---|---|---|
| Gov | Hybrid Governor | 0x24BC3...CAD3 |
| Token | Governance Token | 0x7F787...c1DB |
| Guard | Proposal Guard | 0xC4015...C3bE |
| Veto | Veto Council | 0x4Abd1...5278 |
| Exit | Rage Quit Module | 0x2c26e...44a2 |
| Module | Contract Name | Contract Address |
|---|---|---|
| Vault | Main Treasury | 0xE1131...1A4E |
| Yield | Aave V3 Strategy | 0x843ab...b524 |
| Grants | Quadratic Funding | 0xFb045...b198 |
| Module | Contract Name | Contract Address |
|---|---|---|
| AA | Account Factory | 0x7B587...9E96e |
| AA | Gasless Paymaster | 0x6927f...E9cD |
| AA | Session Key Module | 0xA8F12...95Fa |
| Core | Entry Point | 0x5FF13...2789 |
The codebase is organized into logical domains, strictly separating State (Kernel) from Logic (Plugins).
src/contracts/
βββ core/ # THE KERNEL (Registry, Timelock, Treasury)
βββ aa/ # USER ABSTRACTION (ERC-4337 Smart Wallets)
βββ governance/ # CONSENSUS LAYER (Voting Logic, Tokens)
βββ security/ # DEFENSE SYSTEMS (Pause, Analytics, RBAC)
βββ treasury/ # ASSET MANAGEMENT (Yield Strategies)
The immutable heart of the protocol. These contracts define the rules of power.
DAOCore.solβ The Registry: Acts as the central source of truth. It maintains the allowlist of all active modules. If a contract is not registered here, it is not part of the DAO.DAOTimelock.solβ Execution Gatekeeper: Enforces a mandatory delay (e.g., 48 hours) on all passed proposals before execution. This strictly prevents "Flash Governance" attacks.HybridGovernorDynamic.solβ Consensus Engine: Manages the proposal lifecycle (Proposed -> Active -> Queued -> Executed). It supports modular voting strategies based on proposal type.
Designed for active capital allocation, not just passive storage.
DAOTreasury.solβ The Vault: Holds ETH, ERC-20, and NFT assets. Implements a Pull-Payment Pattern to prevent reentrancy attacks during fund transfers.TreasuryYieldStrategy.solβ Yield Optimizer: A pluggable module that automatically deposits idle treasury assets into Aave V3 lending pools, generating passive APY for the DAO.
Removes blockchain complexity to offer a "Web2-like" user experience.
DAOAccountFactory.solβ Smart Wallet Generator: Deploys deterministic, counterfactual Smart Accounts for users, enabling features like social recovery.DAOPayMaster.solβ Gas Sponsor: A protocol-funded contract that subsidizes gas fees, allowing members to vote and propose without holding ETH.SessionKeyModule.solβ UX Enhancer: Allows users to sign a single "Session Permission" (valid for X hours). This enables distinct actions (like voting) without repeated wallet popups.
Active protection systems against governance capture and malicious actors.
VetoCouncil.solβ Optimistic Guard: A multisig of trusted guardians who can cancel malicious proposals (e.g., a 51% attack to drain funds) before they execute.RageQuit.solβ Minority Protection: If a hostile proposal passes, dissenting members can burn their governance tokens to withdraw their proportional share of the treasury before the new law takes effect.ProposalGuard.solβ Anti-Spam: Enforces dynamic thresholds and reputation checks before a user can submit a proposal, preventing Governance Griefing.
The frontend is built on Next.js 14 (App Router), utilizing a modular provider pattern to manage blockchain state without a centralized backend.
- Framework: Next.js 14 (TypeScript)
- State Management: Wagmi v2 + Viem + TanStack Query
- Authentication: RainbowKit (Wallet Connect & Metamask)
- Styling: Tailwind CSS + Framer Motion (8K Animations)
- Infrastructure: Public RPC Nodes (Zero API Key dependency for resilience)
| Directory | Role & Responsibility |
|---|---|
app/ |
Routing & Pages. distinct modules (/treasury, /proposals, /guardian) using Server Components for performance. |
components/ |
UI Atoms. Reusable 8K UI elements. Includes SessionGuard.tsx which protects routes based on AA session status. |
hooks/ |
Business Logic. Custom React Hooks wrapping Wagmi/Viem: |
β’ useAASession.ts: Manages Account Abstraction session keys.
β’ useDAOData.ts: Fetches real-time governance metrics.
β’ useProposals.ts: Handles proposal lifecycle (Submit -> Vote -> Queue). |
- Unit Tests: Isolated testing of individual functions (e.g.,
test_DepositERC20) to ensure atomic logic correctness. - Integration Tests: Validating the complex interaction between modules, ensuring
Timelockcorrectly respectsGovernordelays. - Fuzz Testing:
testFuzz_EndToEndChaos: Simulates random user actions to find edge cases in state transitions.testFuzz_RageQuitMath: Verified the mathematical solvency of the exit mechanism under various economic conditions.
To run the full stack environment locally:
# Clone Repo
git clone [https://github.com/NexTechArchitect/Web3-FullStack-Sentinal-DAO.git](https://github.com/NexTechArchitect/Web3-FullStack-Sentinal-DAO.git)
cd Web3-FullStack-Sentinal-DAO
# Install Dependencies
forge install
# Run Tests
forge test
cd web3-app
# Install Node Modules
npm install
# Run Development Server
npm run dev