In order to activate the emergency withdrawals, the vault needs to reach the CLOSED status. If the vault fails to do so, users won't be able to withdraw their funds.
Users have the ability to call emergencyWithdraw
method in order to retrieve their funds when the vault is CLOSED link1. However to reach this status, the vault needs to be paused first by the owners and then the emergencyClose
needs to be called link2.
However the emergencyClose
has many possible points of failure since it does many external calls:
1- calls the lending contract to calculate debt and repay it link3 link4 link5 link 6
2- calls a swap router if a trade is needed link6 (can revert for example if the uniswap router does not provide enough tokenOut when given a fix amount of tokenIn).
If any of these calls fail, the vault status will remain at PAUSED.
Users cannot retrieve their funds after the pause unless all the external contracts done in emergencyClose
work as expected and all the debt have been cleared.
Use a time limit after pausing the vault that allows anyone to CLOSE the vault without doing any external calls inside the method.
Example:
This is more of an INFO finding. Left open for a sponsor's review.
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.