// SPDX-License-Identifier: GPL-2.0-or-later // Copyright (c) 2025 Morpho Association pragma solidity >=0.5.0; import {IERC4626} from "./IERC4626.sol"; import {IERC2612} from "./IERC2612.sol"; struct Caps { uint256 allocation; uint128 absoluteCap; uint128 relativeCap; } interface IVaultV2 is IERC4626, IERC2612 { // State variables function virtualShares() external view returns (uint256); function owner() external view returns (address); function curator() external view returns (address); function receiveSharesGate() external view returns (address); function sendSharesGate() external view returns (address); function receiveAssetsGate() external view returns (address); function sendAssetsGate() external view returns (address); function adapterRegistry() external view returns (address); function isSentinel(address account) external view returns (bool); function isAllocator(address account) external view returns (bool); function firstTotalAssets() external view returns (uint256); function _totalAssets() external view returns (uint128); function lastUpdate() external view returns (uint64); function maxRate() external view returns (uint64); function adapters(uint256 index) external view returns (address); function adaptersLength() external view returns (uint256); function isAdapter(address account) external view returns (bool); function allocation(bytes32 id) external view returns (uint256); function absoluteCap(bytes32 id) external view returns (uint256); function relativeCap(bytes32 id) external view returns (uint256); function forceDeallocatePenalty(address adapter) external view returns (uint256); function liquidityAdapter() external view returns (address); function liquidityData() external view returns (bytes memory); function timelock(bytes4 selector) external view returns (uint256); function abdicated(bytes4 selector) external view returns (bool); function executableAt(bytes memory data) external view returns (uint256); function performanceFee() external view returns (uint96); function performanceFeeRecipient() external view returns (address); function managementFee() external view returns (uint96); function managementFeeRecipient() external view returns (address); // Gating function canSendShares(address account) external view returns (bool); function canReceiveShares(address account) external view returns (bool); function canSendAssets(address account) external view returns (bool); function canReceiveAssets(address account) external view returns (bool); // Multicall function multicall(bytes[] memory data) external; // Owner functions function setOwner(address newOwner) external; function setCurator(address newCurator) external; function setIsSentinel(address account, bool isSentinel) external; function setName(string memory newName) external; function setSymbol(string memory newSymbol) external; // Timelocks for curator functions function submit(bytes memory data) external; function revoke(bytes memory data) external; // Curator functions function setIsAllocator(address account, bool newIsAllocator) external; function setReceiveSharesGate(address newReceiveSharesGate) external; function setSendSharesGate(address newSendSharesGate) external; function setReceiveAssetsGate(address newReceiveAssetsGate) external; function setSendAssetsGate(address newSendAssetsGate) external; function setAdapterRegistry(address newAdapterRegistry) external; function addAdapter(address account) external; function removeAdapter(address account) external; function increaseTimelock(bytes4 selector, uint256 newDuration) external; function decreaseTimelock(bytes4 selector, uint256 newDuration) external; function abdicate(bytes4 selector) external; function setPerformanceFee(uint256 newPerformanceFee) external; function setManagementFee(uint256 newManagementFee) external; function setPerformanceFeeRecipient(address newPerformanceFeeRecipient) external; function setManagementFeeRecipient(address newManagementFeeRecipient) external; function increaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external; function decreaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external; function increaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external; function decreaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external; function setMaxRate(uint256 newMaxRate) external; function setForceDeallocatePenalty(address adapter, uint256 newForceDeallocatePenalty) external; // Allocator functions function allocate(address adapter, bytes memory data, uint256 assets) external; function deallocate(address adapter, bytes memory data, uint256 assets) external; function setLiquidityAdapterAndData(address newLiquidityAdapter, bytes memory newLiquidityData) external; // Exchange rate function accrueInterest() external; function accrueInterestView() external view returns (uint256 newTotalAssets, uint256 performanceFeeShares, uint256 managementFeeShares); // Force deallocate function forceDeallocate(address adapter, bytes memory data, uint256 assets, address onBehalf) external returns (uint256 penaltyShares); }