Is a Trade-Only API Key Safe? One Moved $10.4M on Lighter

Is a trade-only API key safe? It can't send money to a stranger's wallet, yet on 16 November one moved $10.4M on Lighter into a pool whose shares an attacker held.

Funk D. Vale30 Nov 2026 13 min30 XP
Tired eyes? Hit play.
Is a Trade-Only API Key Safe? One Moved $10.4M on Lighter
TL;DR
  • A trade-only API key blocks withdrawals to other people's wallets, but it can still sign trades, leverage, transfers between accounts the venue counts as yours and router swaps, and each of those can pay a counterparty.
  • A withdrawal lock checks where money is addressed, not who ends up with it: on 16 November 2026 a leaked Lighter key moved a trader's funds into a pool whose shares the attacker held, and 10,393,056.79 USDC then left through a withdrawal the rules allowed.
  • For every action a key can sign, ask who sets the price and who is on the other side, and give tools that only watch a read-only token with an expiry that you revoke when the tool is done, because read-only access still shows what you hold.

A key that can't withdraw to anyone else can still hand your money to a stranger. On the morning of 16 November, one trader's API key did just that on Lighter, a crypto futures exchange. It could only withdraw to one wallet, the trader's own. Someone holding it poured the trader's funds into a pool whose shares sat in another account. Just after ten UTC, 10,393,056.79 USDC left Lighter for the attacker. The withdrawal rule held at every step.

By the time anyone asked for a withdrawal, the money was already someone else's.

Maybe a bot wants a trade-only API key from you this week. Or a tax tool has held one since spring, and you no longer remember which boxes you ticked. Lilith, once a head of cybersecurity and now an artist, audits a credential by listing everything it may do. Lighter's permission table is printed out on the desk, and your exchange's API page is on your screen. "Read me what yours can do," she says.

What else will a trade-only API key sign?

You read it off the screen: reading, spot trading, futures. The withdrawal box is empty. You made sure of that when you created the key, because every guide said to. Lighter's API key documentation has a longer list. Its "Can do" row lists "Trade, cancel, modify, leverage/margin, sub-accounts, secure withdrawals, same-owner transfers, auth-gated REST and WebSocket reads". The row below, "Cannot do alone", holds transfers to another owner, fast withdrawals and approving an integrator that charges fees, and those require the owner's wallet to sign as well.

Withdrawals a key signs alone "can only go back to the L1 address that created the account", the docs explain. That is the Ethereum wallet the account was opened with. Beside yours, Lighter's key looks just as tame. Nothing on either list can send a dollar to a stranger's wallet.

"Now read each line as something a stranger could sign for you," Lilith says.

Seen that way, each line has someone else in it. Every trade has a price the other side helps set, and a transfer goes wherever the exchange decides is yours. Leverage sets how deep a loss can go. None of those is a withdrawal. So none of them ever meets the one check your empty box performs: where is the money addressed?

Lighter's post-mortem of the drain agrees that "an API key can't withdraw funds to anyone else's wallet". Two sentences later comes the line no settings page prints: "But a key that can trade can still lose you money if someone else holds it".

A pool that counted as the trader's own account

You stop at "same-owner transfers". Moving money between your own accounts sounds like the safest thing a key can do, and you say so.

"It is, as long as you and the exchange agree on what your own account is," Lilith says.

The key got loose first, through code Lighter didn't write. The trader's accounts signed with software other than Lighter's official SDKs, and it reused nonces, the one-off random numbers each signature needs. Signatures on Lighter were public. Two made by one key with the same nonce give that key away to anyone who compares them. The attacker "needed no access to the accounts or to Lighter's systems", the exchange wrote.

What the attacker did with the key never needed a withdrawal to anyone else. Researchers quoted by crypto.news say the attacker first closed the trader's positions and turned the holdings into USDC. That is plain trading, the first word on Lighter's list. Then the attacker used a rule the post-mortem describes: an API key "can send funds to its own account's sub-accounts, and a public pool the account creates counts as one".

So the attacker created a public pool from the trader's account. A separate account it controlled minted the pool's shares, and the researchers say about $10,000 bought roughly 99.99% of them. Lighter says the trader's USDC then went into the pool "increasing NAV without minting pool shares", in batches of about $1 million by the researchers' count. A pool's shares divide whatever the pool holds. Every dollar that arrived without new shares raised the value of the ones already out there, and nearly all of those belonged to the attacker, who redeemed them and withdrew.

The chain records the last step. At 10:11 UTC, the attacker's wallet called Lighter's withdrawal function on Ethereum and collected the 10,393,056.79 USDC. It was a withdrawal to an account owner's own wallet, just as the rule allows, from the account that held the pool shares. A second attempt went worse for the attacker. Lighter's Guardian contract paused withdrawals, and its Security Council sent about 5 million USDC back to the trader.

So the withdrawal rule guarded the one step it watched. The money had moved two steps earlier. "Your own account" isn't a fact about you, it's a category in the exchange's rules. That morning, a pool whose shares someone else owned fit inside it.

Lighter has since changed the rule. Moving funds into a public pool now takes a wallet signature, "so an API key alone can't do this", and API key signatures are no longer public.

The Safe was the beneficiary and got nothing

A multisig looks like the cure, and you offer it. Money that needs two of four owners to sign shouldn't move on one stolen key. Yet that same morning, about ninety minutes after the Lighter withdrawal, a multisig lost about $6 million to a single key.

The wallet was a Safe, a smart-contract wallet that needed two of its four owners to sign, and the owners had also installed Zodiac's Roles module. That permission layer lets an assigned address carry out set tasks without collecting the owners' signatures. At 11:35 UTC, one role member sent it a single batch.

The batch first pulled 4.39 million USDC from a Morpho vault. It gave ParaSwap's swap router an unlimited allowance to spend that USDC, one of the token approvals wallets sign every day. Then it swapped the USDC for USDC, and a second swap did the same with 1.72 million syrupUSDC, a yield-bearing dollar token.

Both swaps named the Safe as beneficiary, so the dollars looked to be coming home. But the executor, the contract that takes the tokens in and is trusted to deliver what comes out, was an address the attacker controlled. The Safe's minimum back was one unit, a millionth of a dollar. The tokens went to the executor. ParaSwap's router paid the Safe zero USDC on each swap.

Zodiac, which makes the module, said on X that it "found no contract vulnerability". In its words, "a role member key, probably compromised, sent a transaction that a custom policy allowed but likely never intended". Safe said the module sat outside its own app. No owner had signed.

The two-of-four threshold guarded the transactions the owners sent. Through the module, a policy written in advance decided what passed. Whatever it checked, it let through a swap that picked its own executor and asked for almost nothing back.

"A module isn't a hole in the threshold, it's a second road," Lilith says.

Each API key permission, and who sets its price

You return to your own key with both cases in mind. Each permission gets its own line. "Who decides what comes back," she says, "and who pockets the difference when it's less?" You write both answers beside every line.

What the key can signWho decides your priceHow it can pay someone elseWhat closes it off
A market order in a thin marketThe orders resting against yoursIts holder fills your orders against their own, at prices that favor them (Lighter's "trading against you")A market whitelist of liquid markets and a balance sized to the bot
Leverage or a large positionThe key, then the venue's liquidation priceHeavy losses or a liquidation in your account (Lighter)A sub-account holding only what the bot needs
A transfer to an account the venue calls yoursThe venue's definition of "yours"Funds land in a pool or account where someone else holds the claim (Lighter, 16 November)A wallet signature for that transfer, or a key that can't transfer at all
A swap through a routerThe executor and the minimum outThe caller names its own executor and asks for one unit back (the Safe, 16 November)A policy that pins the executor and sets a price floor
Reading balances and historyNothing movesYour holdings, addresses and strategy become visible to the holderA read-only token with an expiry, revoked when the tool is finished

Lighter's post-mortem names two of these routes beside the pool. Someone holding your key "could place orders from your account that trade against their own orders at bad prices, moving value from you to them". That route "works best in thinly traded markets". They could also open "large or highly leveraged positions in your account", walking it toward the liquidation line the venue's mark price decides. Your empty withdrawal box sees neither.

A trading key is an instruction the venue will follow for anyone who presents it.

Why Cryptio told clients to revoke read-only keys too

Last on your list is the line where nothing moves. It describes the key your tax tool holds, and you say that one, at least, is safe.

"Safe for your money. Now ask what it tells," Lilith says.

On Lighter a read-only credential isn't a trading key with boxes unticked. It's a separate token, minted from a key and limited to read scopes. It "won't allow placing trades nor request withdrawals", and it lasts anywhere from five minutes to ten years. For "a dashboard, tax tool or AI agent", the docs say, use one of those instead of an API key.

Read-only access has already met a real attacker. Cryptio, a crypto accounting platform that pulls records from its customers' exchanges and custodians, told crypto.news on 26 November that an outside party had used "frontier AI tools" to get into the platform and the API keys it held. "The unauthorized party attempted to move digital assets with some of those credentials," a spokesperson said. Every attempt it identified failed, the spokesperson added, and it has found no loss of assets.

Cryptio says it connects through read-only APIs. It also warned that anyone who had connected a key able to trade or withdraw could have funds exposed. It hasn't said what permissions the credentials in the attempts carried.

Its instruction covered every key a customer had given it, read-only ones included. Customers were to revoke each one where it was issued, at the exchange or custodian and not only inside Cryptio. Then they were to check those accounts for transfers, withdrawals and changes to users and permissions, and wait before reconnecting.

Why revoke a key that can't move anything? Cryptio hasn't said, so what follows is reasoning, not reporting. A read-only credential shows its holder your balances, your trade history and your deposit addresses. An accounting tool exists to read that, and a thief choosing a target would want the same.

On Lighter it shows more. Anyone with a read-only token for the account can read its keys' restrictions, "including allowed_ips". That field lists the IP addresses your trading keys may be used from. A token can also survive the key that minted it. When a key expires, the read-only tokens it minted before then "stay valid until their own expiry", so revoking them is a step of its own.

Limits a stolen key can't loosen

"Shrink what a thief could do with the keys you keep," Lilith says. Lighter's keys now take three limits, TokenPost reported on 26 November: a market whitelist, an IP whitelist and an expiry. The account's wallet signs every change, "so someone who holds only the API private key cannot loosen the limits".

The first of them alone would have blocked the pool route. A whitelisted key may only trade and adjust leverage in the markets you list, and every other transaction fails, "including withdrawals, transfers". Kept to liquid markets, it also leaves a thief fewer thin books to trade your account against.

The IP whitelist is aimed at the leak itself, because it ties the key to the servers you name. A key worked out from public signatures, or copied off your laptop, then fails anywhere else, but the whitelist does nothing against an attacker inside the service whose servers you named. Cryptio's intruder got into the platform itself, the kind of route a frontend attack takes through a site you already trust.

Lighter adds a catch of its own: read-only tokens created before the whitelist "are not IP restricted". So set the limits before you mint any read-only tokens.

The expiry is for keys you forget, capping how long one keeps working at 180 days out. It doesn't cancel orders the key left open. And when the wallet registers a fresh key at the same index, "the new key starts with no restrictions". Every rotation means setting the limits again.

One kind of owner can't use any of it. Setting a limit takes a signature a Safe can't produce, so Lighter's docs say accounts owned by one "cannot set restrictions".

The multisig, the most cautious kind of owner here, can't sign the limits on its own keys.

You delete two keys. One belonged to a bot you stopped running in the summer, the other to a tracker you can't name. Your tax tool gets a fresh read-only credential with an expiry. The bot keeps its trading key, cut down to the markets it trades where your exchange allows it.

The empty withdrawal box isn't wrong, it's narrow. It answers one question well, where your money can be sent. Both drains went around that question instead of through it. Every line on a permission list is a yes you gave in advance.

Read your keys the way their next holder will.

Who priced your last fill? In the simulator it's never the other side, since there's no order book: market orders fill off an outside price feed, limit orders at your own number. Send one of each close to the price and compare the two fills in Trade History. Not every permission on the real API keys you've handed out has an answer that simple.

Start free →

Can you beat the system.

A short quiz on this piece. 30 XP if you clear it, and it is the same question set whether you are signed in or not: signing in is only what makes the score count.

Article quiz

The quiz loads from the API and opens right here.

Better trading starts with better insight.

SPAV Authorization Brazil: 2026 Exchange Deadline

SPAV authorization Brazil rules turn exchange compliance into a countdown. This article shows what the 2026 deadline cha

8 min

Revoke Token Approvals: The Open Door You Forgot to Close

A $7.5M MEV bot was drained through token approvals it forgot to revoke. The risk lives in the standing allowance you gr

13 min

Protect Your Crypto Wallet From Malware in Your Tools

Phishing taught you to distrust links, not to protect your crypto wallet from malware hiding in the tools you trust. Tra

12 min

PIX Confirmation Trap: Real-Time Malware Hijacks Transfers

PIX confirmation trap attacks turn the screen you trust into part of the attack surface. This article shows how real-tim

8 min

Perp DEX Vault Risk: The Ostium $18M Oracle Exploit

Perp DEX vault risk, seen through Ostium's $18M oracle exploit: how a correctly signed price drained the vault, and why

13 min

L2 Sequencer Down: Is Your Crypto Safe When Base Stops?

When an L2 sequencer stops, your balance is safe but your access is not. What a frozen chain like Base actually does to

13 min

dApp Frontend Attack: How the Polymarket Drain Happened

Is it safe to connect your wallet to a dApp? Connecting is safe. Signing is the risk: the Polymarket drain shows how a t

13 min

Crypto Scams Brazil - The Fraud Pipeline

Crypto scams in Brazil rarely start with a wallet drain. Learn how fake apps, Pix payments, and exchange cash-out routes

11 min

Are Crypto Developers Money Transmitters? Code vs Custody

Are crypto developers money transmitters? The answer turns on custody, not code, and that line decides whether your wall

13 min

Can Your USDT Be Frozen? What a Sanction Really Does

Can USDT be frozen? A sanction does not stop a single coin by itself. The freeze is a separate, discretionary move by th

12 min