With the latest release, Kwenta introduces a new feature: Next Price orders. In short, Next Price orders allow Kwenta to offer a low fee alternative for genuine traders while avoiding frontrunning opportunities. Let’s dive into it:
First off, the most crucial part of this is defining what Frontrunning is as it relates to Synthetix. Synthetix utilizes Chainlink oracles to update prices for each Synthetic asset offered. Due to market volatility, it is possible to trade before an oracle can update its price, guaranteeing a risk-free profit for frontrunners. A risk-free profit for traders means that SNX stakers incur a direct loss every time someone successfully front-runs a price update. It’s imperative to neutralize these.
There have been many past changes made to protect against this kind of trading behavior. However, dynamic exchange fees and high bps fees have been shown to thwart frontrunners without sacrificing composability. High bps fees penalize everyone trading on Kwenta regardless of their intentions.
In order to allow funding rate arbitrage to be profitable and for fees on Kwenta to be competitive we are introducing a new order type on Kwenta Futures; Next Price Orders. A special exchange fee will be applied to this specific mechanism of non-atomic trades that will use the future (next price) update coming from the oracle.
Due to using the future, unknown price to initiate a trade, this mechanism should thwart users looking to make risk-free profits by front running (because two prices ahead, instead of one, need to be known to profitably front-run next price). This also gives Kwenta the opportunity to offer a low bps fee alternative for genuine traders using the platform. A minimum of one oracle update is required before these trades will execute and a maximum of two oracle updates before the order becomes stale and has to be canceled.
Keepers can do things like execute limit orders, liquidate under-collateralized loans, and just about anything on-chain autonomously. An automated keeper was developed to automatically execute Next Price orders when their conditions are met (enough oracle price updates have passed). Due to this development, there will be no manual intervention needed from traders on Kwenta to execute next price orders and benefit from reduced fees.
The Next-Price mechanism has 3 functions:
submitNextPriceOrder:
Stores an order to be executed at the next price update. Only one order can be stored per asset at a time. A certain amount of fees are deducted from the account on submission: the keeper and the commitment fee. A portion of the commitment fee will be refunded if the order is executed successfully. The keeper fee will be paid to the keeper executing the order. The commitment fee is a proportional fee and is equal to the exchange fee that would be charged for a regular order. The keeper fee is equal to the minimum keeper fee (5 sUSD). The purpose of the commitment fee is to make cancellations cost as much as a regular trade to prevent free optionality, which would mean that the decision to trade is taken when next price is known, which reduces its effectiveness.cancelNextPriceOrder:
a stored order can be canceled by the account itself at any time. It can also be canceled by any other account (e.g. keeper) after the confirmation window passes (the window during which the order can be executed). If an order is canceled, the keeper fee is paid to whoever submitted the cancellation transaction, and the commitment fee is paid to the fee pool.executeNextPriceOrder:
the order can be executed by the keeper during the confirmation window (initially a minimum of 1 oracle update and a maximum of 2 price rounds). If the order executes successfully, the difference between the commitment fee and the next price fee is refunded to the account. The keeper fee is paid to whoever submitted the transaction. If the confirmation window is over, or if the order cannot be executed (reverts), the order will be canceled instead and the keeper fee will be paid to the entity canceling the stale order & the commitment fee is forfeited.This mechanism allows lower exchange fees (taker and maker) for such orders, the fees will be set to the following fee schedule below. The dynamic fee will still be added according to the dynamic fee conditions during the execution round (to prevent circumventing the dynamic fee mechanism).
Traders on Kwenta will see a new addition to order types available on Kwenta. Traders can take advantage of Next Price Orders and their matching lower bps fees, by heading to Kwenta, navigating to the ‘Futures’ Tab, and connecting their wallet.
Once connected traders can select the asset they wish to trade from the Asset Selection Dropdown to be taken to the perspective markets dashboard and begin trading. Once traders deposit sUSD into the market.
In the Order Entry panel, you’ll see two types of orders: Market and Next Price. The existing Market Order will execute a trade at the current market rate (oracle price) instantly with regular exchange fees. Next Price Orders offer a substantial reduction in exchange fees by executing your order at the next, future price update.
Once you’ve toggled to Next-Price you won’t notice a huge change on the order entry panel, but rest assured as long as Next-Price is selected orders will be placed accordingly and traders can submit trades as they normally would. Total fees and the rebate for using next price are conveniently displayed below the order entry panel when Next-Price is selected.
Once submitted traders will see their pending next price order in the Open Orders tab along with its relevant information. Here traders can cancel their next price order in case they need to. At the next oracle update, an Execute button appears here where traders have the chance to manually execute their order.
However, in reality, the order will most likely be picked up within milliseconds by a Keeper, so we advise you to simply check after a few seconds if the order is executed. When the order is executed by a Keeper, it disappears from the Open Order tab and will show as usual on the Open Position tab.
You can trade with lower exchange fees on Kwenta! Head on over.
If you haven't already, join the Kwenta community on Discord.
To learn more about how you can acquire a DAO role as a developer, marketer, governance contributor, or professional trader, visit our Documentation.
To be the first to learn about new updates to Kwenta, follow us on Twitter.