Function: deposit(uint256 _underlyingAmount, uint8 _index)
Enables depositing tokens into the vault and updating depositor's stake details.
Inputs
_underlyingAmount
Control: Full.
Constraints:
_underlyingAmount > 0
.Impact: The amount of tokens to be deposited.
_index
Control: 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
_underlyingAmount
into the vault.
Negative behavior
Reverts when
_underlyingAmount
is equal to0
.Reverts when
_index
is out of bounds.Reverts when caller has insufficient balance of the
_index
token.
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.