TWAP Order

Introduction to dTWAP

TWAP (Time-weighted Average Price) is a common order type used in CeFi that breaks an order into smaller trade sizes and executes them at regular intervals. The main goal of a TWAP order is to reduce the order’s price impact. It can also be useful if a user wants to implement a dollar-cost averaging strategy (DCA) and buy a certain token on a consistent schedule (i.e. once a month).

Therefore, TWAP is best used when the order size is large compared to the available liquidity, or when a user anticipates a high price volatility period with no clear up or downward trend.

THENA has integrated the dTWAP protocol, powered by Orbs, that brings this order type to DeFi in a decentralized manner. Users can use this tool to create dTWAP orders by following the directions below.

  1. Prerequisites: Ensure you have a Web3-enabled browser and sufficient balance in your wallet to cover the order amount and gas fees.

  2. Navigate to TWAP: Select ‘TWAP’ from thena.fi/swap

  3. Select Token: Choose the token pair you wish to make a swap on. As an example, we will swap from WBNB to THE.

  4. Enter Order Details:

  • Enter token swap quantity: Enter the amount of token you would like to swap. Your trade size should be at least 50 USD.

  • Limit Price: By enabling this option, you can set the highest price for trades in your order. Trades will only be executed when the limit price you set is equal or lower than spot price.

  • Trade Interval: Enter the time interval between each trade execution.

*Note that this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, so the actual time may vary.

  • Max Duration: Set the total duration over which your full order should be executed. Your order may be completed earlier than this time, partially completed, or not completed at all. This can depend on factors like the price you set, the frequency of trades, and current market conditions.

  1. Review Your Order:

  2. Approve Order: Click ‘Approve’ and confirm the transaction from your wallet.

  3. Once your transaction is approved, your TWAP order will run in the background. You can view the order history and progress on the page.

Last updated