BTB
/

Lighter

Derivativeswebsite
Perpetuals exchange on a zk rollup. Covers the zkLighter mainnet (settles to Ethereum, USDC collateral) and the Lighter exchange on Robinhood Chain (USDG collateral). An agent deposits collateral, trades perps with a signed API key, withdraws, and can also mint or burn shares of the protocol-run LLP pool.

What you can do

depositDeposit collateral from Ethereum or Robinhood Chainapprove the Lighter contract for the token, then call deposit(_to, _assetIndex, _routeType, _amount). On Robinhood Chain, a persistent intent address credits USDG on plain transfers without a contract call. The first credited deposit creates the account.
trade-perpPlace, change or cancel a perp ordercreate an API key, sign the order with the WASM signer (SignCreateOrder), and send it with sendTx. Read market IDs and decimals from orderBookDetails on each exchange. Market IDs are not shared between mainnet and Robinhood Chain.
withdraw-secureWithdraw to the account owner's own L1 addresssign SignWithdraw with the API key (no L1 signature needed) and send it with sendTx. Settles through Ethereum. If the withdrawal is not claimed, call withdrawPendingBalance on ZkLighter.
withdraw-fastFast withdrawal to any Ethereum address (USDC on mainnet, USDG on Robinhood Chain)API key plus an L1 signature, through the fastwithdraw request. Minimum 4 USDC on mainnet and 1 USDG on Robinhood Chain. Robinhood Chain allows 20 fast withdrawals per hour.
transferMove funds between Lighter accounts or subaccountsget the fee from transferFeeInfo, then sign and send the transfer. The fee is added on top of the amount.
lp-llp-mint-sharesDeposit USDC into the LLP pool for pool sharessign TxTypeL2MintShares (type 18) with the LLP pool account index 281474976710654 as the pool, and send it with sendTx. Minted shares show up in the account endpoint. Check the price per share with publicPoolsMetadata (total asset value divided by total shares).
lp-llp-burn-sharesRedeem LLP pool shares for USDCsign TxTypeL2BurnShares (type 19) for the LLP pool account index 281474976710654 and send it with sendTx. Redemption depends on the pool's available liquidity and strategy allocation.
check-accountRead balances, positions, orders and pool sharesGET account (by index or by L1 address through accountsByL1Address), accountActiveOrders and publicPoolsMetadata on the exchange's REST base. Use the WebSocket for live updates.
Lighter on Robinhood Chain is a separate exchange. Accounts, balances, API keys, nonces and market IDs do not carry over from mainnet.
Standard-tier maker orders wait 200 ms on Robinhood Chain (no delay on mainnet post-only). Premium tiers depend on 14-day trading volume.
Liquidations and bankrupt positions are backstopped by LLP, so LLP holders absorb losses. ADL can hit winning traders when LLP cannot cover losses.
Secure withdrawals settle on Ethereum and can take time. Fast withdrawals use a liquidity pool and have their own limits.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
ZkLighter (proxy, zkLighter mainnet)exchange on ethereum0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7
write deposit(address,uint16,uint8,uint256)
Deposit collateral to Lighter. Arguments: _to (the L1 address to credit), _assetIndex (from the assetDetails endpoint), _routeType (0 for perps, 1 for spot; only USDC goes to perps), _amount in the token's decimals (minimum 1 USDC equivalent). For an ERC20, approve this contract for the amount first and send msg.value 0. For ETH, send the ETH amount as msg.value.
L1CoreMessagingbridge on ethereum0x183ef7195d443a3dA7EC1d7003BaCa1ff490757D
Lighter contract (Robinhood Chain)exchange on robinhood0x94bAB9693Ba2f6358507eFfcbd372b0660AFfF9d
write deposit(address,uint16,uint8,uint256)
Deposit USDG (or ETH or a listed tokenized asset) to Lighter on Robinhood Chain. Arguments: _to (L1 address), _assetIndex (from assetDetails on api.rh.lighter.xyz), _routeType (0 perps, 1 spot; only USDG goes to perps), _amount in token decimals (minimum 1 USDG). Approve this contract for USDG first. Signature is taken from the docs and the contract is not verified on Sourcify.