When the contract is initialized the collateral token is set in the following line:
This means the collateral token is restricted to the markets short token which for all the current GMX markets on Arbitrum and Avalanche is USDC.
Here you can see all the collaterl for short positions is USDC:
https://app.gmx.io/#/trade/short
Here is how the short token is determined in GMX:
Thus, the vault's collateral token is limited to only USDC. This is in contrast to the intended design of the vault: https://github.com/CodeHawks-Contests/2025-02-gamma/blob/84b9da452fc84762378481fa39b4087b10bab5e0/contracts/PerpetualVault.sol#L160
USDC is the only collateral token supported
Only USDC can be deposited as a collateral token into the vault.
Manual Review and Foundry
There are multiple options:
Only support USDC as collateral and leave the contract logic unchanged
Use paraswap or a similar DEX to swap the deposited token into the collateral token.
Lastly, adding support for a collateral token that is not the market's short token would require a major change.
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.