User flows

What happens when you create, fund, run, pause, top up, or close a DCA strategy.

The short version

A strategy is your personal on-chain account. You choose an asset, an amount, a schedule, and whether idle USDC should earn Aave yield. The account belongs to the wallet that creates it, and buys are delivered there. 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 the network the app is pointed at, and a connected wallet.

DCA Onchain is live on Base mainnet, where you can accumulate WETH and cbBTC. See Deployed contracts for the deployed addresses and canary evidence.

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:

FrequencyMinimum executions in first depositExample with 25 USDC per execution
Daily12300 USDC
Weekly10250 USDC
Biweekly8200 USDC
Monthly6150 USDC

Create a strategy

Creating a strategy is the main onboarding flow. In the current frontend, you sign three transactions:

  1. Create strategy. The factory deploys a cheap clone of UserStrategyAccount and stores your fixed settings in it.
  2. Approve USDC. You allow the new strategy account, not the factory, to pull the first deposit amount from your wallet.
  3. Deposit USDC. The strategy account pulls your USDC and becomes active.
A strategy from first deposit to the asset in your wallet Six steps. One: you create a strategy and the factory clones an account that belongs to your wallet, with its settings fixed. Two: you approve and deposit USDC into that account. Three, optional: idle USDC is supplied to Aave V3. Four: when your schedule window opens, the keeper submits one batch per asset. Five: the batch pulls each due account's amount, sets the execution fee aside in USDC, applies the oracle floor, makes one swap and splits the output by contribution. Six: your account forwards your share to your wallet, and the cycle repeats from step four. You can withdraw everything at any time, even while the protocol is paused; with yield on, Aave must be able to release your position. YOU 1. Create a strategy The factory clones an account that belongs to your wallet. Asset, amount, frequency and the yield choice are fixed from here on. YOU 2. Approve and deposit You approve your own account, not the factory, and deposit USDC. The account becomes active. OPTIONAL 3. Idle USDC earns yield With yield on, your account supplies idle USDC to Aave V3 through its own adapter. KEEPER 4. Your window opens Once your schedule window opens (00:00 UTC), the keeper finds the accounts that are due and funded and submits one batch per asset. CONTRACTS 5. One batch, one swap · Pull: each account checks it is due, then releases its scheduled amount · Fee: the execution fee is set aside in USDC · Floor: the oracle sets a minimum output the keeper cannot lower · Swap: the batch's USDC becomes one trade · Split: the output is shared by contribution YOU 6. The asset arrives Your account forwards your share to your wallet. Next window, the cycle repeats from step 4. every window ANYTIME Withdraw One call returns all your USDC, including any Aave position, and closes the strategy. No protocol pause blocks it. With yield on, Aave must be able to release your position.

The factory creates the account, but the USDC deposit goes to the user's account contract. The factory does not custody user funds. Your first deposit must meet the minimum first balance, after which the account waits for its next schedule window.

What becomes permanent

After creation, the strategy's owner, target asset, amount per execution, frequency, yield setting, and yield adapter cannot be changed. This is deliberate. It prevents an admin, executor, or later UI bug from silently changing what you signed up for.

The owner in particular is taken from the wallet that sent the creation transaction rather than from the transaction's data, so the account always belongs to the wallet that created it.

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, 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.

  1. The executor asks the factory which accounts are both due for the current window and able to fund an execution.
  2. It groups those accounts by target asset. WETH buyers are batched with WETH buyers; cbBTC buyers are batched with cbBTC buyers.
  3. It reads the live swap route and gets a Uniswap V3 QuoterV2 quote for the pooled USDC amount.
  4. It submits executeBatch with the accounts, amounts, target asset, quoted minimum output, and a unique nonce. It submits no batch total: the contract derives that from what it actually collects.
  5. 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.
  6. The BatchExecutor pulls USDC only from accounts that pass those checks.
  7. The execution fee is computed on the USDC collected and set aside, so only the net amount is swapped.
  8. The on-chain oracle computes an independent minimum output for that net amount. The swap must satisfy the stricter of the executor quote and the oracle floor.
  9. The pooled swap runs through the SwapRouter and configured adapter.
  10. The entire output is split pro-rata and each account forwards its share to its owner. The fee goes to the treasury in USDC.
ExampleIf 10 weekly WETH strategies are due and each contributes 25 USDC, the executor submits one 250 USDC WETH batch. The protocol takes 0.375 USDC as its fee and swaps 249.625 USDC. If your account contributed 25 USDC, you receive roughly 10% of the WETH bought, adjusted only for integer rounding. Rounding dust goes to the last account in the batch so nothing is stranded in the BatchExecutor. You never receive less WETH than your share of the swap, because the fee was already taken in USDC.
Many accounts, one swap, split by contribution Illustrative numbers. Account A contributes 25 USDC, B 50 and C 25, so the batch pulls 100 USDC. The execution fee, 0.15 USDC, goes to the treasury in USDC, and 99.85 USDC is swapped in one trade that returns 1,001 units of the asset. A receives 25 percent rounded down, 250 units; B receives 50 percent rounded down, 500 units; C, the last account, receives the remainder, 1,001 minus 750, which is 251 units. Nothing is left in the batch executor. Account A 25 USDC Account B 50 USDC Account C 25 USDC One batch: 100 USDC pulled · Execution fee: 0.15 USDC, to the treasury in USDC · Swapped: 99.85 USDC, in one trade · Out: 1,001 units of the asset 250 units 25% of 1,001, rounded down 500 units 50% of 1,001, rounded down 251 units Last account: the rest, 1,001 minus 750 Nothing stays in the batch executor.

A smaller batch with uneven contributions, so the rounding is visible. Illustrative numbers at the current 0.15% execution fee.

What you receive

The account tries to forward purchased assets directly to your 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.

If the token refuses to reach your strategy account at all, the batch holds your share instead of failing everyone else's buy. You claim it from the dashboard, to any address you choose.

This fallback covers a token that reverts or returns false on delivery, for example a temporarily paused token or one that restricts your address. Retrying always sends to the same owner, so it cannot work around a permanent token-level restriction on that address.

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 on any positive Aave yield not yet charged, 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

SituationWhat happens
Your account cannot fund the next buyIncluding the yield fee that buy would owe. The account auto-pauses and is removed from the active registry, either when it is pulled or when the executor checks it. You can withdraw or top up and resume.
Aave refuses a withdrawal your position coversThe account is skipped for that window without auto-pausing, and retried next window. A yield-failure event is emitted so operators can monitor it.
The executor submits you too earlyYour account reverts with TooEarly, and the batch skips or fails according to the execution path.
The executor includes you in the wrong asset batchThe batch reverts. Your account checks that the batch asset equals your own target asset.
The quote failsThe off-chain executor skips that batch instead of submitting an unprotected minimum output.
The oracle is stale or unsupportedThe on-chain batch reverts. No swap happens.
The protocol is pausedNew strategy creation or batch execution may stop, depending on what was paused. User withdrawal remains available.

Related topics