VaultRouterBranch::initiateWithdrawal
expects provided shares to be in 18 decimals but doesn't calculate value in the decimals of indexToken
when transferring vault.indexToken
. In the case in which the index token is not 18 decimals the value transferred will not be what the user expected.
VaultRouterBranch::initiateWithdrawal
expects provided shares to be in 18 decimals but doesn't calculate value in the decimals of indexToken
when transferring vault.indexToken
. In the case in which the index token is not 18 decimals the value transferred will not be what the user expected.
Let's have the following scenario:
indexToken
is a token with 12 decimals.
User A makes a call to initiateWithdrawal
with shares equal to 1e18, expecting 1 token to be transferred.
A transfer of 1e6 tokens is actually made (1e18 / 1e12).
Loss for user and unclear transfer logic when initiating withdrawal.
Manual Review
Calculate shares amount in the decimals of the indexToken
before making a transfer from msg.sender
to the contract.
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.