The protocol's vault is designed to hold two tokens: an index token and a collateral token. Users deposit the collateral token to enter the vault. The issue lies in the share calculation formula within the _mint
function - it subtracts the amount provided by the user from the index token balance. This approach is incorrect because the function deals with two different tokens, which have varying decimal places and values, making direct subtraction invalid.
Let's examine the _mint
function:
The issue is in the following line:
This is incorrect because amount
represents the collateral token, but the function deducts it from the index token balance. Since these are two different tokens with potentially different decimal places and values, direct subtraction is not valid.
An incorrect formula could lead to inaccurate share calculations or even DoS vulnerability due to decimal mismatches.
Manual review.
Use collateralToken.balanceOf(address(this))
instead.
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.
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.