Contracts Overview
The Olla protocol consists of 10 smart contracts organized into four groups.
Contract map
| Contract | Upgradeable | Description |
|---|---|---|
| Vault | ||
| OllaVault | UUPS proxy | User-facing vault. Accepts deposits, mints stAztec, manages withdrawals. |
| StAztec | No (immutable) | ERC-20 receipt token representing shares of the staking pool. |
| WithdrawalQueue | UUPS proxy | FIFO queue for async withdrawal requests with slashing adjustment. |
| Core | ||
| OllaCore | UUPS proxy | Orchestration engine. Runs rebalance, computes exchange rate, distributes fees. |
| RewardsAccumulator | UUPS proxy | Receives sequencer rewards from the rollup. |
| SafetyModule | No (replaceable) | Circuit breaker. Auto-pauses on rate drops, queue pressure, or stale accounting. |
| Staking | ||
| StakingManager | UUPS proxy | Interface to the Aztec rollup. Stakes, unstakes, tracks attester state. |
| StakingProviderRegistry | UUPS proxy | Manages attester keys and provider configuration. |
| Governance & Bridge | ||
| OllaGovernance | UUPS proxy | Timelocked governance. All parameter changes and upgrades flow through here. |
| StAztecOFTAdapter | No | LayerZero V2 bridge for cross-chain stAztec transfers. |
How they connect
Users interact with OllaVault. OllaVault delegates pricing to OllaCore, which orchestrates rebalancing through StakingManager (for rollup interactions) and RewardsAccumulator (for reward collection). SafetyModule monitors health and can pause everything. OllaGovernance owns the system and timelocks all changes.
For a visual diagram of contract interactions and role assignments, see the Architecture diagrams.
Roles
| Role | Held by | Can do |
|---|---|---|
| Owner (Ownable2Step) | OllaGovernance | Upgrade OllaCore and OllaVault, change parameters. |
DEFAULT_ADMIN_ROLE | OllaGovernance | Upgrade satellites, configure SafetyModule, grant/revoke roles. |
GUARDIAN_ROLE | Guardian multisig | Pause/unpause, force-reset stuck rebalance. |
CORE_ROLE | OllaCore | Instruct OllaVault during rebalance (transfer, mint fees, finalize). |
STAKING_PROVIDER_ADMIN_ROLE | Provider admin | Add attester keys, set rewards recipient. |
| Permissionless | Anyone | Call rebalance(), updateAccounting(), refreshAttesterState(). |