The current implementation sets the uiFeeReceiver (fee charged on GMX) to the msg.sender
. This can cause smart contracts integrating with Steadefi to lose funds if they are not able to claim the uiFee.
When adding or removing liquidity to GMX the uiFeeReceiver is set to self.refundee
(which is always the msg.sender
):
The intention here is to not pay any uiFees to GMX. However, uiFees are not paid automatically, but have to be claimed manually (using ExchangeRouter.claimUiFees
). This is not only inconvenient for users, but also might cause the uiFee-amount to be lost, due to users being smart contracts that integrate with Steadify, but did not consider this subtle mechanism.
Loss of funds equal to the uiFeeAmount that GMX would charge
Manual Review
Set IExchangeRouter#CreateDepositParams#uiFeeReceiver
to address(0)
, this will cause no uiFee to be charged as can be seen in PositionPricingUtils from GMX
Impact & Likelihood: High https://gmx-docs.io/docs/api/contracts-v2#creating-a-withdrawal
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.