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
_tokenControl: Arbitrary.
Constraints: Must be whitelisted, and also be stEth, cbEth, or wbEth.
Impact: Token to deposit.
_amountControl: Arbitrary.
Constraints: Call to
_token.transferFromwith amount must succeed.Impact: Amount of token to deposit.
_referralControl: Arbitrary.
Constraints: None.
Impact: Passed to liquidity pool contract to be emitted in eETH mint event.
_permitControl: Arbitrary.
Constraints: None.
Impact: Call to
_token.permitwith 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
depositWithERC20would revert.