Function: redeem(uint256 shares, address receiver, address owner)

This function is a bridge-driven share burn that withdraws the proportional USDT amount for a given share quantity — only in the Withdraw phase.

Inputs

  • shares

    • Control: N/A.

    • Constraints: Must be nonzero and within the owner's redeemable balance (maxRedeem).

    • Impact: Determines the share amount burned.

  • receiver

    • Control: N/A.

    • Constraints: N/A.

    • Impact: Receives the redeemed USDT.

  • owner

    • Control: N/A.

    • Constraints: Must be nonzero.

    • Impact: Has shares burned in exchange for USDT delivered to receiver.

Branches and code coverage

Intended branches

  • Shares are burned, and USDT is transferred.

Negative behavior

  • Calls outside the Withdraw mode revert.

Function call analysis

  • SafeERC20.safeTransfer(IERC20(this.asset()), receiver, assets)

    • What is controllable? The bridge controls the number of shares to redeem (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 ↑