Skip to main content

Integration guidesIntegrate with CreatorOVault

Integrate with CreatorOVault

How routers, keepers, and vault-claim holders should deposit, quote, and exit CreatorOVault safely.

This page is for routers, keepers, and anyone holding vault claims () directly. Retail flows should use CreatorOVaultWrapper, which converts between the creator coin and ShareOFT ().

At a glance​

RoleIntegration rules for CreatorOVault
DeployedPer creator, on Base
Standard(s)ERC-4626 plus protocol extensions — see ERC-4626 deviations
Key relationshipsCreatorOVaultWrapper, CreatorShareOFT, Vault capabilities

Which token is which​

TokenSymbolWhat it is
Creator coine.g. $AKITAThe vault's asset()
Vault claimThe ERC-4626 share. 1000 virtual-share offset.
ShareOFT1000:1 wrap of . Used for trading, the lottery, and the LayerZero mesh.

After wrapping, about 1 creator coin reads as about 1 . Do not show balances to end users. See Token units.

Integration notes​

Depositing​

Deposits only succeed when the whitelist allows the caller (if enabled), the vault is not paused or shut down, and vaultMode is Normal (not Suspect). The first deposit must be at least 50M creator coins or it reverts FirstDepositTooSmall.

Size deposits from maxDeposit / maxMint, not from previews. previewDeposit / previewMint are vanilla OpenZeppelin and ignore the deposit limit, whitelist, and strategy marks.

On agent-lane vaults, while the asset quotes a transfer tax, maxMint == 0 and previewMint reverts. Use deposit.

Exiting​

The three-argument ERC-4626 exits work, but large exits are not instant.

SizePath
Below largeWithdrawalThresholdredeem / withdraw, optionally with a fourth maxLoss argument in bps
At or above the threshold1. queueWithdrawal(shares, receiver) 2. wait until unlockBlock 3. claimQueuedWithdrawal()
  • Calling the sync path on a large size reverts LargeWithdrawalMustBeQueued.
  • Each address has one queue slot. cancelQueuedWithdrawal returns the shares.
  • Depositing and exiting in the same block is blocked (withdrawDelayBlocks, default 1). Trusted adapters skip this stamp.
  • For ShareOFT holders, the wrapper's withdraw and unwrap both revert AsyncRedemptionRequired at or above the threshold. Use the wrapper's async exit instead: requestAsyncExit(amount, receiver), wait for the vault delay, then claimAsyncExit(). Check supportsShareOFTAsyncExit() first; legacy wrappers return false. See CreatorOVaultWrapper.

Quoting​

Some previews stay honest when queues or strategies are live; some do not.

FunctionHonest when queues or strategies are live?
previewRedeemYes — capped at liquid assets minus queued
erc4626PreviewRedeemNo — raw OpenZeppelin conversion
previewWithdraw / previewDeposit / previewMintNo — inherited OpenZeppelin
maxWithdraw / maxRedeemYes — liquidity plus the sync-size ceiling
withdrawalEta(user, shares)Yes — cooldown plus queue delay
positionOf(user)Yes — holdings, queue, and claimable

Use previewRedeem with maxRedeem and withdrawalEta. Do not quote large exits with previewWithdraw.

Loss cap (maxLoss)​

maxLoss is in bps of the requested assets, not of the shortfall. The four-argument redeem / withdraw overloads are Yearn-style. If unrealised strategy loss is above the cap, the call reverts StrategyHasUnrealisedLosses. The three-argument versions use defaultMaxLossBps, where 0 allows any loss.

Operators​

Addresses without a grant are permissionless. Any grant, including setOperatorPerms(exec, 0), fail-closes that address to the granted permissions. clearOperatorPerms restores the baseline. The activation batcher checks isAuthorizedOperator(exec, OP_ACTIVATE).

Gotchas​

  • Impairment: while vaultMode == Suspect, deposit / mint / withdraw / redeem revert and maxDeposit / maxMint / maxWithdraw / maxRedeem return 0. Do not retry sync exits.
  • Recovery after impairment uses merkle claims and escrow (mintImpairmentClaim / claimImpairmentRecovery). Preferred leaves are ShareOFT holders, not vault.balanceOf(wrapper). See Impairment v1 disclosures and the state machine.
  • Never treat and as 1:1. The wrap is 1000 per 1 .
  • Don't add product logic to the vault. CreatorOVault is an ABI and storage facade; new logic belongs in a module or OVaultViewLib.

Source​