Olympus 백서

Olympus

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 16쪽 중 16쪽

r_ , uint256 amount_ , bool enforceDepositChecks_ ) internal onlyConfiguredAsset ( asset_ ) returns ( uint256 actualAmount , uint256 shares ) ; Parameters Name Type Description asset_ IERC20 The asset to deposit depositor_ address The depositor amount_ uint256 The amount of assets to deposit enforceDepositChecks_ bool Whether to enforce the minimum deposit requirement and deposit cap Returns Name Type Description actualAmount uint256 The actual amount of assets redeemable by the shares shares uint256 The number of shares received _ withdrawAsset ​ Withdraw assets from the configured vault This function will withdraw the assets from the vault and send them to the depositor. If the vault is the zero address, the assets will be kept idle. This function will revert if: The vault is not approved function _withdrawAsset ( IERC20 asset_ , address depositor_ , uint256 amount_ ) internal onlyConfiguredAsset ( asset_ ) returns ( uint256 shares , uint256 assetAmount ) ; Parameters Name Type Description asset_ IERC20 The asset to withdraw depositor_ address The depositor amount_ uint256 The amount of assets to withdraw Returns Name Type Description shares uint256 The number of shares withdrawn (can be 0) assetAmount uint256 The amount of assets withdrawn (can be 0) getOperatorAssets ​ Get the number of assets deposited for an asset and operator function getOperatorAssets ( IERC20 asset_ , address operator_ ) public view override returns ( uint256 shares , uint256 sharesInAssets ) ; Parameters Name Type Description asset_ IERC20 The asset to get the deposited shares for operator_ address The operator to get the deposited shares for Returns Name Type Description shares uint256 The number of shares deposited sharesInAssets uint256 The number of shares deposited (in terms of assets) _ getOperatorKey ​ Get the key for the operator shares function _getOperatorKey ( IERC20 asset_ , address operator_ ) internal pure returns ( bytes32 ) ; _ addAsset ​ Configure an asset to be deposited into a vault This function will configure an asset to be deposited into a vault. If the vault is the zero address, the assets will be kept idle. Note that the asset can only be configured once. This is to prevent the assets from being moved between vaults and exposing the deposited assets to the risk of theft. This function will revert if: The asset is already configured The vault asset does not match the asset The minimum deposit exceeds the deposit cap function _addAsset ( IERC20 asset_ , IERC4626 vault_ , uint256 depositCap_ , uint256 minimumDeposit_ ) internal ; Parameters Name Type Description asset_ IERC20 The asset to configure vault_ IERC4626 The vault to use depositCap_ uint256 The deposit cap of the asset minimumDeposit_ uint256 The minimum deposit amount for the asset _ setAssetDepositCap ​ Set the deposit cap for an asset This function will set the deposit cap for an asset. This function will revert if: The asset is not configured The deposit cap is less than the minimum deposit function _setAssetDepositCap ( IERC20 asset_ , uint256 depositCap_ ) internal ; Parameters Name Type Description asset_ IERC20 The asset to set the deposit cap for depositCap_ uint256 The deposit cap to set for the asset _ setAssetMinimumDeposit ​ Set the minimum deposit for an asset This function will set the minimum deposit for an asset. The minimum deposit prevents insolvency issues that can occur when small deposits accrue large amounts of yield. When claiming yield on such deposits, all vault shares may be burned while liabilities remain, causing the DepositManager_Insolvent error and blocking subsequent yield claims. This function will revert if: The asset is not configured The minimum deposit exceeds the deposit cap function _setAssetMinimumDeposit ( IERC20 asset_ , uint256 minimumDeposit_ ) internal ; Parameters Name Type Description asset_ IERC20 The asset to set the minimum deposit for minimumDeposit_ uint256 The minimum deposit to set for the asset _ isConfiguredAsset ​ function _isConfiguredAsset ( IERC20 asset_ ) internal view returns ( bool ) ; _ onlyConfiguredAsset ​ function _onlyConfiguredAsset ( IERC20 asset_ ) internal view ; onlyConfiguredAsset ​ modifier onlyConfiguredAsset ( IERC20 asset_ ) ; getAssetConfiguration ​ Get the configuration for an asset function getAssetConfiguration ( IERC20 asset_ ) public view override returns ( AssetConfiguration memory configuration ) ; Parameters Name Type Description asset_ IERC20 The asset to get the configuration for Returns Name Type Description configuration AssetConfiguration The configuration for the asset getConfiguredAssets ​ Get the assets that are configured function getConfiguredAssets ( ) public view override returns ( IERC20 [ ] memory assets ) ; Returns Name Type Description assets IERC20[] The assets that are configured supportsInterface ​ function supportsInterface ( bytes4 interfaceId ) public view virtual returns ( bool ) ; State Variables _configuredAssets _assetConfigurations _operatorShares Functions _depositAsset _withdrawAsset getOperatorAssets _getOperatorKey _addAsset _setAssetDepositCap _setAssetMinimumDeposit _isConfiguredAsset _onlyConfiguredAsset onlyConfiguredAsset getAssetConfiguration getConfiguredAssets supportsInterface
프로젝트로 돌아가기