DAOMetra is an implementation of a DAO (Decentralized Autonomous Organization) on the Ethereum blockchain.
The project consists of two main smart contracts:
- DAOMetraToken.sol: An ERC20 token representing the DAO's tokens.
- DAOMetra.sol: The main DAO contract managing governance.
- Implements the ERC20 standard for maximum compatibility.
- Token Name: "Demtoken".
- Symbol: "DMTK".
- Decimals: 18 (ERC20 standard).
- Administration system controlled by the DAO.
- Protections against zero addresses and overflow/underflow.
- Events to track transfers and administrative changes.
- Share-based voting system.
- Fixed price of 110 tokens per share.
- Voting period of 1 week.
- 24-hour timelock for proposal execution.
- 51% quorum for proposal approval.
- Supports voting, abstaining, and voting against proposals.
- Purchase shares in exchange for tokens.
- Secure transfers with balance checks.
- Approval system for delegated spending.
- Proposal creation by members.
- Weighted voting based on shares held.
- Timelock for added security.
- Quorum system for significant decisions.
- Balance checks before transfers.
- Zero address checks.
- Timelock to prevent flash loan attacks.
- Role-based permission system.
- Initial administration assigned to the deployer.
- Administration transferred to the DAO.
- Access controls for critical functions.
- Solidity: v0.8.20.
- EVM Version: Paris.
- Optimization: Enabled (200 runs).
The contracts have been deployed on the Sepolia testnet:
- DAOMetraToken: 0x8017b00a1217EcbA1998f62f948379FDe187D0A2.
- DAOMetra: 0xBBcFf03a5dE9987dE141AAD29b8b9E89e2e1Cb28.
The project includes a comprehensive test suite covering:
- Contract initialization.
- Share purchase.
- Proposal creation and management.
- Voting system.
- Timelock functionality.
- Shares represent voting power in the DAO.
- Fixed price ensures fairness in purchases.
- Non-transferable to maintain governance stability.
The 24-hour timelock implementation:
- Protects against rapid attacks.
- Allows members to react to suspicious proposals.
- Adds a layer of security to governance.
- Events implemented to track all critical actions.
- Voting system protected against manipulation.
- Timelock safeguards against flash loan attacks.