Disposition of execution fee refunds due to early data deletion
A critical issue in the _handleReturn() function is causing the loss of user funds. The function deletes deposit information before processing potential refunds, making it impossible to return excess execution fees.
The problem occurs in the _handleReturn() function when it calls _burn(), which removes the depositInfo mapping. This mapping contains essential data like the execution fee provided by the user. Later, when the code checks if depositInfo[depositId].executionFee exceeds usedFee to process a refund, the data is no longer available because it was deleted. As a result, users cannot recover excess fees, leading to financial loss.
Users cannot recover excess execution fees because the necessary data is deleted before the refund check.
Manual Review
Modify the _handleReturn() function to retrieve and store the execution fee before calling _burn().
Likelihood: High, every time a user withdraw on 1x vault with paraswap Impact: Medium, fees never claimed to GMX and refund to the owner.
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.