Assessment reports>Blackwing>Threat Model>deposit

Function: deposit(IERC20 asset, uint256 amount)

This function is used to deposit assets into the vault.

Inputs

  • asset

    • Control: Arbitrary.

    • Constraints: Only registered assets can be used.

    • Impact: Address of the asset.

  • amount

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of the asset to deposit.

Branches and code coverage

Intended branches

  • Calculate the amount of vault tokens to mint corresponding to the amount of asset deposited.

  • Transfer asset from the sender to the vault.

  • Mint vault tokens to the user.

  • Update the last deposit block of the user.

Negative behavior

  • Revert if asset is not registered.

  • Revert if asset is not transferred from the sender.

Zellic © 2025Back to top ↑