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.

OrionConfig

OrionConfig​

Configuration contract for Orion protocol using UUPS upgradeable pattern

guardian​

address guardian

Guardian address for emergency pausing

underlyingAsset​

contract IERC20 underlyingAsset

Underlying asset address

liquidityOrchestrator​

address liquidityOrchestrator

Address of the liquidity orchestrator

transparentVaultFactory​

address transparentVaultFactory

Address of the transparent vault factory

priceAdapterRegistry​

address priceAdapterRegistry

Address of the price adapter registry

strategistIntentDecimals​

uint8 strategistIntentDecimals

Decimals for strategist intent

priceAdapterDecimals​

uint8 priceAdapterDecimals

Decimals for price adapter

riskFreeRate​

uint16 riskFreeRate

Risk-free rate in basis points. Same decimals as BASIS_POINTS_FACTOR

minDepositAmount​

uint256 minDepositAmount

Minimum deposit amount in underlying asset units

minRedeemAmount​

uint256 minRedeemAmount

Minimum redeem amount in share units

feeChangeCooldownDuration​

uint256 feeChangeCooldownDuration

Fee change cooldown duration in seconds (7 days default)

maxFulfillBatchSize​

uint256 maxFulfillBatchSize

Maximum number of requests to process per fulfill calls

tokenDecimals​

mapping(address => uint8) tokenDecimals

Mapping of token address to its decimals

nettingFeeCoefficient​

uint16 nettingFeeCoefficient

Netting fee coefficient (bps of netted rebalance volume)

rsFeeCoefficient​

uint16 rsFeeCoefficient

Revenue share fee coefficient

newProtocolFeeRatesTimestamp​

uint256 newProtocolFeeRatesTimestamp

Timestamp when new protocol fee rates become effective

upgradeTimelock​

address upgradeTimelock

Address of the upgrade timelock that must authorise all implementation upgrades

hpkePublicKey​

bytes32 hpkePublicKey

HPKE recipient public key

encryptedVaultFactory​

address encryptedVaultFactory

Address of the encrypted vault factory

onlyFactories​

modifier onlyFactories()

onlyLiquidityOrchestrator​

modifier onlyLiquidityOrchestrator()

constructor​

constructor() public

Constructor that disables initializers for the implementation contract

initialize​

function initialize(address initialOwner, address underlyingAsset_) public

Initializer function (replaces constructor)

_The underlying asset is automatically added to the investment universe whitelist because:

  • Strategists may decide to be underleveraged in their active positions;
  • removeWhitelistedAsset could trigger forced liquidations._

Parameters​

NameTypeDescription
initialOwneraddressThe address that will own this contract
underlyingAsset_addressThe address of the underlying asset contract

updateProtocolFees​

function updateProtocolFees(uint16 _nettingFeeCoefficient, uint16 _rsFeeCoefficient) external

Updates the protocol fees

If called while a previous fee change is still in cooldown, the prior scheduled change is cancelled: activeProtocolFees() returns the current (old) rates, which are stored as old coefficients, then the new coefficients overwrite the prior schedule. The previously scheduled intermediate fees never take effect.

Parameters​

NameTypeDescription
_nettingFeeCoefficientuint16The new netting fee coefficient (bps of netted rebalance volume)
_rsFeeCoefficientuint16The new revenue share fee coefficient

activeProtocolFees​

function activeProtocolFees() public view returns (uint16 nettingFee, uint16 rsFee)

Returns the active protocol fees (old during cooldown, new after)

Return Values​

NameTypeDescription
nettingFeeuint16The active netting fee coefficient
rsFeeuint16The active revenue share fee coefficient

setLiquidityOrchestrator​

function setLiquidityOrchestrator(address orchestrator) external

Sets the liquidity orchestrator for the protocol

Can only be called by the contract owner

Parameters​

NameTypeDescription
orchestratoraddressThe address of the liquidity orchestrator

setVaultFactory​

function setVaultFactory(address transparentFactory) external

Sets the vault factory for the protocol

Can only be called by the contract owner

Parameters​

NameTypeDescription
transparentFactoryaddressThe address of the transparent vault factory

setEncryptedVaultFactory​

function setEncryptedVaultFactory(address encryptedFactory) external

Sets the encrypted vault factory for the protocol

Can only be called by the contract owner

Parameters​

NameTypeDescription
encryptedFactoryaddressThe address of the encrypted vault factory

setPriceAdapterRegistry​

function setPriceAdapterRegistry(address registry) external

Sets the price adapter registry for the protocol

Can only be called by the contract owner

Parameters​

NameTypeDescription
registryaddressThe address of the price adapter registry

setProtocolRiskFreeRate​

function setProtocolRiskFreeRate(uint16 _riskFreeRate) external

Sets the protocol risk-free rate

Can only be called by the contract owner

Parameters​

NameTypeDescription
_riskFreeRateuint16

setMinDepositAmount​

function setMinDepositAmount(uint256 amount) external

Sets the minimum deposit amount

Can be called by the contract owner or guardian

Parameters​

NameTypeDescription
amountuint256The new minimum deposit amount in underlying asset units

setMinRedeemAmount​

function setMinRedeemAmount(uint256 amount) external

Sets the minimum redeem amount

Can be called by the contract owner or guardian

Parameters​

NameTypeDescription
amountuint256The new minimum redeem amount in share units

setFeeChangeCooldownDuration​

function setFeeChangeCooldownDuration(uint256 duration) external

Sets the fee change cooldown duration

Can only be called by the contract owner

Parameters​

NameTypeDescription
durationuint256The new cooldown duration in seconds

setMaxFulfillBatchSize​

function setMaxFulfillBatchSize(uint256 size) external

Sets the maximum fulfill batch size

Can be called by the contract owner or guardian

Parameters​

NameTypeDescription
sizeuint256The new maximum fulfill batch size

setGuardian​

function setGuardian(address _guardian) external

Sets the guardian address for emergency pausing

Only owner can set the guardian

Parameters​

NameTypeDescription
_guardianaddressThe new guardian address

setHpkePublicKey​

function setHpkePublicKey(bytes32 _hpkePublicKey) external

Sets the HPKE recipient public key

Parameters​

NameTypeDescription
_hpkePublicKeybytes32X25519 public key as 32 raw octets

addWhitelistedAsset​

function addWhitelistedAsset(address asset, address priceAdapter, address executionAdapter) external

Adds an asset to the whitelist

Can only be called by the contract owner

Parameters​

NameTypeDescription
assetaddressThe address of the asset to whitelist
priceAdapteraddressThe address of the price adapter
executionAdapteraddressThe address of the execution adapter

removeWhitelistedAsset​

function removeWhitelistedAsset(address asset) external

Removes an asset from the whitelist

Can only be called by the contract owner

Parameters​

NameTypeDescription
assetaddressThe address of the asset to remove from whitelist

whitelistedAssetsLength​

function whitelistedAssetsLength() external view returns (uint16)

Returns the total number of whitelisted assets

Return Values​

NameTypeDescription
[0]uint16The count of whitelisted assets

getAllWhitelistedAssets​

function getAllWhitelistedAssets() external view returns (address[] assets)

Returns all whitelisted assets

Return Values​

NameTypeDescription
assetsaddress[]An array of whitelisted asset addresses

decommissioningAssets​

function decommissioningAssets() external view returns (address[])

Decommissioning assets (pending liquidation)

Return Values​

NameTypeDescription
[0]address[]An array of decommissioning asset addresses

completeAssetsRemoval​

function completeAssetsRemoval(address[] failedTokens) external

Completes assets removal; only callable by liquidity orchestrator. Assets that appear in failedTokens were not successfully processed this epoch and are kept in the decommissioning list for retry next epoch.

Parameters​

NameTypeDescription
failedTokensaddress[]Tokens whose sell or buy execution failed during the current epoch.

getAllWhitelistedAssetNames​

function getAllWhitelistedAssetNames() external view returns (string[] names)

Returns ERC20 human-readable names for all whitelisted assets

Return Values​

NameTypeDescription
namesstring[]Array of token names in same order as getAllWhitelistedAssets()

getAllTokenDecimals​

function getAllTokenDecimals() external view returns (uint8[] decimals)

Returns the token decimals for all whitelisted assets

Returns decimals in the same order as getAllWhitelistedAssets()

Return Values​

NameTypeDescription
decimalsuint8[]Array of token decimals corresponding to whitelisted assets

isWhitelisted​

function isWhitelisted(address asset) external view returns (bool)

Checks if an asset is whitelisted

Parameters​

NameTypeDescription
assetaddressThe address of the asset to check

Return Values​

NameTypeDescription
[0]boolTrue if the asset is whitelisted, false otherwise

addWhitelistedManager​

function addWhitelistedManager(address manager) external

Adds a manager to the whitelist

Can only be called by the contract owner

Parameters​

NameTypeDescription
manageraddressThe address of the manager to whitelist

removeWhitelistedManager​

function removeWhitelistedManager(address manager) external

Removes a manager from the whitelist

Can only be called by the contract owner

Parameters​

NameTypeDescription
manageraddressThe address of the manager to remove from whitelist

isWhitelistedManager​

function isWhitelistedManager(address manager) external view returns (bool)

Checks if a manager is whitelisted

Parameters​

NameTypeDescription
manageraddressThe address of the manager to check

Return Values​

NameTypeDescription
[0]boolTrue if the manager is whitelisted, false otherwise

getAllOrionManagers​

function getAllOrionManagers() external view returns (address[] managers)

Returns all Orion manager addresses

Return Values​

NameTypeDescription
managersaddress[]An array of Orion manager addresses

addOrionVault​

function addOrionVault(address vault, enum EventsLib.VaultType vaultType) external

Adds a new Orion vault to the protocol registry

Only callable by the vault factories contracts

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to add to the registry
vaultTypeenum EventsLib.VaultTypeWhether the vault is encrypted or transparent

removeOrionVault​

function removeOrionVault(address vault) external

Deregisters an Orion vault from the protocol's registry

Callable by the contract owner or by the vault's manager. This action does not destroy the vault itself; it merely disconnects the vault from the protocol, which causes the share price to stale and renders strategist intents inactive. The vault remains in both active and decommissioning states, allowing orchestrator to process it one last time to liquidate all positions before final removal.

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to be removed from the registry

getAllOrionVaults​

function getAllOrionVaults(enum EventsLib.VaultType vaultType) external view returns (address[])

Returns all Orion vault addresses

Parameters​

NameTypeDescription
vaultTypeenum EventsLib.VaultTypeWhether to return encrypted or transparent vaults

Return Values​

NameTypeDescription
[0]address[]An array of Orion vault addresses

isOrionVault​

function isOrionVault(address vault) external view returns (bool)

Checks if an address is a registered Orion vault

This function checks both encrypted and transparent vaults

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to check

Return Values​

NameTypeDescription
[0]boolTrue if the address is a registered Orion vault, false otherwise

isEncryptedVault​

function isEncryptedVault(address vault) external view returns (bool)

Checks if an address is a registered encrypted Orion vault

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to check

Return Values​

NameTypeDescription
[0]boolTrue if the address is an encrypted Orion vault, false otherwise

isDecommissioningVault​

function isDecommissioningVault(address vault) external view returns (bool)

Checks if an address is a decommissioning Orion vault

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to check

Return Values​

NameTypeDescription
[0]boolTrue if the address is a decommissioning Orion vault, false otherwise

isDecommissionedVault​

function isDecommissionedVault(address vault) external view returns (bool)

Checks if an address is a decommissioned Orion vault

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to check

Return Values​

NameTypeDescription
[0]boolTrue if the address is a decommissioned Orion vault, false otherwise

getAllDecommissionedVaults​

function getAllDecommissionedVaults() external view returns (address[] vaults)

Returns all decommissioned Orion vault addresses

Return Values​

NameTypeDescription
vaultsaddress[]An array of decommissioned vault addresses

completeVaultDecommissioning​

function completeVaultDecommissioning(address vault) external

Completes the decommissioning process for a vault

This function removes the vault from the active vault lists and moves it to decommissioned vaults Only callable by the liquidity orchestrator after vault liquidation is complete

Parameters​

NameTypeDescription
vaultaddressThe address of the vault to complete decommissioning for

isSystemIdle​

function isSystemIdle() public view returns (bool)

Checks if the system is idle

This function checks if both the liquidity orchestrator and the internal state orchestrator are idle

Return Values​

NameTypeDescription
[0]boolTrue if the system is idle, false otherwise

getTokenDecimals​

function getTokenDecimals(address token) external view returns (uint8)

Returns the stored decimals for a whitelisted token

Alias of tokenDecimals for backward-compatible ABI.

Parameters​

NameTypeDescription
tokenaddressThe token address

Return Values​

NameTypeDescription
[0]uint8The number of decimals for the token

setUpgradeTimelock​

function setUpgradeTimelock(address newTimelock) external

Sets the upgrade timelock address.

If no timelock is set yet, only the owner may call this. Once a timelock is active, only the timelock itself may replace it, preventing the owner from bypassing the delay.

Parameters​

NameTypeDescription
newTimelockaddressThe new timelock address (e.g. OpenZeppelin TimelockController); address(0) not permitted

_authorizeUpgrade​

function _authorizeUpgrade(address) internal

Authorizes an upgrade to a new implementation

Requires the caller to be the upgrade timelock (if set) or the owner (during initial bootstrapping before a timelock has been configured).