Skip to main content

Overview

Auto-deployment is the process by which Yield Router moves idle capital to yield-generating protocols. This happens automatically, requiring no user action.

Deployment Flow

Step 1: Idle Detection

Capital is considered idle when:
  • Lend order placed but not matched
  • Vault has excess cash buffer
  • Position matured, awaiting re-deployment
  • Order cancelled, funds pending return

Step 2: Delay Period

Capital waits in holding before deployment:
ScenarioDelayReason
New lend order5 minutesAllow time for quick matches
Vault buffer1 hourAbsorb normal withdrawal flow
Post-maturity5 minutesAllow for auto-rollover
Why the delay? Deploying and recalling has overhead. Brief delays prevent unnecessary churn for capital that matches quickly.

Step 3: Protocol Selection

Yield Router selects the optimal protocol:
Available Protocols:
├── Aave V3:     3.5% APY, $50M available
├── Compound V3: 3.2% APY, $30M available
├── DSR:         4.0% APY, $100M available
└── Spark:       3.8% APY, $25M available

Selection Logic:
1. Filter: All meet liquidity requirements ✓
2. Filter: All meet audit requirements ✓
3. Sort by yield: DSR (4.0%) > Spark (3.8%) > Aave (3.5%) > Compound (3.2%)
4. Select: DSR (highest yield)

Result: Deploy to DSR at 4.0% APY

Step 4: Deployment Execution

Capital is deposited to the selected protocol:
// Simplified deployment flow
async function deployIdleCapital(amount: bigint, user: address) {
  // Select best protocol
  const protocol = await yieldRouter.selectProtocol(amount);

  // Deposit to protocol
  const receipt = await protocol.deposit(amount);

  // Track deployment
  await yieldRouter.recordDeployment({
    user,
    amount,
    protocol: protocol.address,
    receipt
  });
}

Protocol Selection Algorithm

Scoring Factors

FactorWeightDescription
Current APY50%Higher yield preferred
Available Liquidity25%Must support instant recall
Protocol Health15%Utilization, reserves
Diversification10%Avoid over-concentration

Example Scoring

Deploying: $100,000 USDC

Protocol Scores:
┌──────────┬───────┬───────────┬────────┬───────┬─────────┐
│ Protocol │ APY   │ Liquidity │ Health │ Divers│ TOTAL   │
├──────────┼───────┼───────────┼────────┼───────┼─────────┤
│ DSR      │ 50    │ 25        │ 15     │ 8     │ 98      │
│ Aave     │ 43    │ 25        │ 14     │ 10    │ 92      │
│ Spark    │ 47    │ 22        │ 13     │ 6     │ 88      │
│ Compound │ 40    │ 23        │ 12     │ 10    │ 85      │
└──────────┴───────┴───────────┴────────┴───────┴─────────┘

Winner: DSR (score 98)

Diversification Rules

To avoid concentration risk:
RuleLimit
Max single protocol60% of user’s idle capital
Max protocol utilizationNo deployment if >90% utilized
Min protocols for large amounts>$500k splits across 2+

Deployment Monitoring

Real-Time Tracking

Dashboard shows deployment status:
┌─────────────────────────────────────────────────────────┐
│                 Yield Router Status                     │
├─────────────────────────────────────────────────────────┤
│ Idle Capital: $50,000                                   │
│                                                         │
│ Deployed:                                               │
│   DSR:        $30,000 (60%) @ 4.0% APY                 │
│   Aave:       $20,000 (40%) @ 3.5% APY                 │
│                                                         │
│ Blended Yield: 3.8% APY                                │
│ Daily Earnings: ~$5.21                                  │
│ Total Earned: $127.50                                   │
│                                                         │
│ Status: ● Active                                        │
└─────────────────────────────────────────────────────────┘

Deployment Events

Track all deployment activity:
TimestampActionAmountProtocolAPY
Mar 15 14:32Deploy$25,000DSR4.0%
Mar 15 09:15Recall$10,000Aave3.5%
Mar 14 16:45Deploy$10,000Aave3.5%
Mar 14 11:20Deploy$15,000DSR4.0%

Yield Accrual

How Yield Accumulates

Yield accrues continuously:
Time: T+0 (deployment)
  Principal: $10,000
  Protocol: DSR @ 4.0% APY

Time: T+1 day
  Value: $10,001.10 (daily yield)

Time: T+7 days
  Value: $10,007.67 (week of yield)

Time: T+30 days
  Value: $10,032.88 (month of yield)

Claiming Yield

Yield is automatically claimed when:
  • Capital is recalled for order matching
  • You manually withdraw from order book
  • Position matures
No separate claim action needed.

Gas Optimization

Batch Deployments

Multiple users’ capital batched together:
Individual Deployments:
  User A: $10,000 → Aave (1 tx)
  User B: $15,000 → Aave (1 tx)
  User C: $25,000 → Aave (1 tx)
  Total: 3 transactions

Batched Deployment:
  Users A+B+C: $50,000 → Aave (1 tx)
  Total: 1 transaction, 3x gas savings

Timing Optimization

Deployments scheduled during low-gas periods when possible:
  • Priority: Order matching always takes precedence
  • Flexibility: Deployment timing flexible within delay window
  • Monitoring: Gas price checked before deployment

Edge Cases

Protocol Rate Changes

If a protocol’s rate drops significantly:
  1. Monitor detects rate change
  2. If better option available, rebalance triggered
  3. Capital moved to higher-yield protocol
  4. Rebalancing cost weighed against yield improvement

Protocol Incidents

If a deployed protocol has an incident:
  1. Immediate pause of new deployments
  2. Recall of existing capital (if possible)
  3. Fallback to remaining protocols
  4. User notification

Insufficient Liquidity

If deployment amount exceeds protocol capacity:
  1. Deploy maximum available
  2. Remainder stays in holding or splits to other protocol
  3. Continue monitoring for capacity

FAQs

Yes. Disable Yield Router in your settings. Your capital will remain idle in the order book earning 0%.
Individual users use protocol defaults optimized for safety and yield. Vault curators can customize protocol selection.
Yes, absolutely. Deployed capital is recalled instantly when your order matches. The deployment is transparent to the matching process.
Only when yield differential justifies the cost (typically >50bps difference sustained for 24+ hours).

Capital Recall

Learn how capital is instantly recalled for order matching