Assessment reports>ether.fi>Threat Model>depositWithERC20

Function: depositWithERC20(address _token, uint256 _amount, address _referral)

Mint eETH by transferring stEth, cbEth, or wbEth, to be liquidated by this contract.

Inputs

  • _token

    • Control: Arbitrary.

    • Constraints: Must be whitelisted, and also be stEth, cbEth, or wbEth.

    • Impact: Token to deposit.

  • _amount

    • Control: Arbitrary.

    • Constraints: Call to _token.transferFrom with amount must succeed.

    • Impact: Amount of token to deposit.

  • _referral

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Passed to liquidity pool contract to be emitted in eETH mint event.

Branches and code coverage

Intended branches

  • stEth deposit successfully mints eETH and adds to running deposit cap and statistics.

  • cbEth deposit successfully mints eETH and adds to running deposit cap and statistics.

  • wbEth deposit successfully mints eETH and adds to running deposit cap and statistics.

  • ERC20s owned by contract can be liquidated later by admin.

Negative behavior

  • Reverts when paused.

  • Reverts when reentrancy is attempted.

  • Reverts on unwhitelisted token.

  • Reverts if transferFrom fails.

  • Reverts if deposit cap is reached.

  • Reverts if amount of eETH to be minted is insufficient to pay fees.

Zellic © 2025Back to top ↑