Skip to main content

For AI agents: the complete documentation index is at llms.txt. Markdown versions of pages are available by appending .md to the URL or sending Accept: text/markdown.

OrionVault

OrionVault

Modular asset management vault with asynchronous deposits and redemptions

manager

address manager

Vault manager

strategist

address strategist

Vault strategist

config

contract IOrionConfig config

OrionConfig contract

liquidityOrchestrator

contract ILiquidityOrchestrator liquidityOrchestrator

Liquidity orchestrator

depositAccessControl

address depositAccessControl

Deposit access control contract (address(0) = permissionless)

_totalAssets

uint256 _totalAssets

Total assets under management (t_0) - denominated in underlying asset units

pendingVaultFees

uint256 pendingVaultFees

Pending vault fees [assets]

SHARE_DECIMALS

uint8 SHARE_DECIMALS

Share token decimals

YEAR_IN_SECONDS

uint32 YEAR_IN_SECONDS

Number of seconds in a year

BASIS_POINTS_FACTOR

uint16 BASIS_POINTS_FACTOR

Basis points factor (100% = 10_000)

feeModel

struct IOrionVault.FeeModel feeModel

Fee model

newFeeRatesTimestamp

uint256 newFeeRatesTimestamp

Timestamp when new fee rates become effective

oldFeeModel

struct IOrionVault.FeeModel oldFeeModel

Previous fee model (used during cooldown period)

isDecommissioning

bool isDecommissioning

Flag indicating if the vault is in decommissioning mode

When true, intent is overridden to 100% underlying asset

PendingUnderlyingClaims

struct PendingUnderlyingClaims {
mapping(address => uint256) byUser;
uint256 total;
}

holderAccessControl

address holderAccessControl

Holder access control contract (address(0) = permissionless)

transferAccessControl

address transferAccessControl

Transfer access control contract (address(0) = permissionless)

onlyManager

modifier onlyManager()

Restricts function to only vault manager

onlyStrategist

modifier onlyStrategist()

Restricts function to only vault strategist

onlyLiquidityOrchestrator

modifier onlyLiquidityOrchestrator()

Restricts function to only liquidity orchestrator

onlyConfig

modifier onlyConfig()

Restricts function to only Orion Config contract

constructor

constructor() internal

Constructor that disables initializers for the implementation contract

__OrionVault_init

function __OrionVault_init(address manager_, address strategist_, contract IOrionConfig config_, string name_, string symbol_, uint8 feeType_, uint16 performanceFee_, uint16 managementFee_, address depositAccessControl_, address holderAccessControl_, address transferAccessControl_) internal

Initialize the vault

Parameters

NameTypeDescription
manager_addressThe address of the vault manager
strategist_addressThe address of the vault strategist
config_contract IOrionConfigThe address of the OrionConfig contract
name_stringThe name of the vault
symbol_stringThe symbol of the vault
feeType_uint8The fee type
performanceFee_uint16The performance fee
managementFee_uint16The management fee
depositAccessControl_addressDeposit access control (address(0) = permissionless)
holderAccessControl_addressHolder access control (address(0) = permissionless)
transferAccessControl_addressTransfer access control (address(0) = permissionless)

deposit

function deposit(uint256, address) public pure returns (uint256)

_Deposit assets underlying tokens and send the corresponding number of vault shares (shares) to receiver.

  • MUST emit the Deposit event.
  • MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the deposit execution, and are accounted for during deposit.
  • MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not approving enough underlying tokens to the Vault contract, etc).

NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token._

mint

function mint(uint256, address) public pure returns (uint256)

_Mints exactly shares vault shares to receiver in exchange for assets underlying tokens.

  • MUST emit the Deposit event.
  • MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint execution, and are accounted for during mint.
  • MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not approving enough underlying tokens to the Vault contract, etc).

NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token._

redeem

function redeem(uint256 shares, address receiver, address owner) public returns (uint256)

_Burns exactly shares from owner and sends assets of underlying tokens to receiver.

  • MUST emit the Withdraw event.
  • MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the redeem execution, and are accounted for during redeem.
  • MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner not having enough shares, etc).

NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. Those methods should be performed separately._

withdraw

function withdraw(uint256, address, address) public pure returns (uint256)

_Burns shares from owner and sends exactly assets of underlying tokens to receiver.

  • MUST emit the Withdraw event.
  • MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the withdraw execution, and are accounted for during withdraw.
  • MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner not having enough shares, etc).

Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. Those methods should be performed separately._

totalAssets

function totalAssets() public view returns (uint256)

_Returns the total amount of the underlying asset that is “managed” by Vault.

  • SHOULD include any compounding that occurs from yield.
  • MUST be inclusive of any fees that are charged against assets in the Vault.
  • MUST NOT revert._

maxDeposit

function maxDeposit(address receiver) public view returns (uint256)

_Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, through a deposit call.

  • MUST return a limited value if receiver is subject to some deposit limit.
  • MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
  • MUST NOT revert._

maxMint

function maxMint(address receiver) public view returns (uint256)

_Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.

  • MUST return a limited value if receiver is subject to some mint limit.
  • MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
  • MUST NOT revert._

maxRedeem

function maxRedeem(address owner) public view returns (uint256)

_Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, through a redeem call.

  • MUST return a limited value if owner is subject to some withdrawal limit or timelock.
  • MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
  • MUST NOT revert._

maxWithdraw

function maxWithdraw(address owner) public view returns (uint256)

_Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the Vault, through a withdraw call.

  • MUST return a limited value if owner is subject to some withdrawal limit or timelock.
  • MUST NOT revert._

decimals

function decimals() public view virtual returns (uint8)

Override ERC4626 decimals to always use SHARE_DECIMALS regardless of underlying asset decimals

This ensures consistent 18-decimal precision for share tokens across all vaults

Return Values

NameTypeDescription
[0]uint8SHARE_DECIMALS for all vault share tokens

_decimalsOffset

function _decimalsOffset() internal view virtual returns (uint8)

Override ERC4626 decimals offset to match our custom decimals implementation

_Since we override decimals() to return SHARE_DECIMALS, we need to override decimalsOffset() to return the difference between SHARE_DECIMALS and underlying asset decimals

Return Values

NameTypeDescription
[0]uint8The decimals offset for virtual shares/assets calculation

_convertToSharesWithPITTotalAssets

function _convertToSharesWithPITTotalAssets(uint256 assets, uint256 pointInTimeTotalAssets, uint256 snapshotTotalSupply, enum Math.Rounding rounding) internal view returns (uint256)

Internal version that uses a snapshot of totalSupply for batch processing

Parameters

NameTypeDescription
assetsuint256The assets to convert
pointInTimeTotalAssetsuint256The point-in-time total assets
snapshotTotalSupplyuint256The snapshot of totalSupply at batch start
roundingenum Math.RoundingThe rounding mode

Return Values

NameTypeDescription
[0]uint256The shares equivalent to the assets

_convertToAssetsWithPITTotalAssets

function _convertToAssetsWithPITTotalAssets(uint256 shares, uint256 pointInTimeTotalAssets, uint256 snapshotTotalSupply, enum Math.Rounding rounding) internal view returns (uint256)

Internal version that uses a snapshot of totalSupply for batch processing

Parameters

NameTypeDescription
sharesuint256The shares to convert
pointInTimeTotalAssetsuint256The point-in-time total assets
snapshotTotalSupplyuint256The snapshot of totalSupply at batch start
roundingenum Math.RoundingThe rounding mode

Return Values

NameTypeDescription
[0]uint256The assets equivalent to the shares

overrideIntentForDecommissioning

function overrideIntentForDecommissioning() external

Override intent to 100% underlying asset for decommissioning

Can only be called by the OrionConfig contract

requestDeposit

function requestDeposit(uint256 assets) external

Submit an asynchronous deposit request.

No share tokens are minted immediately. The specified amount of underlying tokens is transferred to the liquidity orchestrator for centralized liquidity management.

Parameters

NameTypeDescription
assetsuint256The amount of the underlying asset to deposit.

requestDepositFor

function requestDepositFor(address beneficiary, uint256 assets) external

Submit an async deposit request on behalf of beneficiary.

Parameters

NameTypeDescription
beneficiaryaddressThe LP whose pending deposit balance and eventual shares are credited.
assetsuint256The amount of underlying to deposit.

_requestDeposit

function _requestDeposit(address beneficiary, uint256 assets) internal

Assets are pulled from msg.sender (e.g., router/depositor), but the deposit queue and eventual shares credit beneficiary. Deposit and holder access control lists are evaluated solely against beneficiary, not msg.sender.

cancelDepositRequest

function cancelDepositRequest(uint256 amount) external

Cancel a previously submitted deposit request.

Allows LPs to withdraw their funds before any share tokens are minted. The request must still have enough balance remaining to cover the cancellation. Funds are returned from the liquidity orchestrator to the LP.

Parameters

NameTypeDescription
amountuint256The amount of funds to withdraw.

requestRedeem

function requestRedeem(uint256 shares) external

Submit a redemption request.

No share tokens are burned immediately. The specified amount of share tokens is transferred to the vault.

Parameters

NameTypeDescription
sharesuint256The amount of the share tokens to withdraw.

cancelRedeemRequest

function cancelRedeemRequest(uint256 shares) external

Cancel a previously submitted redemption request.

Allows LPs to recover their share tokens before any burning occurs. The request must still have enough shares remaining to cover the cancellation. Share tokens are returned from the vault.

Parameters

NameTypeDescription
sharesuint256The amount of share tokens to recover.

updateStrategist

function updateStrategist(address newStrategist) external

Update the strategist address

The strategist is responsible for setting allocation logic for the vault's assets. This function enables managers to update the strategist. Strategist can be a smart contract or an address. It is the FULL responsibility of the manager to ensure the strategist is capable of performing its duties.

Parameters

NameTypeDescription
newStrategistaddressThe new strategist address.

_linkStrategistVault

function _linkStrategistVault(address strategist_) internal

Tells onchain strategists which vault they manage; skips EOAs and non-compliant / non-strategist contracts.

_requireValidAccessControl

function _requireValidAccessControl(address accessControl, bytes4 interfaceId) internal view

Rejects EOAs and contracts that fail ERC-165 compliance and do not support interfaceId.

_depositAccessControlAllows

function _depositAccessControlAllows(address account) internal view returns (bool)

_holderAccessControlAllows

function _holderAccessControlAllows(address account) internal view returns (bool)

_canRequestDeposit

function _canRequestDeposit(address account) internal view returns (bool)

_requireCanRequestDeposit

function _requireCanRequestDeposit(address account) internal view

setDepositAccessControl

function setDepositAccessControl(address newDepositAccessControl) external

Set deposit access control contract

Only callable by vault manager. Non-zero addresses must ERC-165 as IOrionDepositAccessControl.

Parameters

NameTypeDescription
newDepositAccessControladdressAddress of the new access control contract (address(0) = permissionless)

setHolderAccessControl

function setHolderAccessControl(address newHolderAccessControl) external

Set holder access control contract

Only callable by vault manager. Non-zero addresses must ERC-165 as IOrionHolderAccessControl.

Parameters

NameTypeDescription
newHolderAccessControladdressAddress of the new access control contract (address(0) = permissionless)

setTransferAccessControl

function setTransferAccessControl(address newTransferAccessControl) external

Set transfer access control contract

Only callable by vault manager. Non-zero addresses must ERC-165 as IOrionTransferAccessControl.

Parameters

NameTypeDescription
newTransferAccessControladdressAddress of the new access control contract (address(0) = permissionless)

_update

function _update(address from, address to, uint256 value) internal virtual

_Every ERC-20 balance change is routed through _update.

Guard:

  • from != address(0) excludes mint, e.g. fulfillDeposit.
  • to != address(0) excludes burn, e.g. redeem, fulfillRedeem.
  • from != address(this) excludes vault-as-sender, e.g. cancelRedeemRequest.
  • to != address(this) excludes vault-as-recipient, e.g. requestRedeem._

updateFeeModel

function updateFeeModel(uint8 feeType, uint16 performanceFee, uint16 managementFee) external

Update the fee model parameters with cooldown protection

Only vault manager can update fee model parameters Performance and management fees are capped by protocol limits New fees take effect after cooldown period to protect depositors

Parameters

NameTypeDescription
feeTypeuint8The fee type
performanceFeeuint16The performance fee
managementFeeuint16The management fee

activeFeeModel

function activeFeeModel() public view returns (struct IOrionVault.FeeModel)

Returns the active fee model (old during cooldown, new after)

Return Values

NameTypeDescription
[0]struct IOrionVault.FeeModelThe currently active fee model

_validateIntentAssets

function _validateIntentAssets(address[] assets) internal view

Validate that all assets in an intent are whitelisted

Parameters

NameTypeDescription
assetsaddress[]Array of asset addresses to validate

claimVaultFees

function claimVaultFees(uint256 amount) external

Claim accrued vault fees

Parameters

NameTypeDescription
amountuint256The amount of vault fees to claim

pendingDeposit

function pendingDeposit(uint256 fulfillBatchSize) external view returns (uint256)

Get total pending deposit amount across all users

This returns asset amounts, not share amounts

Parameters

NameTypeDescription
fulfillBatchSizeuint256The maximum number of requests to process per fulfill call

Return Values

NameTypeDescription
[0]uint256Total pending deposits denominated in underlying asset units (e.g., USDC, ETH)

pendingRedeem

function pendingRedeem(uint256 fulfillBatchSize) external view returns (uint256)

Get total pending redemption shares across all users

This returns share amounts, not underlying asset amounts

Parameters

NameTypeDescription
fulfillBatchSizeuint256The maximum number of requests to process per fulfill call

Return Values

NameTypeDescription
[0]uint256Total pending redemptions denominated in vault share units

pendingDepositCount

function pendingDepositCount() external view returns (uint256)

Get the number of pending deposit queue entries.

Return Values

NameTypeDescription
[0]uint256The number of unique users with non-zero pending deposit requests.

pendingRedeemCount

function pendingRedeemCount() external view returns (uint256)

Get the number of pending redeem queue entries.

Return Values

NameTypeDescription
[0]uint256The number of unique users with non-zero pending redeem requests.

pendingRedeemBatch

function pendingRedeemBatch(uint256 fulfillBatchSize) external view returns (address[], uint256[])

Get the list of pending redeem entries (users and shares) for the next fulfill batch

This function enables per-request conversion, ensuring exact rounding behaviour for state transition.

Parameters

NameTypeDescription
fulfillBatchSizeuint256The maximum number of requests to consider

Return Values

NameTypeDescription
[0]address[]
[1]uint256[]

accrueVaultFees

function accrueVaultFees(uint256 managementFee, uint256 performanceFee) external

Accrue vault fees for a specific epoch

Parameters

NameTypeDescription
managementFeeuint256The amount of management fees to accrue in underlying asset units
performanceFeeuint256The amount of performance fees to accrue in underlying asset units

fulfillDeposit

function fulfillDeposit(uint256 depositTotalAssets) external

Process all pending deposit requests and mint shares to depositors

Parameters

NameTypeDescription
depositTotalAssetsuint256The total assets associated with the deposit requests

fulfillRedeem

function fulfillRedeem(uint256 redeemTotalAssets) external

Process all pending redemption requests and burn shares from redeemers

Parameters

NameTypeDescription
redeemTotalAssetsuint256The total assets associated with the redemption requests

totalPendingUnderlyingClaims

function totalPendingUnderlyingClaims() external view returns (uint256)

Total underlying assets owed to users whose redemption transfer failed

Return Values

NameTypeDescription
[0]uint256

pendingUnderlyingClaim

function pendingUnderlyingClaim(address account) external view returns (uint256)

Underlying escrowed for account from a failed redemption payout or deposit fulfillment.

Parameters

NameTypeDescription
accountaddressThe address to query.

Return Values

NameTypeDescription
[0]uint256

claimUnderlying

function claimUnderlying() external

Claim underlying funds from a previously failed redemption transfer or a deposit fulfillment that could not mint shares.

Called by the user after the transfer blocker / eligibility issue has been resolved.

_payoutOrEscrowRedemption

function _payoutOrEscrowRedemption(address user, uint256 underlyingAmount, uint256 userShares) internal

Push underlying to the user; on revert, escrow on this vault for later claim.