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

# Dynamic Integration

> Multi-chain wallet authentication with Dynamic and Pods yield strategies

## Overview

[Dynamic](https://www.dynamic.xyz) provides multi-chain wallet authentication and embedded wallets. This guide explains how to use Dynamic for user authentication and then interact with the Pods API on behalf of authenticated users.

<Card title="Official Dynamic + Pods Guide" icon="arrow-up-right-from-square" href="https://www.dynamic.xyz/docs/overview/recipes/integrations/yield/stablecoin-yield-pods">
  Complete setup instructions on Dynamic's documentation
</Card>

***

## Integration Pattern

### 1. Authenticate the User with Dynamic

Use Dynamic's SDK to authenticate the user and obtain their wallet address:

```javascript theme={null}
import { useDynamicContext } from '@dynamic-labs/sdk-react-core'

const { primaryWallet, user } = useDynamicContext()
const walletAddress = primaryWallet?.address
```

### 2. Query Yield Strategies

With the wallet address, query the Pods API for available strategies and the user's current positions:

```javascript theme={null}
// List available strategies
const { data: strategies } = await axios.get('https://api.pods.finance/strategies', {
  headers: { 'x-api-key': process.env.PODS_API_KEY }
})

// Check user positions
const { data: positions } = await axios.get(`https://api.pods.finance/wallets/${walletAddress}`, {
  headers: { 'x-api-key': process.env.PODS_API_KEY }
})
```

### 3. Execute Strategy Transactions

Fetch the bytecode and sign it using the Dynamic wallet signer. **Batch all same-chain legs into
one atomic transaction** — see [Executing Bytecode](/getting-started/executing-bytecode).

```javascript theme={null}
// Get deposit bytecode
const { data } = await axios.get(`https://api.pods.finance/strategies/${strategyId}/bytecode`, {
  params: { action: 'lend', amount: '10000000', wallet: walletAddress },
  headers: { 'x-api-key': process.env.PODS_API_KEY }
})

// EOA: EIP-7702 executeBatch (recommended) — see /examples/javascript/using-eip7702
// Embedded smart account: output=userOperation + bundler submit
// Do not: for (const tx of data.bytecode) { await signer.sendTransaction(tx) }
console.log('Legs to batch atomically:', data.bytecode.length)
```

<Note>
  The Pods API never takes custody of funds. All transactions are signed and submitted by the user's wallet through Dynamic.
</Note>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Privy Integration" icon="key" href="/external-integrations/privy-integration">
    Embedded wallet solution with social login
  </Card>

  <Card title="Fireblocks Integration" icon="vault" href="/external-integrations/fireblocks-integration">
    Enterprise-grade custody integration
  </Card>
</CardGroup>
