Skip to main content
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

SignersUSER (L1 wallet, EVM transaction)
ParamsDepositParams{ chainId, tokenAddress, amount }
Stepsapprove then deposit (two EVM_TX action steps)
ConstraintchainId 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).
SignerUSER (L1 wallet, EVM transaction)
ChainEthereum mainnet (chainId: 1) only
Stepsapprove then deposit
Quote assetUSDC

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 or 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) — 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.