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 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

0xleadwizard Submitter
10 months ago
inallhonesty Lead Judge
10 months ago
0xleadwizard Submitter
10 months ago
0xleadwizard Submitter
10 months ago
inallhonesty Lead Judge
10 months ago
inallhonesty Lead Judge 10 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.