In the GmxProxy
contract, there are two functions named refundExecutionFee
, but they differ in parameters. This can cause confusion for developers when using them, especially in complex systems or when calling functions from other contracts. Additionally, this issue could lead to calling the wrong function, posing security risks and disrupting the contract operation.
The two functions share the same name but perform entirely different tasks:
One function handles refunding the gas fee from GMX.
The other function handles refunding the fee for a specific recipient.
Without carefully reading the documentation or the source code, users might easily call the wrong function.
Confusion in calling the functions can lead to sending incorrect data or the wrong amount of assets.
Manual
Rename the functions to reflect the specific functionality of each one. For example:
refundExecutionFeeFromGMX
instead of refundExecutionFee
.
refundExecutionFeeToRecipient
instead of refundExecutionFee
.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.