> ## 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.

# sendSwapDeposit

> Swap or bridge another token into a Zyfai collateral, then register the deposit.

Spend a token that is not already the destination collateral on the deposit chain. The execution API quotes Relay with the user's Safe as the recipient. The connected wallet signs the steps. Relay delivers the collateral. This method waits for that transfer and registers it with `logDeposit`.

[`sendDeposit`](/docs/sdk/api/send-deposit) calls this when `spendToken` is not the destination collateral. Call `sendSwapDeposit` when the integration already has the origin token contract, the origin chain, and the collateral to receive.

Credit uses the verified collateral transfer into the Safe. A Relay refund or failure throws and does not register a deposit.

Same-chain native ETH into WETH is rejected. That pair wraps in the wallet via [`sendDeposit`](/docs/sdk/api/send-deposit).

To review the quote without signing, call `quoteSwapDeposit` or `quoteDeposit`. Pass the returned `orderId` back to `sendSwapDeposit` to sign that order.

Origin chains other than Ethereum, Base, and Arbitrum need an EIP-1193 wallet that can sign on the origin chain. A private-key signer can spend from Ethereum, Base, and Arbitrum.

## Signature

```typescript theme={null}
sendSwapDeposit({
  userAddress: string;
  originChainId: number;
  originCurrency: string; // token contract, or the zero address for native ETH
  originAmount: string;   // least units of the origin token
  destinationChainId: SupportedChainId;
  destinationAsset: string;
  strategy?: Strategy;
  orderId?: string;
  slippageBps?: number; // default 200, max 500; ignored when orderId is set
}): Promise<DepositResponse>
```

`destinationAsset` is the collateral Relay should deliver, for example `USDC`, `WETH`, `EURC`, or `cbBTC`. The server resolves the contract. A missing route is an error.

`slippageBps` is the max slippage tolerance in basis points. Omit it to use the server default of 200. The maximum is 500. It is stored when the funding order is created. Passing `orderId` signs that stored order and ignores a new `slippageBps`.

## Example

```typescript theme={null}
await sdk.connectAccount(walletProvider);

const sent = await sdk.sendSwapDeposit({
  userAddress,
  originChainId: 42161,
  originCurrency: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // Arbitrum USDC
  originAmount: "10000000",
  destinationChainId: 8453,
  destinationAsset: "WETH",
  slippageBps: 200,
});

await sdk.waitForDepositPosition(sent.registration.id, 8453);
```

`sent.route` is `"swap"`. `sent.txHash` is the collateral transfer into the Safe, not the origin transaction. `sent.orderId` is the funding order. `getSwapDeposit(orderId)` returns that order, including `depositId` once registration exists.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.