Function: mint(uint256 shares, address receiver)
This mints exactly vault shares to the receiver by depositing an amount of underlying tokens.
Inputs
shares
Control: Full.
Constraints: Cannot exceed the max mintable shares.
Impact: The number of vault shares that will be minted and transferred to the receiver.
receiver
Control: Full.
Constraints: Needs to be a valid, nonzero address.
Impact: Address to receive vault shares.
Branches and code coverage (including function calls)
Intended branches
Should mint shares when minting with LP tokens.
Should return the correct result for
previewMint()
with zero outstanding shares.Should return the correct result for
previewMint()
when there are outstanding shares.Should return
MAX_UINT_256
formaxMint()
.
Negative behavior
mint()
should revert when in safe harbor mode.previewMint()
should not revert when in safe harbor mode.maxMint()
should not revert when in safe harbor mode.
Function call analysis
rootFunction -> maxMint(address)
What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? N/A.
rootFunction -> previewMint(uint256)
What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? N/A.