Advanced 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.
Last updated
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.
Last updated
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: Ensure traders stick to their predefined plans, avoiding impulsive decisions driven by emotions.
Advanced Orders provide an additional layer of functionality on top of typical swaps that execute trades when specific conditions of the order are met. When combined with flexible slippage tolerances, advanced order types such as , , and empower users to capitalize on market movements while managing risk effectively.
Let's breakdown a typical user flow for Advanced Orders:
A user anticipates a move in the market and creates a order to capitalize.
In doing so, the input token for this order is custodied by a smart contract.
When conditions associated with the order are met, then it is fillable, and our off chain automation system fills the order.
After the order is filled, the smart contract verifies the expected amount of output tokens are received, and forward the proceeds directly to the order's specified recipient
with no need to manually withdraw.
The Advanced Order types combine smart contracts and off-chain automation to fulfil swaps in an automated manner. Because of this, AO smart contracts must custody users' tokens for pending orders to ensure funds are available when the order conditions are met. A new system of smart contracts permissionlessly verifies whether pending orders are in range and prevents orders from being filled when they are not. Additionally, the smart contracts ensure that the expected amount of output tokens is received after the swap, enforcing any slippage requirements specified by the user.
Once an order is in range and ready to be filled, the swap is automatically executed using the best available route (not limited to Uniswap), and the proceeds will be sent directly to the order recipient.
Users have the right to cancel orders at any time, in which case they will receive a full refund of their input tokens held by the smart contract.
Slippage is an important factor to consider when creating advanced order types. Increasing your slippage tolerance increases the likelihood that your order will be executed especially in markets that are volatile or lack sufficient liquidity.
Triggered vs. Executed
Something to keep in mind with different order types is the difference between an order being triggered vs executed. This difference is critical to grasp how each order type functions.
An order is triggered when the specified conditions, such as a Stop Price
or Take Profit
price are met. For example:
However, even if an order is triggered, execution may still fail or be impossible. This can happen if markets lack sufficient liquidity or if slippage wasn't set high enough. This distinction is crucial to understand when trading in low liquidity markets and managing expectations with Advanced Orders.
Oku charges a 25bps fee or 0.25% on Advanced Order trades. This fee is taken off the top of all successful executions in the respectivetokenOut
order. If the order is cancelled for any reason, the full tokenIn
amount will be refunded and the fee is not 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. Fee structures on Oku may be subject to change in the future.
Oku covers the gas costs associated with executing all Advanced Swap Orders.
With orders, users have the flexibility to select both upper and lower bound slippage tolerance
In a Order, reaching the Stop Price
triggers the creation of a .
In a Order, hitting the Stop Price
or Take Profit
price triggers the order to be filled if sufficient liquidity exists.