WithdrawalQueue.sol::requestWithdrawals()
contains min and max msg.value
checks. Before BridgeSteth.sol::unstake()
calls WithdrawalQueue.sol::requestWithdrawals()
it should check msg.value
in user transactions.
The minimum value is defined as 100 wei
by MIN_STETH_WITHDRAWAL_AMOUNT
at WithdrawalQueue.sol#L52
and used in WithdrawalQueue.sol::_checkWithdrawalRequestAmount.sol
(see links).
The minimum value is defined as 1000 * 1e18
(1000 ether) by MAX_STETH_WITHDRAWAL_AMOUNT
at WithdrawalQueue.sol#L57
and used in WithdrawalQueue.sol::_checkWithdrawalRequestAmount.sol
(see links).
Any withdrawl request below minimum or above maximum will cause the transaction to revert. This means the user's transaction will fail and user will lose the gas costs associated with that transaction and have bad user experience.
Manual Review
Update BridgeSteth.sol::unstake()
to include:
A minimum check that uint256 amount
is greater than 100 wei
A maximum check that uint256 amount
is not greater than 1000 ether
*** hardcoded in example, would be better to use WithdrawalQueue.sol
functions to get up to date values
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.