diff --git a/contracts/core/PriorityPool.sol b/contracts/core/PriorityPool.sol index 8fd1d8ec..ac9ea484 100644 --- a/contracts/core/PriorityPool.sol +++ b/contracts/core/PriorityPool.sol @@ -326,7 +326,7 @@ contract PriorityPool is UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeabl } /** - * @notice deposits queued tokens into the staking pool + * @notice deposits queued and/or unused tokens * @param _queueDepositMin min amount of tokens required for deposit * @param _queueDepositMax max amount of tokens that can be deposited at once */ @@ -351,7 +351,7 @@ contract PriorityPool is UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeabl } /** - * @notice deposits queued tokens into the staking pool + * @notice deposits queued and/or unused tokens * @dev will revert if less than queueDepositMin tokens can be deposited * @dev used by chainlink keepers */ @@ -533,7 +533,8 @@ contract PriorityPool is UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeabl } /** - * @notice deposits queued tokens + * @notice deposits queued and/or unused tokens + * @dev will prioritize unused deposits sitting in staking pool before queued deposits in this pool * @param _depositMin min amount of tokens required to deposit **/ function _depositQueuedTokens(uint256 _depositMin, uint256 _depositMax) internal { diff --git a/contracts/core/StakingPool.sol b/contracts/core/StakingPool.sol index 50a4182b..e8603bb5 100644 --- a/contracts/core/StakingPool.sol +++ b/contracts/core/StakingPool.sol @@ -165,8 +165,8 @@ contract StakingPool is StakingRewardsPool { } /** - * @notice returns the amont of tokens sitting in the pool outside a strategy - * @dev these tokens earn no yield and should be deposited ASAP + * @notice returns the amont of tokens sitting in this pool outside a strategy + * @dev these tokens earn no yield and will be deposited ASAP * @return amount of tokens outside a strategy */ function getUnusedDeposits() external view returns (uint256) { diff --git a/contracts/linkStaking/CommunityVCS.sol b/contracts/linkStaking/CommunityVCS.sol index 85db9c15..18309d2f 100644 --- a/contracts/linkStaking/CommunityVCS.sol +++ b/contracts/linkStaking/CommunityVCS.sol @@ -21,6 +21,18 @@ contract CommunityVCS is VaultControllerStrategy { _disableInitializers(); } + /** + * @notice initializes contract + * @param _token address of LINK token + * @param _stakingPool address of the staking pool that controls this strategy + * @param _stakeController address of Chainlink staking contract + * @param _vaultImplementation address of the implementation contract to use when deploying new vaults + * @param _fees list of fees to be paid on rewards + * @param _maxDepositSizeBP basis point amount of the remaing deposit room in the Chainlink staking contract + * that can be deposited at once + * @param _vaultDeploymentThreshold the min number of non-full vaults before a new batch is deployed + * @param _vaultDeploymentAmount amount of vaults to deploy when threshold is met + **/ function initialize( address _token, address _stakingPool, @@ -61,13 +73,17 @@ contract CommunityVCS is VaultControllerStrategy { } } + /** + * @notice returns whether a new batch of vaults should be deployed + * @dev used by chainlink keepers + */ function checkUpkeep(bytes calldata) external view returns (bool, bytes memory) { return ((vaults.length - 1 - indexOfLastFullVault) < vaultDeploymentThreshold, bytes("")); } /** * @notice deploys a new batch of vaults - * @dev will revert if the # of non-full vaults is not less than vaultDeploymentThreshold + * @dev will revert if the number of non-full vaults is not less than vaultDeploymentThreshold * @dev used by chainlink keepers */ function performUpkeep(bytes calldata) external { @@ -75,13 +91,17 @@ contract CommunityVCS is VaultControllerStrategy { _deployVaults(vaultDeploymentAmount); } + /** + * @notice deploys a new batch of vaults + * @param _numVaults number of vaults to deploy + */ function addVaults(uint256 _numVaults) external onlyOwner { _deployVaults(_numVaults); } /** * @notice sets the vault deployment parameters - * @param _vaultDeploymentThreshold the min # of non-full vaults before a new batch is deployed + * @param _vaultDeploymentThreshold the min number of non-full vaults before a new batch is deployed * @param _vaultDeploymentAmount amount of vaults to deploy when threshold is met */ function setVaultDeploymentParams(uint128 _vaultDeploymentThreshold, uint128 _vaultDeploymentAmount) external onlyOwner {