Function: stake(uint256 eUSDIn, uint256 minStakedeUSDOut, address beneficiary)
Allows users to stake their eUSD tokens.
Inputs
eUSDInConstraints: Not zero --- should be at least
MIN_INITIAL_STAKEduring the first stake.Impact: The amount of eUSD tokens to stake.
minStakedeUSDOutConstraints: N/A.
Impact: The minimum amount of stakedeUSD tokens to receive.
beneficiaryConstraints: N/A.
Impact: The beneficiary of the stakedeUSD tokens.
Branches and code coverage (including function calls)
Intended branches
Stake tokens successfully (first stake).
Stake tokens successfully (non-first stake).
Negative behavior
The contract call is reverted when
eUSDInis less thanMIN_INITIAL_STAKEduring the first stake.The contract call is reverted when allowance is insufficient.
The contract call is reverted when
stakedeUSDOutis less thanminStakedeUSDOut.
Function call analysis
stake -> _stake(eUSDIn, minStakedeUSDOut, beneficiary)External/Internal? Internal.
Argument control?
eUSDIn,minStakedeUSDOut, andbeneficiary.Impact: N/A.