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

Overreliance on USD Size for Position Existence Checks

VaultReader.sol

The function uses getPositionSizeInUsd(key) to decide whether a position exists:

if (getPositionSizeInUsd(key) == 0) return emptyPosition;

Yet the vault stores both USD and token sizes (using SIZE_IN_USD and SIZE_IN_TOKENS). If a position’s USD value is zero while its token value isn’t (or if an update inconsistency occurs), a valid position could be misreported as empty.
Recommendation: Either enforce a strict consistency between the USD and token values in the datastore or check both when determining if a position exists. This helps uphold the protocol’s invariants around accurate position accounting.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Suppositions

There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.

Support

FAQs

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

Give us feedback!