Assessment reports>WOOFI Stake>Threat Model>withdraw

Function: withdraw(uint256 amount)

This allows the vault to withdraw funds from the strategy.

Inputs

  • amount

    • Control: Fully controlled by the vault — assumed that prior checks are done beforehand.

    • Constraints: Check if the amount is greater than zero.

    • Impact: The amount to withdraw from the strategy.

Branches and code coverage

Intended branches

  • Charge withdrawal fees if the amount to be withdrawn is greater than the fee. Currently, the fees are charged regardless of the amount to be withdrawn.

  • If the amount to withdraw is greater than the balance of the strategy, withdraw the remaining amount from the Aave Pool.

  • Transfer the remaining amount to the vault.

Negative behavior

  • Caller is a service admin.

Zellic © 2024Back to top ↑