Assessment reports>Beefy UniswapV3>Threat Model>withdraw

Function: withdraw(uint256 _amount0, uint256 _amount1)

Allows the withdrawal of the specified amount of tokens from the strategy as calculated by the vault.

Inputs

  • _amount0

    • Control: The amount of token0 to withdraw.

    • Constraints: None — assumed to be within the vault's control.

    • Impact: The amount of token0 to withdraw.

  • _amount1

    • Control: The amount of token1 to withdraw.

    • Constraints: None — assumed to be within the vault's control.

    • Impact: The amount of token1 to withdraw.

Branches and code coverage

Intended branches

  • Transfer the tokens to the vault.

  • Add liquidity back to the positions.

Negative behavior

  • Should not allow calling under periods that are not calm. Currently not enforced.

  • Should not allow anyone other than the vault to call this function.

  • Should not allow calling this if the strategy is paused.

Zellic © 2024Back to top ↑