The current implementation of the createOrder and settle function in the GmxProxy contract restricts all orders to use a triggerPrice of 0, meaning the contract is unable to create or process Limit and Stop orders.
The createOrder and settle function in the current GmxProxy contract always sets the triggerPrice to 0, which effectively disables support for Limit and Stop orders. This limits the ability of users to set specific trigger prices for executing trades, which is a common and expected feature in many trading systems.
contracts/GmxProxy.sol:createOrder#L429
contracts/GmxProxy.sol:settle#488
This limitation affects several order types, including:
LimitIncrease: Limit order for opening positions.
LimitDecrease: Limit order for reducing positions.
StopLossDecrease: Stop-loss order for reducing positions.
StopIncrease: Stop order for opening positions.
The inability to support advanced order types like Limit and Stop orders severely restricts the functionality of the trading system, which are requested according to the Order.sol contract.
Users are unable to set specific trigger prices, which may be essential for many trading strategies.
It is recommended to add support for limit and stop orders.
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.