Web3 Dictionary Logo
Web3 Dictionary
Contribute

Categories

AllBlockchainDappsDAOsDeFiNFTsRegulationSecuritySmart ContractsTokenomicsWalletsWeb3 GamingOthers
  1. Web3 Dictionary
  2. Security
  3. Access Control
Security

Access Control

System for restricting who can call specific smart contract functions based on permissions.

Last Updated

2026-03-19

Related Concepts

Smart ContractModifier
Web3-Explorer Logo

Web3 Security

AD

Security frameworks, smart contract reviews, and compliance alignment to reduce risk and protect users.

Review Security Services

What is Access Control?

Access control is a security framework that restricts who can execute specific functions within a smart contract. It ensures that sensitive actions, such as minting tokens or upgrading code, are only performed by authorized entities.

How does Access Control work?

  1. Developers define roles (e.g., Admin, Minter) or an Owner address.
  2. Functions are protected by modifiers that check the caller's identity.
  3. When a function is called, the contract verifies the caller's permissions.
  4. If authorized, the transaction proceeds; otherwise, it reverts.
  5. Roles can often be granted or revoked by an administrative account.

Why does Access Control matter?

Proper access control prevents unauthorized users from draining funds, stealing assets, or hijacking a protocol. It is a fundamental pillar of smart contract security and protocol integrity.

Key features of Access Control

  • Role-based permissions
  • Ownership-based restrictions
  • Use of modifiers (e.g., onlyOwner)
  • Ability to grant/revoke roles
  • Essential for administrative tasks

Examples of Access Control

  • An NFT contract where only the Minter role can create new tokens.
  • A DeFi protocol where only the Governor can pause the contract.
  • A multisig wallet that acts as the Owner of a treasury contract.

External References

  • OpenZeppelin: Access Control
  • Ethereum.org: Smart Contract Security
  • Halborn: Designing Secure Access Control for Smart Contracts