bearonbike
high
In ExchangeRouter.sendWnt function, excess native token could be locked in the contract.
In ExchangeRouter.sendWnt function, msg.value could greater than the amount of native token that user want to deposit in Wnt contract, since there is not function for return funds, excess native token could be locked in the contract forever.
Funds could be locked forever, so i think it is a high severity vulnerability.
https://github.com/sherlock-audit/2023-02-gmx/blob/main/gmx-synthetics/contracts/router/ExchangeRouter.sol#L94-L97 https://github.com/sherlock-audit/2023-02-gmx/blob/main/gmx-synthetics/contracts/token/TokenUtils.sol#L88-L105
Manual Review
Return excess native token to sender or use msg.value instead of "amount" parameter.