Core Concepts
The fundamental architecture of the Matador permission system.
The Operating System for On-Chain Permissions
Matador is designed to be the standard for secure, gas-optimized permission management. It bridges the gap between human-readable intent and machine-executable logic.
System Architecture
The ecosystem consists of two distinct layers that work in tandem:
Off-Chain Layer
The DSL Compiler and CLI tooling. Developers write policies in a high-level language, which are compiled into compact bytecode.
On-Chain Layer
The Permission Interpreter. A highly optimized Solidity contract that executes the bytecode to enforce rules on smart accounts.
Key Components
Policies
Immutable rulesets that define who can do what. Policies are compiled once and can be verified by anyone.
Modules
Pluggable extensions that expand the interpreter's capabilities (e.g., spending limits, allowlists, or oracle checks).
Terminology
| Term | Definition |
|---|---|
| Policy | A .matador file containing permission rules. Compiled to bytecode. |
| Bytecode | The compact, machine-readable binary representation of a policy. |
| Context | Runtime data (sender, target, value, calldata) available during execution. |
| Interpreter | The smart contract that executes the bytecode. |
| Subject | The smart account or entity being restricted by the policy. |