Assessment reports>Y2K Finance>Threat Model>afterDeposit

Function: afterDeposit(uint256 amount)

This deposits the amount into Aave (from deposits in strategy vault).

Inputs

  • amount

    • Control: Fully controlled.

    • Constraints: No constraints.

    • Impact: The amount to deposit.

Branches and code coverage (including function calls)

Intended branches

  • Calls the _supply function with the provided amount and true as arguments.

  • Emits an AaveSupply event.

Negative behavior

  • The function reverts if the caller is an address other than strategy.

Function call analysis

  • _supply(amount, true)

    • What is controllable? amount.

    • 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? If this reverts, the entire call fails --- no reentrancy issues.

Zellic © 2024Back to top ↑