DCA (Dollar-Cost Averaging)
Automated recurring BTC purchases with an intelligent Mayer Multiple strategy that adjusts buy amounts based on whether BTC is historically undervalued or overvalued.Overview
Sable’s DCA contract enables on-chain recurring BTC purchases with two modes:- Standard DCA: Fixed amount per order (traditional DCA)
- Smart DCA: Mayer Multiple adjusted amounts (buy more when cheap, less when expensive)
How It Works
Create Order
User selects parameters:
- Sell token: USDC, USDT, ETH, or STRK
- Amount per order: e.g., 10 USDC
- Frequency: Daily, Weekly, Bi-weekly, or Monthly
- Number of orders: 1-365
- Strategy: Standard or Smart (Mayer Multiple)
Deposit Funds
For Standard DCA:For Smart DCA:
Smart DCA requires 1.5x deposit to cover worst-case (all orders at max 1.5x multiplier). Unused funds are refunded on completion.
Keeper Execution
Off-chain keeper bot monitors orders and triggers execution when due:
- Checks if
block.timestamp >= nextExecution - For Smart DCA, queries Pragma Oracle for Mayer Multiple
- Calculates adjusted buy amount
- Fetches AVNU swap quote
- Executes on-chain swap
- WBTC sent directly to user’s wallet
Smart DCA — Mayer Multiple Strategy
What is the Mayer Multiple?
The Mayer Multiple is the ratio of BTC’s current price to its 200-day moving average:Multiplier Table
| Mayer Multiple | Market Signal | Buy Multiplier | Example (10 USDC base) |
|---|---|---|---|
| < 0.8 | Deeply undervalued | 1.5x | 15 USDC |
| 0.8 – 1.0 | Undervalued | 1.25x | 12.50 USDC |
| 1.0 – 1.5 | Fair value | 1.0x | 10 USDC |
| 1.5 – 2.0 | Overvalued | 0.75x | 7.50 USDC |
| > 2.0 | Extremely overvalued | 0.5x | 5 USDC |
Backtested Performance
Historical backtests show Smart DCA outperforms standard DCA by 50-60% over 4-year cycles by:- Accumulating more BTC during bear markets (MM < 0.8)
- Reducing exposure during bubble periods (MM > 2.0)
1.5x Deposit Buffer Explained
Smart DCA depositsamount × orders × 1.5 upfront to cover worst-case scenario:
DCA Contract Flow
Order Creation
Standard DCA
Smart DCA
Keeper Bot Architecture
The keeper bot runs off-chain and triggers order execution:Order Execution
- Execution Steps
- Gas & Fees
- Failure Handling
When a keeper triggers execution:
- Verify Timing: Contract checks
block.timestamp >= nextExecution - Verify Funds: Ensure sufficient deposited - spent balance
- Execute Swap: Call AVNU router with provided routes
- Transfer WBTC: Send purchased WBTC directly to user
- Update State:
- Increment
executedOrders - Update
spentamount - Update
btcReceived - Set
nextExecutionto current time + frequency
- Increment
- Auto-Complete: If
executedOrders == totalOrders, mark inactive and refund remaining
Cancel Order
Users can cancel active orders anytime:- Deposited: 180 USDC
- Executed: 3/12 orders (45 USDC spent)
- Refund: 135 USDC
Supported Sell Tokens
| Token | Address | Decimals |
|---|---|---|
| USDC | 0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8 | 6 |
| USDT | 0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8 | 6 |
| ETH | 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 | 18 |
| STRK | 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d | 18 |
All tokens are swapped to WBTC via AVNU DEX aggregator, which routes through Ekubo, Jediswap, and other DEXes for best rates.
Frequency Options
| Frequency | Seconds | Description |
|---|---|---|
| Daily | 86,400 | Execute once per day |
| Weekly | 604,800 | Execute once per week |
| Bi-weekly | 1,209,600 | Execute once per 2 weeks |
| Monthly | 2,592,000 | Execute once per 30 days |
DCA Contract
Address:0x0730f5de50171590132ff9238859d7eccbfa8359393f52083b3b88b397955e56
Key Functions:
Example Order Lifecycle
- Week 1-4
- Week 5-8
- Completion
Risk Factors
Next Steps
Create Your First DCA Order
Set up automated BTC purchases
Understanding Mayer Multiple
Learn the strategy behind Smart DCA
DCA Contract Reference
Technical documentation and ABIs
Run Your Own Keeper Bot
Deploy a keeper bot for order execution