BLTBY Token Contract
The BLTBY Token Contract is a critical component of the Built By DAO ecosystem, serving as the primary utility token within the platform. This ERC-20 token enables various functions such as transactions, staking, rewards, and redemption within the DAO. Designed to ensure a stable and controlled token economy, the BLTBY Token Contract integrates multiple mechanisms for secure minting, burning, and pausing operations. The total supply is fixed at 2.5 billion tokens, providing a robust base for value creation while maintaining scalability.
Key Objectives and Features
The BLTBY Token Contract aims to create a secure, flexible, and scalable token economy for the DAO by focusing on:
Controlled Minting and Burning: Ensuring controlled supply adjustments to prevent inflation and maintain value.
Security and Stability: Incorporating features like Pausable and ReentrancyGuard to protect against vulnerabilities.
Governance and Role Management: Establishing clear, structured roles to govern token operations effectively.
Summary of Contract Flow
Role Assignment: The contract employs structured roles to manage minting, burning, and overall token governance securely.
Minting Tokens: Controlled minting through role-based restrictions, multi-signature approval, and annual cap limits to maintain a stable supply and avoid inflation.
Transferring and Redeeming Tokens: Allows members to transfer tokens and redeem them for services, integrating deflationary mechanics to manage supply.
Burning Tokens: Administrators can burn tokens to help stabilize value and align the supply with ecosystem needs, adding to the value proposition of the token.
Pausing Operations: Administrators can pause or resume the contract in emergencies, providing added security.
Key Features
1. Fixed and Initial Supply
Total Supply: 2.5 billion tokens are the fixed supply for BLTBY, ensuring no unchecked inflation. During the contract's deployment, an initial supply of 100 million tokens is minted to bootstrap ecosystem growth and operational needs.
Rationale: The initial mint acts as a foundational reserve to support development, early investors, and DAO operations.
2. Role-Based Access Control
Uses AccessControl to ensure operational integrity:
DEFAULT_ADMIN_ROLE: Assigned to deployer for overarching control.
MINTER_ROLE: Limits minting capabilities to trusted actors.
MULTISIG_ROLE: Requires multiple signatures for any minting to add additional security.
Role Management: Each role assignment is managed during the initial deployment, ensuring that token-related activities remain secure and authorized.
3. Minting and Inflation Control
Mint Cap: Minting is capped at 5% of the total supply per year, ensuring inflation control.
Time Restriction: Enforces a 365-day waiting period between mint operations to avoid excessive supply increase.
Multi-Signature Approval: Requires the MULTISIG_ROLE to sign off on minting activities, providing additional security.
4. Burning Tokens
Controlled Burning: Tokens can be burned by addresses with DEFAULT_ADMIN_ROLE, allowing the DAO to reduce supply to counteract inflation and provide token value stability.
Utility: Burning is also used for token redemption, enhancing token value by providing ecosystem-based services.
5. Pausable Mechanism for Security
Pausable Functions: The pause() and unpause() functions allow for temporary suspension of token transfers, ensuring system stability in emergencies or during critical upgrades.
Owner Access: Only the owner can initiate or lift pauses, adding a control mechanism against unauthorized token movement.
6. Transfer and Redemption Mechanisms
Standard ERC-20 Transfers: Includes transfer() and transferFrom() functions, with added restrictions that these operations are only valid when the contract is unpaused.
Redemption Function: The redeem() function allows members to exchange BLTBY tokens for services within the DAO, burning tokens to provide a deflationary element that strengthens the token’s value.
7. Reentrancy Protection
ReentrancyGuard is applied to key functions like mint, burn, and redeem. This prevents reentrancy attacks where malicious actors might try to manipulate the contract by exploiting its execution flow.
8. Custom Errors for Gas Efficiency
Custom errors like UnauthorizedAccess(), MintingTooSoon(), and MintExceedsCap() are implemented to handle edge cases more efficiently.
Gas Efficiency: Custom errors consume less gas than standard
require()
statements, reducing operational costs and improving the efficiency of error handling.
Summary
The BLTBY Token Contract is designed to be the cornerstone of the Built By DAO ecosystem, allowing for controlled minting, safe burning, and secure transactions. It incorporates advanced features like role-based access control, custom errors, reentrancy protection, and pausable functionality, ensuring that token operations are secure and efficient. By adhering to best practices in role assignment, minting, and managing token transactions, the BLTBY Token Contract provides a robust, scalable, and adaptable foundation for the DAO's economic needs.
The contract flow includes role assignment, minting, transfers, redemption, and burning to maintain stability and ensure the value of the token. This contract will evolve over time, with the potential for future upgrades that integrate DAO-level governance, adding even more transparency and community involvement in managing the token supply.
Last updated