Function: _deposit(uint256 assets, address receiver)
This facilitates depositing assets into the vault.
Inputs
assetsControl: Fully controlled by the caller.
Constraints: Checked that enough was transferred in
safeTransferFromWithAmount.Impact: The amount of assets to deposit into the vault.
receiverControl: Fully controlled by the caller.
Constraints: None.
Impact: The address to mint the shares to.
Branches and code coverage (including function calls)
Intended branches
Deplete the balance of
msg.senderbyassets.Increase the balance of
address(this)byassets.Mint
sharestoreceiver.
Negative behavior
Should not allow depositing more assets than what was transferred. That is ensured in
safeTransferFromWithAmount.Should not allow the deposit inflation attack. Currently that is not enforced in code.