Skip to main content

Core contractsCreatorOVaultWrapper

CreatorOVaultWrapper

The per-creator wrapper that turns vault claims into tradable ShareOFT and back, including one-call deposit and withdraw from the creator coin.

The wrapper is how a vault claim () becomes the ShareOFT () holders trade. Most users only call deposit() and withdraw(), which go straight between the creator coin and ShareOFT.

At a glance​

RoleConverts to and back; one-hop creator coin to deposit and withdraw
DeployedPer creator, on Base (hub only)
Standard(s)None of its own; holds the ERC-4626 and mints the LayerZero OFT
Key relationshipsCreatorOVault, CreatorShareOFT, Gauge controller, Registry4626

How it works​

The raw wrap is 1000 : 1 . At bootstrap the vault mints about 1000 per creator coin, so the two steps cancel out and deposit() shows about 1 creator coin to 1 ShareOFT. That is a UX result, not a 1:1 wrap. See Token units.

  1. wrap locks in the wrapper and mints (divide by 1000).
  2. unwrap burns and releases (multiply by 1000).
  3. deposit pulls the creator coin, deposits it in the vault, and wraps in one call.
  4. withdraw unwraps and redeems in one call.

Unwrap and redeem happen on Base only. Remote chains hold ShareOFT only. Bridging does not dilute vault ownership.

Gauge burn slice​

When ShareOFT fees are distributed, the gauge splits them in first. Only the 9.61% burn slice calls unwrap(); those are burned to raise price per share. The registered gauge is exempt from the large-unwrap check so a big fee cycle can't block distribution.

Key functions​

FunctionWhat it doesWho can call
deposit(amount) / deposit(amount, minOut)Creator coin in, out (with optional slippage floor)Anyone
withdraw(amount) / withdraw(amount, minOut) in, creator coin out, below the large-withdrawal threshold holder
wrap(amount) in, out (÷1000) holder
unwrap(amount) in, out (×1000), below the threshold holder
requestAsyncExit(amount, receiver) / claimAsyncExit() / cancelAsyncExit()Queued exit for large amounts holder
previewDeposit / previewWithdraw / previewWrap / previewUnwrap / previewAsyncExitQuotes, including whether an exit must be asyncAnyone
setFees(wrapFee, unwrapFee)Set wrap and unwrap fees (default 0, max 10% / MAX_FEE)Owner
setWhitelist(user, status)Exempt an address from wrap and unwrap feesOwner

Gotchas​

  • Never treat and as 1:1. The wrap is 1000 per 1 .
  • Large exits: at or above the vault's largeWithdrawalThreshold, withdraw and unwrap revert AsyncRedemptionRequired. Use requestAsyncExit, wait for the vault delay, then claimAsyncExit. requestAsyncExit reverts SynchronousRedemptionAvailable for small amounts.
  • The async exit only works when supportsShareOFTAsyncExit() is true, meaning the wrapper is a trusted adapter on a vault with the adapter queue. Legacy wrappers return false.
  • Newly minted has a per-user cooldown before withdraw or unwrap, to block flash-loan round trips.
  • Wrap and unwrap fees default to 0 but are owner-settable up to 10%. Read them onchain.

Source​