Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

Redundant Fee Check in VaultRouterBranch::deposit

Summary

Redundant Fee Check in VaultRouterBranch::deposit

Vulnerability Details

Before transfering `ctx.assetFees` the code checks that it is greter than zero.

However there is no need for this check as it is already handled earlier in the execution:

Impact

Unnecessary gas usage: The extra conditional check slightly increases gas consumption.

Tools Used

Manual review

Recommendations

Remove the redundant if (ctx.assetFees > 0) check before safeTransferFrom, as ctx.assetFees is always nonzero when the fee is enforced.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.