Function: deposit(uint256 _underlyingAmount, uint8 _index)
Enables depositing tokens into the vault and updating depositor's stake details.
Inputs
_underlyingAmountControl: Full.
Constraints:
_underlyingAmount > 0.Impact: The amount of tokens to be deposited.
_indexControl: Full.
Constraints: Needs to be inside the bounds of
underlyingTokenAddresses.Impact: The underlying token.
Branches and code coverage (including function calls)
Intended branches
Successfully deposits
_underlyingAmountinto the vault.
Negative behavior
Reverts when
_underlyingAmountis equal to0.Reverts when
_indexis out of bounds.Reverts when caller has insufficient balance of the
_indextoken.
Function call analysis
deposit -> harvestRewards()What is controllable? Discarded.
If return value controllable, how is it used and how can it go wrong? Discarded.
What happens if it reverts, reenters, or does other unusual control flow? Discarded.
deposit -> depositIntoDefinitive(_underlyingAmount, _index)What is controllable? Discarded.
If return value controllable, how is it used and how can it go wrong? Discarded.
What happens if it reverts, reenters, or does other unusual control flow? Denotes an issue with the definitiveVault contract.