Skip to content
Request an audit

‹ All findings

avaxAmount is never 0 in withdraw() in the first if (avaxAmount > 0 && ...)

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

Description

In function withdraw(), checking if (avaxAmount > 0) is not required since it is

solidity
guaranteed to be true by require(amount > 0, "ZERO_WITHDRAW");
function withdraw(uint256 amount) external nonReentrant {
    ... require(amount > 0, "ZERO_WITHDRAW");
    ... if (avaxAmount > 0 && depositAmount > 0) { // avaxAmount is never 0 ... }
    ...

Recommendation

Remove avaxAmount > 0 from the if statement.

Status

Currently being reviewed by the team.