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

# Lighter

> Trade perpetuals, spot and real-world-asset perpetuals on Lighter from your own account on Ethereum: connect, fund, withdraw, and get out without us

**In short:** your own account on Ethereum is your Lighter account. A trading key is derived inside our hardware enclave from a sealed secret and registered on Lighter by your account. You sign a lock and a grant with your wallet. The agent then places orders on Lighter inside those limits. Money moves on chain, only between your own accounts. The agent cannot send it anywhere else.

Lighter runs on Lighter's mainnet with real money. Read [trading venues](https://docs.defiloops.com/venues/overview.md) first for the security model all venues share.

## Connect your account

You do this on the Lighter page in the app.

1. **Pick the account** and make the key. The enclave makes the key and shows only its public half. There is nothing to paste into Lighter.
2. **Sign the lock** with your wallet. It is recorded on MegaETH, and our fee payer sends it, so you pay no gas.
3. **Approve one registration step** in the app, after the lock reads back. Your account registers the key on Lighter. Nobody else can. This is a priority transaction on Ethereum. It is usually quick, and Lighter must include it within 14 days. The app checks again by itself.
4. **Sign a grant** for the markets you allow. See [the grant](#the-lock-and-the-grant).

The key sits in slot 200 of your Lighter account. A rotation keeps the slot and swaps the key. If Lighter shows a different key in that slot, the connection cannot finish, and the app points you to the exit kit.

## Fund it

Money moves on chain, from your account on Base or Arbitrum to the **same account on Ethereum**, then into Lighter.

1. **Bridge** USDC from Base or Arbitrum to your account on Ethereum.
2. **Deposit** into Lighter. USDC only, at least 1 USDC. You pick the perps route or the spot route. Lighter credits it after it includes the deposit.

Run them as two steps. The bridge lands first. A deposit always credits your own Lighter account and counts toward your account's daily limit for USDC, if you set one.

You can also send USDC from your wallet straight into your Lighter account from the Lighter page. That deposit does not count toward the daily limit.

There is no deposit address from Lighter, no intent address and no relay deposit. Do not send money to one.

## Withdraw

1. **Withdraw** from Lighter to your account on Ethereum. A withdrawal always pays your account, never your wallet or another address. It waits out Lighter's own delay, which was about three hours when measured.
2. Lighter may then pay it in by itself. If not, a **claim** step brings the pending USDC home.
3. **Bridge** it back to Base or Arbitrum if you want it there.

These are separate runs. Spot holdings are sold to USDC on Lighter first.

## What you can trade

| kind | what it is |
| - | - |
| **crypto perpetuals** | leveraged perps on crypto assets |
| **real-world-asset perpetuals** | commodities such as gold, FX such as EUR/USD, equities, ETFs, indices and pre-IPO names |
| **spot** | a few markets in USDC, including tokenised gold and tokenised index funds |

Ask the chat for the current list. It changes as Lighter adds and delists markets, and a delisted market is shown as inactive. Binary options are not offered.

* **Spot takes no leverage.** A perp's leverage is your choice, under your lock's ceiling.
* **No liquidation buffer.** The platform adds none. A leveraged position can be liquidated.
* **Real-world-asset markets** trade around the clock, whatever hours the underlying asset has. They carry region and securities-rule risk that a crypto perp does not.
* **"Gold" can mean three things.** The token held in your account, the spot market for that token on Lighter, or the gold perpetual. They differ in custody, leverage and risk. The agent asks which you mean before it writes anything.

## The lock and the grant

**The lock** says which **kinds** of market the venue may trade for you: crypto perps, crypto spot, real-world-asset perps and real-world-asset spot. It also sets the highest leverage. It has no cap on total size and no liquidation buffer. A market whose kind is off cannot be traded, whatever a grant says. Only you tighten or loosen it.

**The grant** names the exact markets and its limits. You sign it with your wallet. It lasts at most 90 days. The enclave checks it on every run. It can fire on a price level, or with no condition, in which case our system decides when. Time and percentage-move triggers are not offered on Lighter. You can write a strategy card that names Lighter. It drafts the grant, and you sign it. Running the card needs a verified Lighter connection and USDC on Lighter.

> [!WARNING]
>
> **Revoking a grant stops our relay. It does not cancel your signature.** A signed grant that has not expired stays valid. The hard stop is replacing the key with the exit kit, or tightening the kinds in your lock.

## What is live and what is not

Live:

* connecting, locking, registering and arming a grant
* the on-chain deposit and claim steps, and the bridge to and from Ethereum
* cancel, close and withdraw from your own wallet with the exit kit
* market prices from our data feeds, always shown with their age

Not live yet:

* **Take-profit and stop-loss legs** on a card. They are not offered for Lighter.
* **Your Lighter balance and positions in the app.** Read them on Lighter's own site.
* **Time and percentage-move grants.**

## Taking control back

The **exit kit** is a page in the app at `/venues/lighter/exit`. It builds the Ethereum calls you send from your own wallet through your account. It calls none of our services and reads none of our settings, so it works with every one of our servers down.

1. **Replace the trading key** with a key nobody holds. The agent is cut off.
2. **Cancel all orders.**
3. **Close a position** with a reduce-only order.
4. **Withdraw** to your account.
5. **Claim** the USDC once Lighter has paid it.

Steps 1 to 4 are priority requests on Ethereum. Lighter must include each within 14 days. If it does not, anyone can start Lighter's desert mode, and you exit with proofs. You pay Ethereum gas for each step.

Cancels, closes and withdrawals need no grant and no lock. They are always allowed on a registered connection.

## What a breach on our side could do

A bad enclave build would act differently on Lighter than on the other venues, so it gets its own section.

* **A bad build can move up to your account's daily limit for USDC, or all of it if you set none,** into your own Lighter account. It can then trade that money badly, and lose all of it.
* **It can send money nowhere else.** Withdrawals pay your account. Deposits credit your account. A key the enclave did not make cannot be registered.
* **The lock bounds what the enclave signs on Lighter.** It does not bound deposits into Lighter. Your account's daily limit does, if you set one.
* **Our servers alone** can delay or drop requests and fire a no-condition grant at a bad time. They cannot sign.

To shrink the exposure, set a low daily limit for USDC on your account, and keep only what you will trade on Lighter.

## Under the hood

*For readers who want the mechanism.*

* The key is derived inside the enclave from a sealed seed, so it never exists outside it. The enclave issues a receipt for the key. The registration step on Ethereum accepts only a key with that receipt, and only after your lock reads back.
* The lock is a contract on MegaETH. There is none on Ethereum. The enclave refuses any other lock network.
* The on-chain Lighter operations are deposit, register and claim, all on Ethereum, through one approved operation. The deposit target is forced to your account.
* Orders, cancels, leverage and the secure withdraw are signed by the key inside the enclave and sent to Lighter. The enclave reads the lock itself.
* Prices come from the feed runtime, not from Lighter at the moment you ask. See [data streams](https://docs.defiloops.com/data/streams.md).


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