Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Access Control List (ACL) in dApps

1 min read
Pronunciation
[ak-ses kən-trohl list]
Analogy

ACLs in dApps are like a guest list at a private club, where only names on the list can enter certain rooms or access VIP areas.

Definition
An on‑chain data structure mapping addresses or roles to specific permissions within a smart contract, enabling fine‑grained authorization. ACLs determine who can call sensitive functions or modify state.
Key Points Intro

ACLs provide explicit, programmable permission checks for blockchain applications.

Key Points

Address-role mapping: Associates accounts with permission levels or roles.

On-chain enforcement: Smart contract code checks ACL before executing protected functions.

Dynamic updates: Roles can be granted or revoked via governance or admin calls.

Gas considerations: ACL checks incur computation and storage costs on each call.

Example

A DAO contract uses an ACL mapping to allow only addresses with the "PROPOSER_ROLE" to submit governance proposals, enforced by OpenZeppelin’s AccessControl library.

Technical Deep Dive

In Solidity, ACLs are implemented via `mapping(address => bool)` or `mapping(bytes32 => mapping(address => bool))`. Roles are represented by `bytes32` identifiers; `hasRole()` modifiers guard functions. Granting/revoking emits `RoleGranted`/`RoleRevoked` events. ACL storage resides in the contract’s slot, and lookups cost ~2100 gas per check. Complex systems may use on‑chain Merkle roots to compress large ACLs.

Security Warning

Incorrect role assignments or missing revoke logic can lock out administrators or grant unintended privileges. Always include an emergency pause or timelock.

Caveat

On‑chain ACLs increase transparency but incur gas costs; off‑chain ACLs may be cheaper but less tamper‑resistant.

Access Control List (ACL) in dApps - Related Articles

No related articles for this term.