> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundtech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure strategy and source modes

> Choose yield sources and set target allocations.

Source modes control permitted movement. Target weights tell Ground how to rebalance the vault.

These settings are independent. A target says how much the vault should hold; a mode says whether it may move into or out of the source to reach that target.

## Prerequisites

* An active `VAULT_ID`
* Source IDs from `GET /v2/microvaults/yield-sources?chainId=11155111`
* Targets that total exactly `10000` basis points, including idle USDC

## 1. Choose source modes

| Mode                | Subscriptions | Redemptions |
| ------------------- | ------------- | ----------- |
| `active`            | Allowed       | Allowed     |
| `subscription_only` | Allowed       | Blocked     |
| `redemption_only`   | Blocked       | Allowed     |
| `disabled`          | Blocked       | Blocked     |

Changing a mode does not remove an existing position. To wind down a source, set its target to `0`, use `redemption_only` while the position exits, and disable it after the position reaches zero.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X PUT \
  "$GROUND_API/v2/microvaults/vaults/$VAULT_ID/sources/$SOURCE_ID/mode" \
  -H "$AUTH" -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" -d '{"mode":"active"}'
```

## 2. Set target allocations

This example allocates `80%` to one source and keeps `20%` in USDC.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X PUT "$GROUND_API/v2/microvaults/vaults/$VAULT_ID/strategy" \
  -H "$AUTH" -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "allocations":[{
      "sourceId":"0x1111111111111111111111111111111111111111111111111111111111111111",
      "targetBps":8000
    }],
    "idleTargetBps":2000
  }'
```

## 3. Track the rebalance

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS "$GROUND_API/v2/microvaults/vaults/$VAULT_ID/activity" -H "$AUTH" | jq
curl -sS "$GROUND_API/v2/microvaults/vaults/$VAULT_ID/sources" -H "$AUTH" | jq
```

Async sources can remain in progress until the source settles.

The strategy update and the resulting rebalance are separate states. The update confirms the new targets; the rebalance activity confirms that assets have moved toward them.

## Confirm the strategy

Confirm the intended targets and modes in the vault and source responses. The rebalance is complete when its activity is confirmed and no source movement remains in progress.
