Function: mint(uint256 shares, address receiver)
This function is an alternative deposit path that targets a desired share amount during the deposit window.
Inputs
sharesControl: N/A.
Constraints: Must be greater than zero and within the remaining cap (
maxDeposit).Impact: Determines how much FRXUSDT will be transferred.
receiverControl: N/A.
Constraints: Must be nonzero.
Impact: Receives the requested share amount.
Branches and code coverage
Intended branches
Shares are minted 1:1 with the deposited FRXUSDT.
Negative behavior
Calls outside Deposit mode and window revert.
Function call analysis
SafeERC20.safeTransferFrom(IERC20(this.asset()), caller, address(this), assets)What is controllable? The caller controls the number of shares to mint (
shares) and the receiver (receiver).If the return value is 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.