PancakeSwap
Launch App
English
English
  • Welcome to PancakeSwap
    • Product Overview
    • ✨How-to Guides
      • Get Started (BSC)
        • Create a Wallet
        • Get BEP20 Tokens
        • Using PancakeSwap without Centralized Exchanges
        • Connect Your Wallet to PancakeSwap
      • Get Started (Aptos)
        • Create a Wallet
        • Get Aptos Coins
        • CAKE Bridging Guide
        • Connect Your Wallet to PancakeSwap
        • Aptos FAQ
      • V3/V2 Migration
        • How to migrate
        • How v3 APR is calculated
        • FAQ
        • V2 Migration
          • Migrate Your Stakings
          • MasterChef v2
            • List of Farms
          • CAKE Syrup Pool
    • 🗺️Roadmap
    • veCAKE Sunset
      • Staked Cake Redemption
      • 🔷[Archive] veCAKE
        • What is veCAKE?
        • How to get veCAKE?
        • Migrate from CAKE Pool
        • veCAKE Managers
        • Bridge your veCAKE
        • Earn CAKE Weekly
          • FAQ
    • 📈Analytics (Info Page)
    • ✅Audits
    • 🤙Contact Us
      • Social Accounts
      • Telegram & Discord Communities
      • 💼Business Partnerships
        • ⛽veCAKE / Gauges
        • 🧑‍🌾Initial Farm Offerings - IFOs
        • 🥞Syrup Pools and Farms
        • 🖼️NFT Marketplace
        • ❓Commonly Asked Business Partnerships Questions
      • Ambassador Program
        • What can you do as an Ambassador?
        • Benefits of a PancakeSwap Ambassador
        • Want to be an Ambassador?
        • ❓ FAQs Page
      • General FAQ
        • I need help
        • Troubleshooting Errors
        • What is an Approval Transaction?
        • Fixing Stuck Pending Transactions on MetaMask
    • 👨‍👨‍👦About Us
      • Team
        • The Kitchen Team
        • Become a Chef
          • Brand / Graphics Designer
          • Motion / Interaction Designer
          • Social Media & Content Manager
          • Developer Relations Manager
          • Product Designer (UX/I)
          • Business Development Manager
          • Senior Backend Engineer
      • Brand & Logos
  • 👴Archive
    • 📂Legacy Products
      • 🖼️[Archived] NFT Marketplace
      • 🎮[Archived] Gaming Platform
        • 📒Brand Kit
        • 🎓Pancake Mayor
        • 🛡️Pancake Protectors
          • FAQ
      • 🍯[Archived] Pottery
        • How to Play Pottery
        • Pottery FAQ
      • 🧈[Archived] Trading Reward
        • How to Participate
          • Top Traders Campaign
          • CAKE Stakers Campaign
        • FAQ
      • 🤝[Archived] Simple Staking
        • How to start Simple Staking
        • FAQ
        • Terms & Conditions
      • 🎯[Archived] PancakeSwap Quest
        • Getting Started
        • How to Join and Complete a Quest
        • Rewards
      • 💧[Archived] Liquid Staking Integration
        • How To Liquid Stake
        • WBETH
          • WBETH FAQ
        • SnBNB
          • SnBNB FAQ
      • 💸[Archived] Options
        • Options Primer
        • CLAMM Options
        • Options FAQ
      • [Archived] CAKE Syrup Pool
        • How to use the Flexible Staking option
        • How to use the Fixed-Term Staking option
    • Old Tokenomics
      • CAKE Tokenomics v1
      • Controlling CAKE supply v1
    • How to Use Farms with BscScan
    • [Archived] Affiliate Program
      • Dashboard & Link
      • Commission Structure and Payment
      • Program Rules & Guidelines
      • Terms & Conditions
  • Trade
    • 🔄Swap
      • Token Swaps
      • How to Trade
      • Fees and Routes
      • Market Maker Integration
      • Smart Router (V2)
        • How to trade using Smart Router
    • ♾️PancakeSwap Infinity
      • Key Features
      • Hooks
        • Dynamic Fee Hook
      • Pool Types
      • Farms
    • 🎯Limit Orders and Twap
      • How to use Limit Orders
      • How to use TWAP
    • 📈Perpetual Trading
      • What is Perpetual Trading?
      • Perpetual Trading V2
        • How can I use it?
        • Dumb Mode
          • Dumb Mode Guide
        • Degen Mode
          • Degen Mode Dynamic Fee
        • MADBTCUSD
          • MADBTCUSD FAQ
        • Perpetuals V2 Glossary
        • Forex
        • Perpetual Trading FAQ
          • Arbitrum
            • ALP Syrup Pool (Arbitrum)
              • ALP Buying & Selling Fees
        • Trading Rewards Program
          • Arbitrum
        • Supported Chains, Modes & Markets
      • Perpetual Trading V1
        • Perpetuals V1 Glossary
        • How can I use it?
        • V1 Perpetual Trading FAQ
    • 🏦Stableswap
      • How to StableSwap
    • 💳Buy Crypto
    • ❓Trading FAQ
      • Swap FAQ
      • v4 FAQ
      • Limit Orders and TWAP FAQ
  • Bridge
    • 🌉Bridging
      • Between EVMs
      • Between EVM and Aptos
      • Wormhole Bridge Guide
    • ❓Bridging FAQ
      • Wormhole Bridge FAQ
  • Earn
    • 🌊Liquidity Pools
      • How to Add/Remove Liquidity
      • ⛏️Pancake Picks
      • Zap
        • Zap (V2)
    • 🚜Yield Farming
      • How to Use Farms
        • How to Use Farms (Legacy)
      • APR/ROI/IL Calculator
      • Farming on Aptos
        • FAQ
      • Crosschain Farming
        • FAQ
    • 🥩Cake Staking
      • 🍯Syrup Pools - Stake CAKE
        • Syrup Pools
    • 🛍️IFO (Initial Farm Offering)
      • How to Participate in an IFO
      • How to Participate in CrossChain IFOs
      • FAQ
      • NFT Profile System
        • How to Set Up an NFT Profile
        • Teams
      • Contract Details
    • ❓Earn FAQ
      • Cake Staking FAQ
        • Syrup Pool FAQ & Troubleshooting
  • Play
    • 🔮Prediction
      • How to Use Prediction
      • AI Prediction
      • Prediction FAQ
      • Prediction Troubleshooting
      • Prediction Mini App
    • 🎟️Lottery
      • How to Play Lottery
      • Lottery FAQ
  • ❓Play FAQ
  • Trading Tools
    • 🛡️PancakeSwap MEV Guard
    • PancakeSwap Auto Slippage
      • How to Set Slippage on PancakeSwap
    • 🔔Notifications
    • ❓Trading Tools FAQ
      • MEV Guard FAQ
  • Protocol
    • 🍰CAKE Tokenomics
    • 📔Governance
      • How to Vote
    • 💻Developers
      • Developer Docs
      • Contributing
        • Codebase Overview
Powered by GitBook
On this page
  • What is TWAP?
  • How to set up a TWAP order?

Was this helpful?

  1. Trade
  2. Limit Orders and Twap

How to use TWAP

What is TWAP?

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.

How to set up a TWAP order?

  1. Go to the Swap page and select the TWAP order option by clicking TWAP

  2. Select the “From” and “To” tokens and enter the amount you wish to trade.

  3. The UI enables both dTWAP-market orders, which execute all trades at the available market price, and dTWAP-limit orders, which only execute individual trades if they are within the price limit set by the user. In this example we chose to execute the TWAP orders at market price.

  4. Next, we specify the TWAP parameters. There are 3 main parameters that control the effectiveness of the dTWAP order:

    1. Total trades: Allows the user to specify the number of individual trades that their order will be broken into. The UI slider starts with 1 trade and allows the user to increase the amount of individual trades, or allows the user to manually input the total trades in the input field directly. Users should note that there is a certain tradeoff when specifying this parameter: more trades means smaller individual trade size, which means smaller price impact. However, more trades also means more transactions and higher overall gas fees.

    2. Trade Interval: Sets the time gap between each individual trade. The UI starts with the minimum allowed (2 mins), which leaves the minimum amount of time for the taker bidding war and block settlement between each chunk. The user can set it to be any duration desired. A trade will never execute before this time elapses after the previous trade. Again users should be mindful when setting this parameter: longer intervals would allow arbitrageurs a longer window to close any price discrepancies on the affected pools and bring the reserves back to equilibrium (on par with spot price). However, it would take longer for the order to be filled would add uncertainty to the final fill price, especially in times of heightened volatility

    3. Max Duration: The maximum time during which the total amount of all individual trades making up the full dTWAP order may be executed. After this deadline the trade expires, regardless of actual amounts swapped. Note that all chunks may not execute in limit orders, depending on whether the price stays within the set parameters. The default recommended duration is calculated by multiplying the number of intervals by the trade interval, and then doubling this amount in order to serve as a buffer to allow sufficient time for on-chain activity. (note that setting a duration that is shorter than the above default may result in a partially filled order).

As can be seen, these parameters provide significant flexibility in customizing each order, taking into account factors like market conditions, current gas fees, etc.

  1. Press “Place order”. Double check your order details, accept the disclaimer and press “Confirm order”.

  2. Once the transaction is processed, you will be able to see your order’s status in the order history section, under “Open orders”.

  3. Open orders can be canceled at any time by expanding the order and clicking the “Cancel Order” button.

Things to take into consideration

  • Orders are executed in smaller trades over a specified period of time and are subject to market conditions and other risks.

  • Your trade may be executed at a price that is significantly different from the current market price (although not worse than your limit price, if you set one), which could result in significant losses. If the available market price is worse than the limit price you have set, some of the trades of your order may not be executed, resulting in a partially filled order.

  • The trades are based on a decentralized protocol that utilizes off-chain takers which compete to fill orders. These takers are entitled to request a fee, which the protocol removes for the winning taker from the output tokens.

  • Takers may take into account gas fees for your transactions when setting their fees, which may result in fluctuations in the fee amounts.

PreviousHow to use Limit OrdersNextPerpetual Trading

Last updated 1 year ago

Was this helpful?

🎯