Function: mint(uint256 shares, address receiver)

This function is an alternative deposit path that targets a desired share amount during the deposit window.

Inputs

  • shares

    • Control: N/A.

    • Constraints: Must be greater than zero and within the remaining cap (maxDeposit).

    • Impact: Determines how much USDT will be transferred.

  • receiver

    • Control: 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 USDT.

Negative behavior

  • Calls outside the Deposit phase 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.

Zellic © 2025Back to top ↑