Assessment reports>Definitive>Threat Model>redeemOneUnderlying

Function: redeemOneUnderlying(uint256 shares, uint8 index, uint256 minAmount, address receiver, address _owner)

This redeems a specific underlying asset for a given number of shares.

Inputs

  • shares

    • Control: Full.

    • Constraints: Must be less than or equal to the owner's vault-share balance.

    • Impact: The number of the owner's shares that will be burned.

  • index

    • Control: Full.

    • Constraints: Must be less than the total number of underlying assets.

    • Impact: Determines which specific underlying asset will be redeemed.

  • minAmount

    • Control: Full.

    • Constraints: N/A.

    • Impact: Reverts if received amount would be less than minAmount.

  • receiver

    • Control: Full.

    • Constraints: Needs to be a valid, nonzero address.

    • Impact: Address to receive underlying asset.

  • _owner

    • Control: Full.

    • Constraints: Needs to be a valid, nonzero address.

    • Impact: Accounts whose shares will be burned in exchange for the asset.

Branches and code coverage (including function calls)

Intended branches

  • Should burn shares when invoking redeemOneUnderlying() with LP tokens.

Negative behavior

  • redeemOneUnderlying() should revert when in safe harbor mode.

  • previewRedeem() should not revert when in safe harbor mode.

  • maxRedeem() should not revert when in safe harbor mode.

Function call analysis

  • rootFunction -> maxRedeem(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 -> previewRedeem(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.

Zellic © 2025Back to top ↑