OrionTransparentVault
OrionTransparentVault
A transparent implementation of OrionVault supporting both active and passive management strategies
_portfolio
struct EnumerableMap.AddressToUintMap _portfolio
Current portfolio shares per asset (w_0) - mapping of token address to live allocation
_portfolioIntent
struct EnumerableMap.AddressToUintMap _portfolioIntent
Curator intent (w_1) - mapping of token address to target allocation
Only used for active management (wallet curators). Passive curators compute intents on-demand.
constructor
constructor(address vaultOwner, address curator, contract IOrionConfig configAddress, string name, string symbol, uint8 feeType, uint16 performanceFee, uint16 managementFee) public
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
| vaultOwner | address | The address of the vault owner |
| curator | address | The address of the vault curator |
| configAddress | contract IOrionConfig | The address of the OrionConfig contract |
| name | string | The name of the vault |
| symbol | string | The symbol of the vault |
| feeType | uint8 | The fee type |
| performanceFee | uint16 | The performance fee |
| managementFee | uint16 | The management fee |
submitIntent
function submitIntent(struct IOrionTransparentVault.IntentPosition[] intent) external
Submit a plaintext portfolio intent.
Parameters
| Name | Type | Description |
|---|---|---|
| intent | struct IOrionTransparentVault.IntentPosition[] | IntentPosition structs array containing the tokens and plaintext weights. |
getPortfolio
function getPortfolio() external view returns (address[] tokens, uint256[] sharesPerAsset)
Get the transparent portfolio.
Return Values
| Name | Type | Description |
|---|---|---|
| tokens | address[] | The tokens in the portfolio. |
| sharesPerAsset | uint256[] | The shares per asset in the portfolio. |
getIntent
function getIntent() external view returns (address[] tokens, uint32[] weights)
Get the transparent intent.
Return Values
| Name | Type | Description |
|---|---|---|
| tokens | address[] | The tokens in the intent. |
| weights | uint32[] | The weights in the intent. |
updateVaultState
function updateVaultState(struct IOrionTransparentVault.PortfolioPosition[] portfolio, uint256 newTotalAssets) external
Updates the vault's portfolio state and total assets
Can only be called by the liquidity orchestrator. Clears the previous portfolio and replaces it with the new one.
Parameters
| Name | Type | Description |
|---|---|---|
| portfolio | struct IOrionTransparentVault.PortfolioPosition[] | Array of PortfolioPosition structs It contains the new portfolio token addresses and plaintext number of shares per asset. |
| newTotalAssets | uint256 | The new total assets value for the vault |
updateCurator
function updateCurator(address newCurator) external
Update the vault curator address
The curator is responsible for setting allocation strategy for the vault's assets. This function enables vault owners to change allocation strategies by updating the curator. This is particularly important when curators are smart contracts, not just addresses.
Parameters
| Name | Type | Description |
|---|---|---|
| newCurator | address | The new curator address. Must be non-zero. |
updateVaultWhitelist
function updateVaultWhitelist(address[] assets) external
Override updateVaultWhitelist to validate strategy compatibility
Parameters
| Name | Type | Description |
|---|---|---|
| assets | address[] | The new whitelisted assets for the vault |
removeFromVaultWhitelist
function removeFromVaultWhitelist(address asset) external
Remove an asset from the vault whitelist and modify intent accordingly
Parameters
| Name | Type | Description |
|---|---|---|
| asset | address | The asset to remove from the whitelist |
_updateCuratorType
function _updateCuratorType(address[] whitelistedAssets) internal
Update the curator type flag based on ERC-165 interface detection
Parameters
| Name | Type | Description |
|---|---|---|
| whitelistedAssets | address[] | List of assets currently whitelisted in the vault |
_computePassiveIntent
function _computePassiveIntent() internal view returns (address[] tokens, uint32[] weights)
Compute intent for passive curators
Return Values
| Name | Type | Description |
|---|---|---|
| tokens | address[] | Array of token addresses |
| weights | uint32[] | Array of weights |
isPassiveCurator
function isPassiveCurator() external view returns (bool isPassive)
Get the curator type
Return Values
| Name | Type | Description |
|---|---|---|
| isPassive | bool | True if the curator is passive (smart contract), false if active (wallet) |