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
| Role | Converts to and back; one-hop creator coin to deposit and withdraw |
| Deployed | Per creator, on Base (hub only) |
| Standard(s) | None of its own; holds the ERC-4626 and mints the LayerZero OFT |
| Key relationships | CreatorOVault, 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.
wraplocks in the wrapper and mints (divide by 1000).unwrapburns and releases (multiply by 1000).depositpulls the creator coin, deposits it in the vault, and wraps in one call.withdrawunwraps 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
| Function | What it does | Who 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 / previewAsyncExit | Quotes, including whether an exit must be async | Anyone |
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 fees | Owner |
Gotchas
- Never treat and as 1:1. The wrap is 1000 per 1 .
- Large exits: at or above the vault's
largeWithdrawalThreshold,withdrawandunwraprevertAsyncRedemptionRequired. UserequestAsyncExit, wait for the vault delay, thenclaimAsyncExit.requestAsyncExitrevertsSynchronousRedemptionAvailablefor 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
withdraworunwrap, to block flash-loan round trips. - Wrap and unwrap fees default to 0 but are owner-settable up to 10%. Read them onchain.