Function: _mint(uint256 shares, address receiver)
This facilitates minting shares into the vault.
Inputs
shares
Control: Fully controlled by the caller.
Constraints: None.
Impact: The amount of shares to mint.
receiver
Control: 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.sender
byassets
.Increase the balance of
address(this)
byassets
.Mint
shares
toreceiver
.
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.
Should not allow for huge discrepancies between
previewMint
and actual mint. Currently that is not enforced in code.