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

# setAssetStrategy

> Switch one asset to a strategy and select the protocols that go with it

Switches a single asset to a strategy and computes the protocol list that goes
with it, in one call.

<Warning title="updateUserProfile alone does not switch a strategy">
  [updateUserProfile](/docs/sdk/api/update-user-details) stores the strategy but
  does **not** compute a protocol list. Used on its own it leaves the asset with
  an empty whitelist and nothing to deploy into — with no error anywhere. Use
  this method instead whenever you change an asset's strategy.
</Warning>

This is also how you change the strategy of an **existing** account:
[depositFunds](/docs/sdk/api/deposit-funds) ignores its `strategy` argument
after the account's first deposit.

## Signature

```typescript theme={null}
setAssetStrategy(params: {
  asset: SupportedAsset;
  strategy?: Strategy;
  chains?: SupportedChainId[];
}): Promise<UpdateUserProfileResponse>
```

## Parameters

| Parameter  | Type                 | Required | Description                                                                                                                             |
| ---------- | -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`    | `SupportedAsset`     | ✅        | `"USDC"`, `"WETH"`, `"EURC"` or `"NVDAc"`                                                                                               |
| `strategy` | `Strategy`           | ❌        | Defaults to the asset's current strategy, so you can recompute a protocol list without changing it. `"conservative"` on a fresh account |
| `chains`   | `SupportedChainId[]` | ❌        | Defaults to every chain the asset exists on                                                                                             |

<Info title="chains is additive">
  Chains already enabled for the asset are kept, so this parameter cannot be used
  to **disable** a chain. Passing a chain the asset does not exist on throws
  before anything is written.
</Info>

## What it does

1. Resolves the protocols that support the asset, on the requested chains,
   under the requested strategy.
2. Drops those with no pool available for that asset and strategy.
3. Persists strategy, chains and protocols together.

## Returns

The updated profile for that asset, same shape as
[getUserDetails](/docs/sdk/api/get-user-details).

## Example

### Enable NVDAc

NVDAc lives only in protocols with delayed withdrawals, so it requires
`yieldmaxxing`. Chains default to Base, the only chain it exists on.

```typescript theme={null}
const profile = await sdk.setAssetStrategy({
  asset: "NVDAc",
  strategy: "yieldmaxxing",
});

console.log(profile.strategy);  // "yieldmaxxing"
console.log(profile.chains);    // [8453]
console.log(profile.protocols); // Ipor + Superform
```

### Recompute a protocol list without changing strategy

Useful after new pools or protocols go live.

```typescript theme={null}
await sdk.setAssetStrategy({ asset: "USDC" });
```

## Related

* [resumeAgent](/docs/sdk/api/resume-agent) — the same operation for every
  asset at once, meant for resuming after
  [pauseAgent](/docs/sdk/api/pause-agent)
* [updateUserProfile](/docs/sdk/api/update-user-details) — for the settings
  that do not affect protocol selection
