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.
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. There is also an instantRedeem path that exits from the buffer pool in one transaction, in exchange for a fee.
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:
| Interface | Purpose |
|---|---|
IERC7575 | Share and asset are separate contracts (share() returns stAztec) |
IERC7540Redeem | Async redemption flow (requestRedeem, claimableRedeemRequest) |
IERC7540Operator | Operator 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
| Function | Slippage | When to use | |
|---|---|---|---|
| ✅ | deposit(assets, recipient, minSharesOut) | yes | Default choice for all integrations. |
| ✅ | depositWithPermit(assets, recipient, minSharesOut, ...) | yes | Same, with gasless ERC-2612 approval. |
| ❌ | deposit(assets, receiver) (2-arg) | no | ERC-4626 compatibility alias. Avoid. |
| ❌ | mint(shares, receiver) | no | ERC-4626 compatibility alias. Avoid. |
See Deposits for details.
Redemption
| Function | Slippage | When to use | |
|---|---|---|---|
| ✅ | instantRedeem(shares, recipient, minAssetsOut) | yes (on net assets) | Exit now, fee applies, requires buffer liquidity. |
| ✅ | instantRedeemWithPermit(..., minAssetsOut, ...) | yes (on net assets) | Same, with gasless ERC-2612 approval. |
| ✅ | requestRedeem(shares, controller, owner) | rate locked at request, no user min | Queued exit, no fee, async, tolerates slashing adjustment. |
| ⚠️ | requestRedeemWithPermit(shares, controller, ...) | rate locked at request, no user min | Same, 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 the decision tree, slippage semantics, and the claim lifecycle.
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,instantRedeem(..., minAssetsOut)when the user wants to exit now, andrequestRedeem+ polling +claimRequestByIdfor the no-fee path. - Aggregator or router. Quote deposits with
previewDeposit, quote instant exits withpreviewInstantRedeem. Do not usepreviewRedeemorpreviewWithdraw: both revert. - Collateral or strategy vault holding stAztec. Treat stAztec as a standard ERC-20 for accounting. When you need to realize assets, prefer
instantRedeemwhen the buffer can cover the position, and fall back torequestRedeemotherwise. UseavailableForInstantRedemption()to size the decision. - Operator-mediated exits. Use
setOperatorto authorize the operator, then callrequestRedeem(shares, controller, owner)from the operator. The permit variant does not support this (see Operators and Controllers).
Where to go next
| Goal | Page |
|---|---|
| Deposit Aztec for stAztec | Deposits |
| Build an exit flow | Redemptions |
| Check which ERC-4626 methods work | ERC-4626 Compatibility |
| Wire an operator or delegated controller | Operators and Controllers |