Function: deposit(address onBehalfOf, uint256 amount)
Deposit collateral into the vault.
Inputs
onBehalfOf
Control: Completely controlled by the caller.
Constraints: Should not be
address(0)
.Impact: Account the deposit is made on behalf of.
amount
Control: Completely controlled by the caller.
Constraints: Should not be zero.
Impact: Amount of the collateral to deposit.
Branches and code coverage (including function calls)
Intended branches
Appropriate amount of shares is allocated to
onBehalfOf
.Specified amount of collateral is transferred from the caller to the vault.
Negative behavior
Reverts if amount is zero.
Reverts if
onBehalOf
isaddress(0)
.Reverts if whitelist is active and depositor is not whitelisted.