@@ -800,7 +800,8 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
800800 /**
801801 * @notice Remove tokens from a provision and move them back to the service provider's idle stake.
802802 * @dev The parameter `nThawRequests` can be set to a non zero value to fulfill a specific number of thaw
803- * requests in the event that fulfilling all of them results in a gas limit error.
803+ * requests in the event that fulfilling all of them results in a gas limit error. Otherwise, the function
804+ * will attempt to fulfill all thaw requests until the first one that is not yet expired is found.
804805 * @param _serviceProvider The service provider address
805806 * @param _verifier The verifier address
806807 * @param _nThawRequests The number of thaw requests to fulfill. Set to 0 to fulfill all thaw requests.
@@ -956,7 +957,8 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
956957 /**
957958 * @notice Withdraw undelegated tokens from a provision after thawing.
958959 * @dev The parameter `nThawRequests` can be set to a non zero value to fulfill a specific number of thaw
959- * requests in the event that fulfilling all of them results in a gas limit error.
960+ * requests in the event that fulfilling all of them results in a gas limit error. Otherwise, the function
961+ * will attempt to fulfill all thaw requests until the first one that is not yet expired is found.
960962 * @dev If the delegation pool was completely slashed before withdrawing, calling this function will fulfill
961963 * the thaw requests with an amount equal to zero.
962964 * @param _requestType The type of thaw request (Provision or Delegation).
@@ -1073,6 +1075,9 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
10731075
10741076 /**
10751077 * @notice Traverses a thaw request list and fulfills expired thaw requests.
1078+ * @dev Note that the list is traversed by creation date not by thawing until date. Traversing will stop
1079+ * when the first thaw request that is not yet expired is found even if later thaw requests have expired. This
1080+ * could happen for example when the thawing period is shortened.
10761081 * @param _params The parameters for fulfilling thaw requests
10771082 * @return The amount of thawed tokens
10781083 * @return The amount of tokens still thawing
0 commit comments