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

# Deposits

> Depositing USDC to Lighter from Ethereum mainnet

Lighter is a ZK-rollup whose bridge contract lives on **Ethereum mainnet** (chain ID `1`). The `DEPOSIT` action is therefore an EVM transaction signed by the user's L1 wallet — not a WASM-signed Lighter transaction.

### `deposit`

|                |                                                       |
| -------------- | ----------------------------------------------------- |
| **Signers**    | `USER` (L1 wallet, EVM transaction)                   |
| **Params**     | `DepositParams` — `{ chainId, tokenAddress, amount }` |
| **Steps**      | `approve` then `deposit` (two `EVM_TX` action steps)  |
| **Constraint** | `chainId` must be `1` (Ethereum mainnet)              |

## Flow

A `DEPOSIT` request returns **two `EVM_TX` action steps** in order:

1. `approve(spender, amount)` on the source USDC token contract, where `spender` is the Lighter bridge contract address.
2. `deposit(_to, _assetIndex, _routeType, _amount)` on the Lighter bridge contract, with `_assetIndex` and `_routeType` set to USDC and the perpetuals route respectively.

Both transactions are signed by the user's L1 wallet via `EVM_TX` (no WASM blob involved).

|                 |                                      |
| --------------- | ------------------------------------ |
| **Signer**      | `USER` (L1 wallet, EVM transaction)  |
| **Chain**       | Ethereum mainnet (`chainId: 1`) only |
| **Steps**       | `approve` then `deposit`             |
| **Quote asset** | USDC                                 |

## Source chains other than Ethereum

If the user holds USDC on a chain other than Ethereum mainnet, the backend rejects the `DEPOSIT` request. Bridge USDC to Ethereum first via the [LI.FI SDK](https://docs.li.fi/integrate-li.fi-js-sdk/install-li.fi-sdk) or [API](https://docs.li.fi/li.fi-api/li.fi-api), then submit the Lighter `DEPOSIT` action.

## Account creation

Lighter requires a deposit to **create an account** before an API key can be registered. On a fresh L1 address:

1. Submit a `DEPOSIT` action — this creates the on-chain Lighter account and assigns it an `account_index`.
2. Wait for the deposit to be indexed (the L1 transaction confirms, then Lighter's relayer mints the L2 account).
3. Submit `REGISTER_API_KEY` (see [Setup](/providers/lighter/setup)) — this requires an existing `account_index`, so it will fail with `AccountNotFound` if the deposit has not yet been indexed.

The SDK's `checkSetup()` will surface a "deposit first" condition for fresh addresses rather than silently reporting that setup is complete.
