// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.13; import "@equilibria/root/number/types/UFixed18.sol"; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "./ICollateral.sol"; import "./IIncentivizer.sol"; import "./IProduct.sol"; import "./IMultiInvoker.sol"; import "./types/PayoffDefinition.sol"; interface IController { /// @dev Coordinator of a one or many products struct Coordinator { /// @dev Pending owner of the product, can accept ownership address pendingOwner; /// @dev Owner of the product, allowed to update select parameters address owner; /// @dev Treasury of the product, collects fees address treasury; } event CollateralUpdated(ICollateral newCollateral); event IncentivizerUpdated(IIncentivizer newIncentivizer); event ProductBeaconUpdated(IBeacon newProductBeacon); event MultiInvokerUpdated(IMultiInvoker newMultiInvoker); event ProtocolFeeUpdated(UFixed18 newProtocolFee); event MinFundingFeeUpdated(UFixed18 newMinFundingFee); event LiquidationFeeUpdated(UFixed18 newLiquidationFee); event IncentivizationFeeUpdated(UFixed18 newIncentivizationFee); event MinCollateralUpdated(UFixed18 newMinCollateral); event ProgramsPerProductUpdated(uint256 newProgramsPerProduct); event PauserUpdated(address newPauser); event PausedUpdated(bool newPaused); event CoordinatorPendingOwnerUpdated(uint256 indexed coordinatorId, address newPendingOwner); event CoordinatorOwnerUpdated(uint256 indexed coordinatorId, address newOwner); event CoordinatorTreasuryUpdated(uint256 indexed coordinatorId, address newTreasury); event CoordinatorCreated(uint256 indexed coordinatorId, address owner); event ProductCreated(IProduct indexed product, IProduct.ProductInfo productInfo); error ControllerNoZeroCoordinatorError(); error ControllerNotPauserError(); error ControllerNotOwnerError(uint256 controllerId); error ControllerNotPendingOwnerError(uint256 controllerId); error ControllerInvalidProtocolFeeError(); error ControllerInvalidMinFundingFeeError(); error ControllerInvalidLiquidationFeeError(); error ControllerInvalidIncentivizationFeeError(); error ControllerNotContractAddressError(); function collateral() external view returns (ICollateral); function incentivizer() external view returns (IIncentivizer); function productBeacon() external view returns (IBeacon); function multiInvoker() external view returns (IMultiInvoker); function coordinators(uint256 collateralId) external view returns (Coordinator memory); function coordinatorFor(IProduct product) external view returns (uint256); function protocolFee() external view returns (UFixed18); function minFundingFee() external view returns (UFixed18); function liquidationFee() external view returns (UFixed18); function incentivizationFee() external view returns (UFixed18); function minCollateral() external view returns (UFixed18); function programsPerProduct() external view returns (uint256); function pauser() external view returns (address); function paused() external view returns (bool); function initialize(ICollateral collateral_, IIncentivizer incentivizer_, IBeacon productBeacon_) external; function createCoordinator() external returns (uint256); function updateCoordinatorPendingOwner(uint256 coordinatorId, address newPendingOwner) external; function acceptCoordinatorOwner(uint256 coordinatorId) external; function updateCoordinatorTreasury(uint256 coordinatorId, address newTreasury) external; function createProduct(uint256 coordinatorId, IProduct.ProductInfo calldata productInfo) external returns (IProduct); function updateCollateral(ICollateral newCollateral) external; function updateIncentivizer(IIncentivizer newIncentivizer) external; function updateProductBeacon(IBeacon newProductBeacon) external; function updateMultiInvoker(IMultiInvoker newMultiInvoker) external; function updateProtocolFee(UFixed18 newProtocolFee) external; function updateMinFundingFee(UFixed18 newMinFundingFee) external; function updateLiquidationFee(UFixed18 newLiquidationFee) external; function updateIncentivizationFee(UFixed18 newIncentivizationFee) external; function updateMinCollateral(UFixed18 newMinCollateral) external; function updateProgramsPerProduct(uint256 newProductsPerProduct) external; function updatePauser(address newPauser) external; function updatePaused(bool newPaused) external; function isProduct(IProduct product) external view returns (bool); function owner() external view returns (address); function owner(uint256 coordinatorId) external view returns (address); function owner(IProduct product) external view returns (address); function treasury() external view returns (address); function treasury(uint256 coordinatorId) external view returns (address); function treasury(IProduct product) external view returns (address); }