Function: _deposit(address _caller, address _receiver, uint256 _assets, uint256 _shares)

This function overrides ERC4626 _deposit to add donation attack protection.

Inputs

  • _caller

    • Control: Full control.

    • Constraints: None.

    • Impact: People whose underlying assets were taken away.

  • _receiver

    • Control: Full control.

    • Constraints: None.

    • Impact: People who receive shares.

  • _assets

    • Control: Full control.

    • Constraints: None.

    • Impact: The amount of underlying token managed by the Vault. Has units defined by the corresponding EIP-20 contract.

  • _shares

    • Control: Full control.

    • Constraints: None.

    • Impact: The amount of tokens in the vault. Has a ratio of underlying assets exchanged on mint/deposit/withdraw/redeem (as defined by the Vault).

Branches and code coverage

Intended branches

Negative behavior

Zellic © 2025Back to top ↑