Function: depositWithERC20(address _token, uint256 _amount, address _referral)
Mint eETH by transferring stEth, cbEth, or wbEth, to be liquidated by this contract.
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.
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
transferFromfails.Reverts if deposit cap is reached.
Reverts if amount of eETH to be minted is insufficient to pay fees.