Vaults are planned using USDC which is a blacklistable token. As a vulnerability the vault has scenarios where failure to transfer the tokens directly to the user will freeze the vaults functionality until the transfer happens. Hence a blacklisted user can cause DOS of the vault.
In processWithdraw
the status of the vault is changed from Withdraw
to Open
only if the tokens are successfully transferred to the user
https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXWithdraw.sol#L168-L199
A blacklisted user can deposit with a non-blacklisted account and then transfer the vault tokens to the blacklisted account. When the blacklisted account creates a withdrawal request to withdraw assets in the blacklisted token, the processWithdraw
function will always revert causing the status of the vault to forever remain in Withdraw
When deposit requests are cancelled in GMX, the processDepositCancellation
function is invoked which returns the user's deposit.
https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXDeposit.sol#L193C12-L217
A user could front run a black list to make a deposit which on cancellation will cause the processDepositCancellation
function to revert and fix the status of the vault to Deposit
forerver.
When deposits succeed in GMX but fails due to conditions in the vault, the processDepositFailureLiquidityWithdrawal
is invoked which will attempt to transfer the tokens to the user.
https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXDeposit.sol#L282-L352
A user could front run a black list to make a deposit with extremely high minSharesAmt
which will set the status to Deposit_Failed and fix the status of the vault to Deposit_Failed
forever since tokens cannot be transferred due to blacklist.
Certain user's may be able to cause DOS of the vault which will lead to loss of funds for all user's.
Create a separate contract which will hold and allow the user's to retrieve the return funds.
Impact: High Likelihood: Low
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.