Skip to content
Request an audit

‹ All findings

Unnecessary user balance check in _withdrawRequest()

Low/InfoGlacier·Three Sigma · Liquid staking · 12th July, 20233S-GLACIER-N12

Description

The balance of the user when withdrawing against the amount passed in as argument is already checked in the withdraw() function, there's no need to check again in _withdrawRequest().

Recommendation

Remove the following line

solidity
function _withdrawRequest(uint256 amount) internal {
    address user = msg.sender;
    require(amount <= balanceOf(user), "INSUFFICIENT_BALANCE"); // remove
this line
... }

Status

Currently being reviewed by the team.