Docs DCA
DCA
Start a DCA, follow its buys in Orders, and pause or close it.
A DCA buys one token with another from your wallet, in equal parts on a schedule. Each DCA you start is one order, and each buy lands in your wallet.
On the swap app, press DCA at the top of the card, or open dex.carbium.io/dca. The "How it works" button at the top of the card plays a short figure of how an order runs.
Start a DCA
- Press Connect Wallet and connect your wallet.
- Pick the token you pay with under From and the token you buy under To. The picker lists your wallet's tokens first and searches by name, symbol or mint address.
- Enter the amount. The Total and Per buy switch sets how it is read: the whole schedule, or one buy. HALF and MAX fill it from your balance. They leave room for the fee and, when you pay with SOL, for the SOL a start takes.
- Set how often under Every, with its unit beside it, and how many buys under Over.
- Set a max price, or leave the field empty for none.
- Check the rows under the button: Price now, Per buy, Fee, Total and Last buy. Total is what leaves your wallet in the token you pay with: the schedule plus the fee. Last buy is the time of the final buy if every buy runs on time.
- Press Start DCA and confirm in your wallet.
If something blocks the start, the button names it. Where one value would clear it, the card shows that value to press.
Max price
The max price is in the token you pay with, per one token you buy.
- With none, each buy runs at the price of its moment, inside your slippage setting.
- With one, no buy runs above the max price the order holds, which is rounded and can be up to 1% above the one you entered.
- The percent buttons beside the Max price label set a max price that far above Price now. Press the same button again to remove it.
- For some pairs an order can hold only certain prices. The button then names the closest one, and the card shows it to press.
Settings
The gear at the top of the card opens the settings.
- Slippage applies to every buy. It limits how far a buy may land from the price quoted for it.
- Start sets the time of the first buy. Left empty, the first buy is due as soon as the order starts. Later buys follow one interval apart.
What you sign and where your funds are
- Starting is one transaction that you sign. It moves the whole amount from your wallet into an on-chain escrow that belongs to that order alone.
- The program gives no Carbium key a way to take funds out of the escrow. Only your wallet can pause, resume or close the order. Carbium holds the key that can upgrade the program: see sections 7 and 16 of the Risk Disclosures, https://dex.carbium.io/risk
- Carbium sends each buy when it is due. It can only send a due buy of the size you set, inside your slippage setting and at or under your max price.
- The tokens from each buy go straight to your wallet in the same transaction. Buys need no signature from you.
- Before your wallet is asked, the card checks the transaction against what you entered. If it differs, the card says "Not signed" with the reason, and your wallet is not asked.
- For a token other than SOL, keep your wallet's token account for the bought token open. If it is closed, buys stop until it exists again.
- If Carbium's service is not running, no buys run and your funds stay in the escrow.
When a buy cannot run
The order shows Waiting. The tooltip on its state gives the reason:
- The price is over your max price. The buy is tried again one interval later, even if the price falls back sooner.
- Carbium cannot run buys right now. The buy runs as soon as it can.
- The network did not answer. The buy is tried again.
- Your token account for the bought token is missing. Buys wait until it exists.
A buy that waits is not made up later in a burst, so an order can end later than the Last buy time shown when you started it. It does not finish while the price stays above your max price.
Orders
Press Orders at the top of the card to see your orders. The number beside it counts them. Running orders come first, finished ones last. A closed order leaves the list and shows under History.
Each row shows:
- The pair and the order's state.
- A row of squares, full for buys done and half full where the next buy is, with buys done out of the total beside it.
- Spent: what was spent out of the whole amount.
- Bought: what was bought.
- Price: how the price stands against your max price. It reads the percent under it, "Over max price", your max price alone, or "No max price".
Press a row for its details: Buys, Next buy, Per buy, Spent, Bought, Avg price, Max price, Slippage, the order's address, the transaction that opened it, and each buy with a link to Solscan. A buy marked Missed landed and did not pass its checks.
| State | What it means | Buttons |
|---|---|---|
| Active | The next buy is ahead. The details show the time to it. | Pause, Close |
| Waiting | A buy is due and has not run. It is tried again. | Pause, Close |
| Paused | No buys run until you resume. | Resume, Close |
| Not served | The order does not fit Carbium's current limits, or the token you pay with cannot be priced right now. It gets no buys until it fits again or you close it. | Pause, Close |
| Empty | Nothing is left to buy with, or the order stopped before its last buy. | Close |
| Finished | Every buy has run. | Close |
A Not served order whose tooltip reads "Another app runs its buys" has Resume in place of Pause. Resume hands its buys to Carbium.
History
Press History, beside Open, to see the orders that ended, newest first.
Each row shows the pair, how it ended and the day it closed, then the buys done, what it spent for what it bought, and a link to its closing transaction on Solscan.
| Ending | What it means |
|---|---|
| Finished | Every buy ran, and the order was closed. |
| Closed | The order was closed before its last buy. |
Press a row for its details: the same figures as an open order, when it ended, and the transactions that opened and closed it. A past order has no buttons.
Pause, Resume and Close
Each is a transaction that you sign. While your wallet asks, the order's state reads "Confirm in wallet". If the action does not go through, the state reads "Not paused", "Not resumed" or "Not closed", and a message gives the reason.
- Pause stops the buys until you press Resume. Buys missed while paused are not made up.
- Resume works only if the order still fits the current limits, such as the most orders one wallet can run.
- Close ends the order, in any state. The card asks first. Closing sends what the order has not spent and its SOL deposit back to your wallet. Tokens already bought are in your wallet by then. Fees already paid are not refunded.
If closing would pay SOL from your wallet to Carbium for route accounts that stay open, the card asks first and shows the amount.
Fees
- Opening fee: a fee on the whole amount you schedule, paid in the token you pay with, in the same transaction and on top of the schedule. The Fee row shows its rate before you sign, and the Total row includes the fee. It is not refunded if you close early.
- Router fee: each buy is a swap through Carbium's router and pays the router fee out of that buy, as a swap does. See Fees.
- Network fees: you pay the network fee of each transaction you sign. Carbium pays the network fee of every buy.
Starting also takes some SOL:
| SOL for | Does it come back? |
|---|---|
| A deposit for the order's accounts | Yes, when you close. |
| The rent of your own token account for the bought token, when your wallet has none. Not needed when you buy SOL | That account stays yours. |
| Creating Carbium's fee account for the token you pay with, when it does not exist yet | No. |
| Each route account the order needs, when the route passes through another token | Closing closes the empty ones, and their SOL comes back to you. |
Tokens you cannot use
A DCA takes classic SPL tokens, Token-2022 tokens, and SOL as either token. The two tokens must differ.
The button reads "This token cannot be used" for a Token-2022 token that:
- charges a transfer fee
- runs a transfer hook
- cannot be transferred
- starts its new accounts frozen
- is paused
- carries an extension the DCA does not know
The warning mark beside the token says which.
Other messages that stop a start:
| Message | Meaning |
|---|---|
| No route for this pair | Carbium's router has no route for the pair at your amount. |
| This token cannot be priced | The token you pay with cannot be valued. |
| The route for this pair cannot be used yet | The route passes through a Token-2022 token and no direct route exists. |
Your own Token-2022 token account can also stop a start when it blocks transfers by programs, requires a memo, or takes confidential transfers only.
A warning mark can also sit beside a token you can use: one that is not on the known list, or whose issuer can freeze, move, burn or pause it.
To run DCAs from your own app or agent, see the DCA API.