Advanced Swap Orders
Introducing new order types not typically seen in DEXs - Leverage the power of Limit, Bracket, Stop-Limit and Stop-Loss orders to increase control and precision over your trading strategy.
Key Advantages of Advanced Swap Orders
Risk Management: Each order type helps traders define and limit their risk exposure in uncertain markets.
Automation: Going to bed or AFK? We want traders to be focused on strategy rather than execution.
Volatility Protection: Especially useful in crypto and other fast-moving markets, where prices can change rapidly.
Discipline Enforcement: Ensures traders stick to their predefined plans, avoiding impulsive decisions driven by emotions.
What Actually is an Advanced Swap Order?
An Advanced Swap Order (ASO) is in essence is just a market order that executes only when specific market conditions are met. When constrained by tight slippage tolerances, advanced order types such as Limit, Stop-Loss, Bracket, and Stop-Limit orders can all be implemented using this approach.
How to they work?
These new ASOs utilize new smart contracts and off-chain automation in order to fulfil automated swaps in an automated way.
Because of this, these smart contracts must custody users' input tokens for pending orders, ensuring that these funds are available when it is time to execute the order.
An order is considered "in range" when the current market price is either equal to or greater than the specified Take Profit Price
, or if the market price is less than or equal to the Stop Price
A new system of smart contracts permissionlessly determines if pending orders are in range or not, and will not allow orders to be filled when not in range. Additionally, the smart contracts determine that the expected amount of output tokens are received after the swap, thereby enforcing slippage requirements that the user may specify.
Once an order is in range and ready to be filled, the swap will be automatically be executed using the best route available (not limited to Uniswap), and the proceeds will be sent directly to the order recipient, there is no need to claim orders once they fill. The general flow works as follows:
When conditions associated with the order are met, then it is fillable, and our off chain automation system will fill the order
After the order is filled, the smart contracts will verify that the expected amount of output tokens are received, and then forward the proceeds directly to the order's specified
recipient
, there is no need to manually withdraw
Additionally, users retain the ability to cancel orders at any time, at which time they will receive a full refund of their input tokens held by the contract.
Slippage
Slippage is an important factor to consider when creating a Stop-Loss order. Increasing your slippage tolerance increases the likelihood that your order will be executed especially in markets that are volatile or lack sufficient liquidity. Oku allows users to define their slippage tolerance.
Bracket orders also have the ability for a separate slippage parameter to be assigned to the Take Profit Price
and Stop Price
respectively.
Triggered vs. Executed
Something to keep in mind with different order types is the difference between an order being triggered vs executed which is critical to understanding how different order types function.
Triggered: An order is triggered when the specified conditions, such as a Stop Price
or Take Profit Price
, are met. For example:
In a Stop-Limit Order, reaching the
Stop Price
triggers the creation of a Limit order.In a Bracket Order, hitting the Stop Price or
Take Profit Price
triggers execution of the respective limit order.
Executed: An order is executed when it is filled, meaning it successfully matches a buyer or seller in the market and tokens change hands. In actuality, all executions of orders via the new Advanced Swap Orders system are ultimately market orders that are executed at specific market conditions. As such, the slippage parameters are critical, as they are what effectively defines the absolute maximum or minimum effective price at which the order can be executed.
Fees
For the advanced order types described above, Oku charges a 25bps fee or 0.25% on trades. This fee is taken off the top of all successful executions in the respective tokenOut
of the order. If the order is later cancelled for any reason, the full tokenIn
of the order will be refunded and this fee will not be taken.
Additionally, there exists a flat fee 0.001
native ether to create a new order. In the event of order cancellation, this fee will not be refunded. This is to protect against denial of service attacks.
Additionally for this reason, a minimum order size of $25 (USD) is enforced at the contract level. All of these fees are subject to change.
Oku covers the gas costs associated with executing all Advanced Swap Orders.
Last updated