TWAP vs DCA
Both turn one decision into many trades spread over time, and they answer different questions. TWAP asks how to get one order filled; DCA asks how to build a position without betting on one entry price. On a bonding curve the first answer is not what most traders expect. The curve numbers below use the live ETH curve parameters on Robinhood Chain, computed from GET /config at render time.
Updated
Side by side
| TWAP | DCA | |
|---|---|---|
| What it is | One order, cut into equal slices | A buy, repeated on a schedule |
| You decide | Total size, number of slices, interval | Amount per buy, interval, how many buys |
| Typical window | Minutes to hours | Weeks to months |
| What it manages | The cost of executing one trade | The risk of one entry price |
| Sides | Buy or sell | Buy |
| Benchmark | The time-weighted average price over the window | Your cost basis: the harmonic mean of fill prices |
- What it is
- TWAP
- One order, cut into equal slices
- DCA
- A buy, repeated on a schedule
- You decide
- TWAP
- Total size, number of slices, interval
- DCA
- Amount per buy, interval, how many buys
- Typical window
- TWAP
- Minutes to hours
- DCA
- Weeks to months
- What it manages
- TWAP
- The cost of executing one trade
- DCA
- The risk of one entry price
- Sides
- TWAP
- Buy or sell
- DCA
- Buy
- Benchmark
- TWAP
- The time-weighted average price over the window
- DCA
- Your cost basis: the harmonic mean of fill prices
One order, sliced over a window
TWAP stands for time-weighted average price: the average of a market's price sampled at equal intervals. A TWAP order tries to match that benchmark by cutting one order into equal slices and sending one per interval. It comes from equity trading desks, where a fund that needs to buy a million shares does not want to take the whole order book at once.
On an order book it works because liquidity comes back. Market makers refill the levels a slice consumed, so the next slice meets a book close to where the last one started. Ten small orders walk the book less than one large order, and they reveal less about how much is still to come.
A schedule, not an order
Dollar-cost averaging buys a fixed amount on a fixed schedule, whatever the price. It is a position-building rule rather than an execution method: there is no target size to fill, just a budget per buy and a number of buys.
Its one mathematical property comes from spending a fixed amount each time. A fixed spend buys more units when the price is low and fewer when it is high, so the average cost per unit is the harmonic mean of the fill prices, which is never above their simple average.
- Buy 1: spend $100 at $1.00
- 100 tokens
- Buy 2: spend $100 at $0.50
- 200 tokens
- Buy 3: spend $100 at $2.00
- 50 tokens
- Buy 4: spend $100 at $1.00
- 100 tokens
- Total: $400 spent
- 450 tokensaverage cost $0.889 per token
- Simple average of the four prices
- $1.125what the same four buys would cost at a fixed number of tokens each
That gap is a property of the arithmetic, not a return. In a market that mostly rises, money invested later buys in at higher prices, which is why Vanguard's 2012 study of US, UK and Australian markets found a lump sum beat a 12-month DCA about two-thirds of the time. DCA trades some expected return for not having your whole cost set by one day.
Slicing alone saves nothing
A bonding curve is not an order book: nobody refills it. Vectr's curve prices every buy with constant product over virtual reserves, and the tokens a buy receives depend only on where the curve starts and how much goes in:
tokensOut = virtualTokens - k / (virtualQuote + amountIn * (1 - 0.0097))
// Each slice starts where the last one ended, so n slices telescope into one buy:
// the total out depends on the total in, not on how it was cut.The fee is a fixed 0.97% of every amount in, so it does not change with slicing either. Take a ETH curve with today's parameters that has already raised 1 ETH, and a 0.5 ETH buy placed at once and as a TWAP of 8 slices, then the same TWAP with someone else trading 0.25 ETH halfway through:
- One buy of 0.5 ETH
- 106.43M tokensthe reference
- TWAP, 8 slices of 0.0625 ETH, nobody else trading
- 106.43M tokensidentical to the single buy, and 8 transactions of gas instead of one
- Same TWAP, another trader buys 0.25 ETH after slice 4
- 99.04M tokens-6.9% against the single buy: your last 4 slices filled above their price
- Same TWAP, a holder sells for 0.25 ETH after slice 4
- 116.13M tokens+9.1% against the single buy: the sell pushed the price back down under you
So on a curve, a TWAP is a bet on the direction of everyone else's flow during your window. If buyers keep arriving, you pay more than a single buy would have; if sellers do, you pay less. The same holds for a TWAP sell in reverse. The one thing slicing reliably changes is visibility: a single large trade shows up in the live feed as one print, while slices look like ordinary flow.
After graduation the token trades in a Uniswap V3 pool that holds one full-range position, which follows the same constant-product rule. The logic carries over: the pool is the token's only market, so no arbitrageur refills it from another venue between your slices, and any reversion has to come from other traders. TWAP earns its reputation on markets that do refill, such as order books or pools that arbitrage keeps pinned to a deeper outside price.
When each one wins
| Situation | Use | Why |
|---|---|---|
| Selling a large bag into an active market | TWAP sell | Buyers arriving between slices absorb the size, and DCA cannot sell |
| Building a position over weeks | DCA | Your cost becomes an average instead of one day's price |
| Entering while the market is running up | Single buy | Later slices would fill above the first; waiting costs you |
| A quiet curve with little other flow | Single buy | Slices fill exactly like one buy and pay gas once per slice |
| Keeping a big trade off the tape | TWAP | Slices read as ordinary flow in the feed and on the chart |
- Selling a large bag into an active market
- Use
- TWAP sell
- Why
- Buyers arriving between slices absorb the size, and DCA cannot sell
- Building a position over weeks
- Use
- DCA
- Why
- Your cost becomes an average instead of one day's price
- Entering while the market is running up
- Use
- Single buy
- Why
- Later slices would fill above the first; waiting costs you
- A quiet curve with little other flow
- Use
- Single buy
- Why
- Slices fill exactly like one buy and pay gas once per slice
- Keeping a big trade off the tape
- Use
- TWAP
- Why
- Slices read as ordinary flow in the feed and on the chart
How the two orders run
- twap
- 2–100 slices, 60 s – 30 days apartBuy or sell. Each slice is twapTotalAmount / twapSlices: the quote asset for a buy, the token for a sell.
- dca
- 1–365 buys, 60 s – 30 days apartBuy only, dcaAmountPerBuy each. The order is rejected unless your wallet already holds amount per buy x max buys.
- Both
- Slippage 0–50%, default 1%Optional expiresAt. Each fill is an ordinary curve or pool trade at the current price, bounded by your slippage.
- Timing
- Checked every 30 secondsFirst fill one interval after creation; each next fill one interval after the previous one. A failed fill reopens the order for the next check.
- Authorisation
- Once, when you create the orderFills then execute automatically: the order executor signs each one from your wallet under your spending, recipient and contract controls. Cancel any time and unfilled slices stop.
vectr agent "DCA 0.02 ETH into 0x… every 6 hours, max 20 buys"
vectr agent "TWAP sell 2,000,000 of 0x… over 2 hours in 8 slices"A TWAP buy and a DCA with the same numbers run the same fills: 8 slices of 0.0625 ETH every hour is also a DCA of 0.0625 ETH per buy, 8 buys, hourly. The differences are the bounds, the sell side and the up-front balance check. Parameters and endpoints are in the DCA and TWAP reference; price-triggered orders are in limit orders.
TWAP and DCA questions
What is the difference between TWAP and DCA?
TWAP (time-weighted average price) takes one order of a fixed size and splits it into equal slices executed at a fixed interval over a short window, usually hours. DCA (dollar-cost averaging) repeats a buy of a fixed amount on a schedule, usually for weeks or months. TWAP is an execution method for a trade you have already decided on; DCA is a way to build a position without choosing a single entry price.
Is TWAP better than DCA?
They solve different problems, so neither is better in general. Use TWAP when one order is large relative to the market and you expect other traders to keep arriving while it fills. Use DCA when you want exposure over time and do not want your cost to depend on one moment's price. Neither makes a bad asset a good one.
Does TWAP reduce price impact on a bonding curve?
Not on its own. A constant-product curve's output depends only on the total you put in, so 8 slices of 0.0625 ETH with no other trades in between buy exactly the same tokens as one 0.5 ETH buy, and pay the same 0.97% fee. Slicing only changes the result when other people trade between your slices: buyers make your later slices worse, sellers make them better.
Does DCA beat buying all at once?
Not on average in a rising market. A lump sum is exposed to the market for longer, and Vanguard's 2012 study of US, UK and Australian markets found it beat a 12-month DCA about two-thirds of the time. What DCA does guarantee is arithmetic: spending a fixed amount per buy makes your average cost the harmonic mean of the fill prices, which is never above their simple average.
Can I TWAP a sell on Vectr?
Yes. A twap order takes a side, buy or sell, and splits twapTotalAmount into twapSlices equal slices: the quote asset for a buy, the token for a sell. A dca order is buy-only.
How often do scheduled orders execute on Vectr?
The order keeper checks open orders every 30 seconds. A twap or dca order fills its first slice one interval after it is created, and each next fill is scheduled one interval after the previous one executes. A fill that fails, for example because it would exceed your slippage bound, reopens the order and is retried on the next check.