Deposits, Transfers and Withdrawals
Universal Deposit Address (UDA) – recommended
Ethereum, Arbitrum, Base, Optimism, Polygon, BNB, HyperEVM, Monad, Robinhood, Solana, Tron, Bitcoin
USDC or ETH, perps or spot
Wallets & apps: one address per user, any chain
The first credited deposit creates the account. See Create accounts programmatically.
Deposit via Ethereum Mainnet
To deposit via Ethereum mainnet, you can use the deposit method (0x8a857083) directly. You'll need to specify the following parameters:
Payable value (
payableAmount/msg.value): the ETH amount when depositing ETH; use 0 for ERC-20 deposits. This is the transaction value, not a function argument._to: the L1 address you want to credit the deposit to_assetIndex: the asset you want to deposit. You can grab the correct asset id from the assetDetails endpoint_routeType: whether you want to deposit the asset to your perps (0), or spot account (1). Only USDC can be deposited to your perps account_amount: the amount you're depositing. it should be in line with the ERC20's decimals. E.g. 6 decimals for USDC, 18 decimals for Ether etc. 1 USDC, or equivalent, minimum.
If you're depositing assets different from ETH (e.g. USDC), make sure to approve spending for Lighter's smart contract (0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7) for that ERC20. There is a minimum of 1 USDC, and equivalent for other ERC20s, per deposit.
Example with viem, where wallet is a WalletClient connected to the user's wallet on Ethereum mainnet:
import { parseUnits, erc20Abi } from "viem";
const LIGHTER = "0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7";
const USDC = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
const amount = parseUnits("100", 6);
await wallet.writeContract({ address: USDC, abi: erc20Abi, functionName: "approve", args: [LIGHTER, amount] });
await wallet.writeContract({
address: LIGHTER,
abi: lighterAbi, // fetch from Etherscan (proxy implementation)
functionName: "deposit",
args: [userAddress, usdcAssetIndex, 0 /* perps */, amount],
});Deposit via Fun.xyz
Generate a Universal Deposit Address (UDA) for each client, for any supported chain.
Base URL:
https://bridge.lighter.xyzAuthentication: every request needs to include
x-api-keyin its header. Builders can contact us through Discord tickets via #support to request one.
For new users, depositing will automatically create an account on Lighter and assign the wallet an account_index.
Supported Assets
Ethereum
USDC, USDT, cbBTC, DAI, ETH, MATIC, POL, USDe, wETH
1
Robinhood
USDG
4663
Arbitrum
USDC, USDT, DAI, ETH, USDe, wETH
42161
Solana
USDC, USDT, SOL, TRUMP, USDe
N/A
BNB Smart Chain
USDC, USDT, BNB, BUSD, BTCB, DAI, ETH, USDe, wBNB
56
Base
USDC, USDT, cbBTC, DAI, ETH, USDe, wETH
8453
Polygon
USDC, USDT, DAI, MATIC, POL, USDC.e, wETH
137
HyperEVM
USDC, USDT, HYPE, uBTC, USDe
999
Optimism
USDC, USDT, DAI, ETH, wETH
10
Monad
USDC, MON
143
Tron
USDT
N/A
Bitcoin
BTC
N/A
Deposit Minimums
Ethereum mainnet
$5
$5
EVM-compatible chains
$5
$3
Solana
$5
$3
Tron
$5
$5
Bitcoin
$10
$10
Note that depositing slightly larger amounts than the minimums advertised above is suggested, as bridge and swap operations may incur slippage and result in a lower amount.
Create a Universal Deposit Address (UDA)
POSTrequest tohttps://bridge.lighter.xyz/v1/udaContent-Type:application/json
walletAddress
string
The client's EVM wallet, where funds will be credited
market
string
"perps" or "spot"
asset
string
"USDC" or "ETH". This is what the deposit asset gets converted to, when credited on Lighter
accountIndex
number
Optional. It can be used to target a sub-account; if you omit it, the deposit is credited to the master account index.
JSON Body example
Example Response (200)
resolved.toChainId is the destination chain ID used by the bridge. recipientAddr is the client's account index, or L1 address for a new account. Use the returned values in the quote request.
Deposit addresses are used to route and credit the amount to the client's address (returned as userId and recipientAddr). Show the address for the chain the user picks, and check blocked before displaying it. Call the bridge API server-side only: never expose the x-api-key in a client.
Generate a Quote (optional)
POSTrequesthttps://bridge.lighter.xyz/v1/uda/quoteContent-Type:application/json
fromAmountBaseUnit
string
Amount the user will send, in the source token's base units
fromChainId
string
Source Chain ID
fromTokenAddress
string
Source Token Address
recipientAddress
string
The user's wallet (equal to walletAddress)
toChainId
string
Destination Chain ID (resolved.toChainId)
toTokenAddress
string
Destination Token (resolved.toTokenAddress)
JSON Body Example
Example Response (200)
Use this to show the user an estimated amount received, fees, and arrival time before they send funds. Quotes are estimates only. The UDA generated above works without one.
Track Deposit Status
GET request to https://bridge.lighter.xyz/v1/uda/status/{walletAddress}
walletAddress is the client's wallet, the same one used to generate a UDA above, and returned as userId.
Example Response (200)
Deposits appear with status PROCESSING shortly after the user’s transaction confirms on the source chain, and move to COMPLETED once the funds are credited on Lighter, typically within a few minutes.
Errors
Example error
HTTP
errorCode
Meaning
400
InvalidParameterError
Malformed body, unsupported market/asset, bad address
403
InsufficientPermissionError
Missing/invalid API key, or wallet not generated by you
502
DependencyFailureError
Upstream temporarily unavailable, retry with backoff
Example (TypeScript)
[Legacy] Deposit USDC via other EVM-compatible chains
The following chains are supported via Circle's CCTP: Arbitrum, Base, Avalanche C-Chain, Arc and HyperEVM. Minimum deposit is 5 USDC. You can either generate an intent address via the front-end, or via API:
Available networks can be fetched, together with their Chain ID, via the deposit/networks endpoint.
Withdrawals: Secure and Fast
You can process secure withdrawals, fast withdrawals and transfers with any SDK; linked examples use the Python SDK. The TypeScript examples below use the WASM signer and sendTx helper from Signing Transactions.
Secure withdrawal
The account owner's own L1 address only
API key
Any
1 USDC equiv.
Settles via Ethereum
Fast withdrawal
Any Ethereum address
API key + L1
USDC only
4 USDC
Fast (liquidity pool)
Transfer
Another Lighter account
API key (+ L1 if another owner)
Any
1 USDC equiv.
Instant
Withdrawals and transfers have their own per-transaction-type limits; see Rate Limits.
Secure withdrawal
Funds can only go to the L1 address that owns the account, so the API key alone is enough.
The withdrawal is finalized on Ethereum. Lighter usually claims it for the user; if not, the user can call withdrawPendingBalance on the contract (see Priority Transactions). If you prefer, you can also process secure withdrawals from the contract directly, using the withdraw (0xd20191bd) method.
Transfer between Lighter accounts
Use transfers to move funds between a user's master and sub-accounts, or to another user.
Get the fee: transferFeeInfo (
GET /api/v1/transferFeeInfo?account_index=…&to_account_index=…, authenticated). The fee is charged on top of the amount and must match exactly.Sign:
If the destination belongs to a different owner (a different master account), have the owner's wallet sign
tx.messageToSignand settxInfo.L1Sig(same pattern as ChangePubKey). Transfers between the same owner's accounts need no wallet signature, even thoughmessageToSignis still returned. See When an L1 signature is required.Send with
sendTx.
Fast withdrawal (USDC)
A fast withdrawal is a transfer to Lighter's fast-withdraw pool with the destination address encoded in the memo:
fastwithdraw/info (
GET /api/v1/fastwithdraw/info?account_index=…, authenticated) →to_account_index,withdraw_limit.transferFeeInfo for that
to_account_index.Build
memo= destination address (20 bytes) + 12 zero bytes.SignTransfer(...)to the pool account, collect the L1 signature.fastwithdraw (
POST /api/v1/fastwithdraw, authenticated with theAuthorizationheader) with form fieldstx_infoandto_address.
Reference implementation: withdraw_fast.py.
History
deposit_history, withdraw_history and transfer_history return past movements. See Historical Data.
Lighter on Robinhood Chain
Deposit via Robinhood Chain
To deposit via Robinhood Chain mainnet, you can use the deposit method directly. You'll need to specify the following parameters:
_to: the L1 address you want to credit the deposit to_assetIndex: the asset you want to deposit. You can grab the correct asset id from the assetDetails endpoint_routeType: whether you want to deposit the asset to your perps (0), or spot account (1). Only USDG can be deposited to your perps account_amount: the amount you're depositing. it should be in line with the ERC20's decimals. E.g. 6 decimals for USDG, 18 decimals for Ether etc. 1 USDG, or equivalent, minimum.
If you're depositing assets different from ETH (e.g. USDG), make sure to approve spending for Lighter's smart contract (0x94bAB9693Ba2f6358507eFfcbd372b0660AFfF9d) for that ERC20. There is a minimum of 1 USDG, and equivalent for other ERC20s, per deposit.
Deposit via Robinhood Chain (intents)
An intent address is persistent, and tied to the address that generated it. It will credit USDG upon transfers, and doesn't require contract calls as the above method does. Minimum deposit is 1 USDG. You can either generate an intent address via the front-end, or via API:
Withdrawals: Secure and Fast
You can process secure withdrawals, fast withdrawals and transfers with any SDK; linked examples use the Python SDK. If you're processing a Fast Withdrawal (USDG only), or a Transfer to another address, you'll need to sign with your private key as well. If you prefer, you can process secure withdrawals from the contract directly, using the withdraw method. Transfers, secure withdrawals and fast withdrawals have a minimum of 1 USDG or equivalent.
Last updated
Was this helpful?