Skip to main content

Integration Overview

This guide is for developers integrating Olla into another protocol, an aggregator, a router, or a frontend. It covers which functions to use, which to avoid, and how Olla's ERC-4626 and ERC-7540 surface differs from a vanilla tokenized vault.

tip

If you're just looking for a function reference, see OllaVault. This guide is the opinionated version: it tells you which function to pick and why.

Mental model

Olla is an async vault. The asset is Aztec, the share is stAztec, and they live at different addresses (ERC-7575). Shares are minted synchronously on deposit, but burning shares for assets is a two-step process: requestRedeem followed later by a claim.

Because Olla is async, several standard ERC-4626 methods do not behave the way a synchronous vault integration would expect. In particular, withdraw, previewWithdraw, and previewRedeem all revert, and maxWithdraw always returns zero. See ERC-4626 Compatibility for the full behavior table.

Supported interfaces

OllaVault implements and advertises the following interfaces via ERC-165:

InterfacePurpose
IERC7575Share and asset are separate contracts (share() returns stAztec)
IERC7540RedeemAsync redemption flow (requestRedeem, claimableRedeemRequest)
IERC7540OperatorOperator approvals (setOperator, isOperator)

IERC4626 is supported at the function-signature level but not advertised via ERC-165, because several of its methods revert or return zero (see ERC-4626 Compatibility). Treat the vault as ERC-7540 first and ERC-4626 second.

Function picker

The vault exposes multiple entry points for deposits and redemptions. Some carry user-supplied slippage protection, others do not. Prefer the slippage-protected variants. The compatibility aliases exist so that generic ERC-4626 tooling compiles, not because they are the recommended path.

Deposit

FunctionSlippageWhen to use
deposit(assets, recipient, minSharesOut)yesDefault choice for all integrations.
depositWithPermit(assets, recipient, minSharesOut, ...)yesSame, with gasless ERC-2612 approval.
deposit(assets, receiver) (2-arg)noERC-4626 compatibility alias. Avoid.
mint(shares, receiver)noERC-4626 compatibility alias. Avoid.

See Deposits for details.

Redemption

FunctionSlippageWhen to use
requestRedeem(shares, controller, owner)rate locked at request, no user minDefault choice for all integrations. Queued exit, no fee, async, tolerates slashing adjustment.
⚠️requestRedeemWithPermit(shares, controller, ...)rate locked at request, no user minSame, with gasless approval. owner is always msg.sender (see Operators and Controllers).
claimRequestById(requestId)n/a (claim only)Preferred way to claim a finalized queued withdrawal.
redeem(shares, receiver, controller)n/a (claim only)ERC-4626 alias. Only claims already-finalized requests; does not perform a synchronous redeem.

See Redemptions for slippage semantics and the claim lifecycle.

caution

redeem(shares, receiver, controller) is not a synchronous redeem. It is an ERC-4626-shaped wrapper that looks up a finalized request for controller and claims it. Calling it without first going through requestRedeem will revert. Prefer claimRequestById for clarity.

Typical integration shapes

  • Wallet or frontend. Use deposit(assets, recipient, minSharesOut) for entry, and requestRedeem + polling + claimRequestById for exits.
  • Aggregator or router. Quote deposits with previewDeposit. Do not use previewRedeem or previewWithdraw: both revert.
  • Collateral or strategy vault holding stAztec. Treat stAztec as a standard ERC-20 for accounting. When you need to realize assets, use requestRedeem and claim once finalized.
  • Operator-mediated exits. Use setOperator to authorize the operator, then call requestRedeem(shares, controller, owner) from the operator. The permit variant does not support this (see Operators and Controllers).

Where to go next

GoalPage
Deposit Aztec for stAztecDeposits
Build an exit flowRedemptions
Check which ERC-4626 methods workERC-4626 Compatibility
Wire an operator or delegated controllerOperators and Controllers