Skip to main content

Dollar-Cost Averaging (DCA)

DCA lets depositors set up recurring deposits into a vault on a fixed schedule. Instead of depositing a lump sum, the depositor spreads their investment over time.

How It Works

  1. Depositor creates a DCA schedule specifying:

    • amount_per_period: how much to deposit each time
    • interval: time between deposits (minimum 1 day / 86,400 seconds)
    • max_executions: total number of deposits to make
  2. Depositor funds their escrow with enough USDC to cover the full schedule (or top up over time). This is the same escrow account used for regular deposits.

  3. Keeper executes on schedule. When next_execution timestamp is reached and the escrow has sufficient funds, the keeper calls execute_dca. This performs the same deposit flow as process_deposit_vault — oracle-priced share minting, reserve tracking, points accrual — but only pulls amount_per_period instead of the full escrow balance.

  4. Schedule completes or is cancelled. After max_executions is reached, the schedule deactivates automatically. The depositor can also cancel at any time, which closes the schedule account and returns rent. Remaining escrow funds stay in the escrow for the depositor to withdraw or use for other deposits.

DCA vs Regular Deposit

AspectRegular DepositDCA
TriggerKeeper processes full escrowKeeper processes amount_per_period
TimingOne-shotRecurring on schedule
Share pricingNAV at time of processingNAV at each execution (dollar-cost averaged)
PointsAccrued onceAccrued on each execution
EscrowSame accountSame account

Managing DCA Schedules

  • Update: change amount_per_period or interval on an active schedule
  • Cancel: deactivate and close the schedule account (rent returned to owner)
  • Multiple DCA schedules can exist per depositor per vault (distinguished by schedule_id)

Future: Yield-Bearing Escrow

Currently, DCA funds sit idle in the escrow. A planned enhancement will deposit escrow funds into a yield-bearing reserve (e.g., USDC-Kamino) so they earn yield while waiting for execution. On each DCA tick, the keeper would withdraw amount_per_period from the yield reserve instead. The vault-side deposit logic stays identical.