TWAP
What is TWAP?
TWAP (Time-Weighted Average Price) is an order execution strategy that breaks a large order into smaller trades, executed at regular intervals over a set duration.
Instead of placing one large order that may impact price, TWAP helps smooth execution, reducing slippage and market impact.

How TWAP Works
Order Size – The user specifies the total amount to buy/sell.
Duration – The time over which the order will be executed.
Intervals – The order is split into smaller chunks, executed evenly at each interval.
Execution – Orders are placed automatically until the total size is filled.
For example: Buying 100 ETH over 1 hour with 12 intervals means the system executes ~8.33 ETH every 5 minutes.
Reduce-Only Mode
When Reduce-Only is enabled:
The TWAP will only reduce your current position.
It prevents the strategy from flipping your position (e.g., closing a long and accidentally opening a short).
If no position exists, no orders are executed.
This ensures TWAP is used strictly for scaling out, not scaling in.
Randomize Mode
When Randomize is enabled:
The system slightly varies the size and/or timing of each order.
This makes execution less predictable and harder to track.
Helps mitigate predatory algorithms or bots attempting to anticipate TWAP orders.
Example: Instead of executing exactly 10 ETH every 5 minutes, the bot may execute 8.5 ETH, then 11.2 ETH, with timing offsets of a few seconds.
Privacy TWAP
Normal TWAPs are executed fully on-chain, which makes them visible to everyone. Large players (whales) dislike this because:
Their execution path can be tracked.
They are vulnerable to frontrunning and other predatory trading behavior.
Privacy TWAP executes trades client-side, directly inside the user’s browser:
Local Execution – Orders are created and sent from your browser only.
No Visibility – Neither the trading terminal nor external observers can see or frontrun your order path.
True Privacy – Even we, as the trading platform, cannot track or manipulate your order flow.
Important Notes
Since orders run locally, if you refresh or close the terminal, the TWAP pauses.
Execution resumes only while the terminal/browser is active.
This design ensures maximum privacy and security for users executing large trades.
Last updated