Function: batchDepositWithBidIds(uint256[] _candidateBidIds, bool _enableRestaking)
Allows depositing multiple stakes at once. This function processes an array of bid IDs, matches them with stakes, and returns an array of bid IDs that were processed and assigned.
Inputs
_candidateBidIds
Control: Fully controlled by the caller.
Constraints: No specific constraints mentioned.
Impact: Determines the bids to be processed and matched with stakes.
_enableRestaking
Control: Fully controlled by the caller.
Constraints: No specific constraints mentioned.
Impact: Determines whether restaking is applied.
Branches and code coverage
Intended branches
Deposits a multiple of
stakeAmount
for the bid IDs passed in the argument and refunds the unmatched bid amount.
Negative behavior
Revert if
msg.value
is not a multiple ofstakeAmount
or ifmsg.value / stakeAmount
is 0.Revert if there are not enough bids.
Revert if there is an incorrect number of bids.
Revert if the contract is paused.
Function call analysis
this.auctionManager.numberOfActiveBids()
What is controllable? N/A.
If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller. It ensures that there are enough active bids for processing.
What happens if it reverts, reenters or does other unusual control flow? N/A.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this.auctionManager.getBidOwner(bidId)
What is controllable?
bidId
.If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller and represents the owner of the bid.
What happens if it reverts, reenters or does other unusual control flow? N/A.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this.auctionManager.isBidActive(bidId)
What is controllable?
bidId
.If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller and represents whether the bid is active.
What happens if it reverts, reenters or does other unusual control flow? N/A.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this._verifyNodeOperator(operator, _source)
What is controllable? N/A.
If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller and represents the verification result.
What happens if it reverts, reenters or does other unusual control flow? If this verification call reverts, it indicates a failure in verifying the node operator, impacting the deposit process.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this.auctionManager.updateSelectedBidInformation(bidId)
What is controllable?
bidId
.If the return value is controllable, how is it used and how can it go wrong? No return value.
What happens if it reverts, reenters or does other unusual control flow? If this call reverts, it indicates a failure in updating the selected bid information and would revert the entire transaction — no reentrancy scenarios.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this._processDeposit(bidId, _staker, _enableRestaking, _source, _validatorIdToShareWithdrawalSafe) -> this.nodesManager.allocateEtherFiNode(_enableRestaking)
What is controllable?
_enableRestaking
.If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller and returns the allocated withdrawal safe address.
What happens if it reverts, reenters or does other unusual control flow? N/A.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0) -> this._processDeposit(bidId, _staker, _enableRestaking, _source, _validatorIdToShareWithdrawalSafe) -> this.nodesManager.registerValidator(validatorId, _enableRestaking, etherfiNode)
What is controllable?
validatorId
and_enableRestaking
.If the return value is controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters or does other unusual control flow? If this call reverts, it indicates a failure in registering the validator — no reentrancy scenario.
this._processDeposits(_candidateBidIds, numberOfDeposits, msg.sender, ILiquidityPool.SourceOfFunds.DELEGATED_STAKING, _enableRestaking, 0)
What is controllable?
_candidateBidIds
and_enableRestaking
.If the return value is controllable, how is it used and how can it go wrong? The return value is not directly controllable by the caller and represents the bid IDs that are processed.
What happens if it reverts, reenters or does other unusual control flow? If this call reverts, it indicates a general failure in the deposit process — no reentracy scenario.