VaultReader.sol
In the getPositionInfo function the code does this:
Here the variable is named “sizeInTokens” even though it’s actually reading the USD value (using the SIZE_IN_USD constant). This misnaming risks confusion in future modifications or integrations—if developers assume it represents the token amount, they might make incorrect calculations.
Recommendation: Rename the variable (for example, to “sizeInUsd”) so that its purpose is clear and aligns with the underlying datastore key.
Only check if there are no tokens. Checking if USD is 0 is equivalent. There is no problem here, even if the variable has an incorrect name: Informational.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.