DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

The InvalidAmount() error will not work as expected in FjordStaking:stakeVested

Summary

The line in stakeVested checks if the **stream **still has funds in it!

// @audit This check will revert from underflow not from InvalidAmount() error
if (depositedAmount - (withdrawnAmount + refundedAmount) <= 0) revert InvalidAmount();

The issue here is (withdrawnAmount + refundedAmount) > depositedAmount then this will revert from underflow and not from InvalidAmount()

Recommendation

// @audit This check will revert from underflow not from InvalidAmount() error
if (depositedAmount <= (withdrawnAmount + refundedAmount)) revert InvalidAmount();
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

0xleadwizard Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
0xleadwizard Submitter
about 1 year ago
0xleadwizard Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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