User flows
What happens when you create, fund, run, pause, top up, or close a DCA strategy.
A strategy is your personal on-chain account. You choose an asset, an amount, a schedule, a destination wallet, and whether idle USDC should earn Aave yield. The settings are locked when the account is created. You then fund that account with USDC. Automation later triggers scheduled buys, but only you can withdraw your remaining USDC or claim pending output.
Before you start
You need USDC on Base and a wallet connected to the app. The app currently targets Base mainnet by default. The supported accumulation assets on Base are WETH, wstETH, cbBTC, and cbETH.
The protocol enforces a minimum amount per execution and a minimum first deposit. The default per-execution minimum is 5 USDC. The first deposit must fund several future executions so a new strategy is not immediately underfunded:
| Frequency | Minimum executions in first deposit | Example with 25 USDC per execution |
|---|---|---|
| Daily | 10 | 250 USDC |
| Weekly | 8 | 200 USDC |
| Biweekly | 6 | 150 USDC |
| Monthly | 3 | 75 USDC |
Create a strategy
Creating a strategy is the main onboarding flow. In the current frontend, you sign three transactions:
- Create strategy. The factory deploys a cheap clone of
UserStrategyAccountand stores your fixed settings in it. - Approve USDC. You allow the new strategy account, not the factory, to pull the first deposit amount from your wallet.
- Deposit USDC. The strategy account pulls your USDC and becomes active.
1. User chooses settings. 2. DCAFactory creates a UserStrategyAccount. 3. User approves USDC to that account. 4. User deposits the minimum first balance. 5. The account registers as active and waits for its next schedule window.
The factory creates the account, but the USDC deposit goes to the user's account contract. The factory does not custody user funds.
What becomes permanent
After creation, the strategy's target asset, amount per execution, frequency, destination wallet, yield setting, yield adapter, and referrer cannot be changed. This is deliberate. It prevents an admin, executor, or later UI bug from silently changing what you signed up for.
If you want different settings, withdraw and create a new strategy. Withdrawal closes the old one permanently.
Deposit more USDC
You can top up an active strategy from the dashboard. A top-up is two transactions: approve USDC to the strategy account, then deposit. Depositing more USDC does not change the schedule, asset, destination, or per-execution amount.
If the strategy was manually paused, a deposit does not auto-resume it. You must explicitly press resume. This avoids a top-up unexpectedly reactivating a strategy you meant to keep paused.
What happens on execution day
Execution is automated off-chain and validated on-chain. The executor does not hold special custody over your account. It can only ask the BatchExecutor to run a scheduled buy.
- The executor reads the factory's active registry and asks which accounts are due for the current schedule window.
- It groups due accounts by target asset. WETH buyers are batched with WETH buyers; cbBTC buyers are batched with cbBTC buyers.
- It reads the live swap route and gets a Uniswap V3 QuoterV2 quote for the pooled USDC amount.
- It submits
executeBatchwith the accounts, amounts, target asset, total USDC, quoted minimum output, and a unique nonce. - Each account independently checks that it is due, that the amount equals its exact per-execution amount, and that the batch target asset matches its own target.
- The BatchExecutor pulls USDC only from accounts that pass those checks.
- The on-chain oracle computes an independent minimum output. The swap must satisfy the stricter of the executor quote and the oracle floor.
- The pooled swap runs through the SwapRouter and configured adapter.
- The output is split pro-rata, fees are paid, and each account forwards its share to its destination wallet.
What you receive
The account tries to forward purchased assets directly to your destination wallet. If that transfer fails, the tokens are not lost. They remain in your strategy account under pendingWithdrawals, and the dashboard shows a claim action.
This fallback mainly protects users whose destination wallet is a smart contract wallet that rejects or mishandles a token transfer.
Pause and resume
You can pause your own strategy. Pausing removes it from the active registry, so the executor should no longer include it in future batches. Your funds stay in the account, and you can withdraw at any time.
Resuming re-registers the strategy and anchors the next execution to the next schedule window. It does not run an immediate catch-up buy for missed windows.
Withdraw and close
Withdraw is a full exit. It pulls back any idle USDC, withdraws any Aave position if yield is enabled, pays the yield fee only on positive Aave yield, sends the remaining USDC to the strategy owner, removes the account from the registry, and marks the strategy closed.
A closed strategy cannot be reactivated or redeposited into. This avoids stale or paused strategies reappearing in automation.
Common edge cases
| Situation | What happens |
|---|---|
| Your account has too little USDC for the next buy | The account returns 0, auto-pauses, and is removed from the active registry. You can withdraw or top up and resume. |
| Aave withdrawal fails during a batch | The account is skipped for that window without auto-pausing. A yield-failure event is emitted so operators can monitor it. |
| The executor submits you too early | Your account reverts with TooEarly, and the batch skips or fails according to the execution path. |
| The executor includes you in the wrong asset batch | The batch reverts. Your account checks that the batch asset equals your own target asset. |
| The quote fails | The off-chain executor skips that batch instead of submitting an unprotected minimum output. |
| The oracle is stale or unsupported | The on-chain batch reverts. No swap happens. |
| The protocol is paused | New strategy creation or batch execution may stop, depending on what was paused. User withdrawal remains available. |
Related topics
- Architecture explains the components behind these flows.
- Trust & failures explains what is decentralized, what is centralized, and what can fail.
- Security & controls explains the guarantees enforced by the contracts.