Assessment reports>ether.fi>Threat Model>depositWithERC20WithPermit

Function: depositWithERC20WithPermit(address _token, uint256 _amount, address _referral, PermitInput _permit)

Mint eETH by transferring stEth, cbEth, or wbEth, to be liquidated by this contract, using a signed permit rather than a previously-submitted token allowance.

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.

  • _permit

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Call to _token.permit with permit must succeed.

Branches and code coverage

Intended branches

  • Deposit with permit successfully mints eETH and adds to running deposit cap and statistics.

Negative behavior

  • Reverts when paused.

  • Reverts when depositWithERC20 would revert.

Zellic © 2025Back to top ↑