Assessment reports>Nukem Loans>Threat Model>_withdraw

Function: _withdraw(uint256 assets, address receiver, address owner)

This allows withdrawing assets from the vault.

Inputs

  • assets

    • Control: Fully controlled by the caller.

    • Constraints: Limited to the balance of owner.

    • Impact: The amount of assets to withdraw from the vault.

  • receiver

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The address to mint the shares to.

  • owner

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The address owning the assets to withdraw.

Branches and code coverage (including function calls)

Intended branches

  • Deplete the balance of assets for address(this) by assets.

  • Increase the balance of assets for receiver by assets.

  • Burn shares from owner.

Negative behavior

  • Should not allow spending more than the allowance if the caller is not the owner.

  • Should not allow withdrawing more assets than what is burned.

Zellic © 2024Back to top ↑