How Pakt could have prevented Lighter and Aster API key incidents
Two trading API keys leaked in one week. Neither could withdraw. Both emptied the account anyway. Why a permission flag is not a policy, and how a signer that checks policy would have refused both thefts.
TL;DR
- In one week, traders on two perp DEXs lost about $15 million through API keys that did not have permission to withdraw. On Lighter the keys were computed from public signatures. On Aster a browser-generated agent key leaked, and nobody yet knows how.
- Neither attacker called withdraw. Each used an action the key was allowed to take, ultimately getting the money somewhere it could be accessed.
- A permission flag answers "can this key call withdraw?" A policy answers "can this key move the whole account to an address I have never seen?" Only the second question stops a thief, and only a signer that checks policy before signing can ask it. That signer is what we built Pakt to be.
Lighter, 16 November
Shortly after 11:00 UTC, Lighter paused withdrawals and pool creation. Its post-mortem said the affected accounts had used unofficial signing code that reused nonces. Reuse a nonce across two signatures and the private key falls out of the arithmetic. Lighter's API signatures were public at the time, so the attacker needed no access to the victim or to Lighter. He computed the keys from the order flow and signed as the victim.
The keys could not withdraw to an outside wallet, so he did not try. He created a public liquidity pool from the victim's account, bought nearly all of its shares from a second account he controlled, moved the victim's USDC into the pool in tranches of about $1 million, and redeemed the shares from his own side. Bitquery traced 10,393,057 USDC leaving Lighter's Ethereum contract that day; other researchers put the damage at $15.5 million across two market-maker accounts. The Security Council returned about $5 million, and withdrawals reopened seven hours later.
Aster, 13 to 17 November
In the early hours of 13 November, Beijing time, a trader who posts as furongfei watched 4,564,675 USDT leave their Aster account in seven transfers over 44 minutes, sent to an account registered minutes earlier.
Before that, 33 BTC had been moved between futures and spot nine times and sold through 17 market orders. The transfers were signed by an agent key labelled "aster-desktop", generated in the browser when the trader enabled trading. That key, they say, had no withdrawal permission.
The receiving account withdrew ten times; 1,000 ETH went into Tornado Cash and 768 ETH plus about 994,000 USDT through NEAR Intents. On 17 November Aster's CEO, Leonard Leung, confirmed the loss and told users to keep keys safe and avoid unknown browser extensions. How the key leaked, and how a key without withdrawal rights ended up funding a stranger's account, is not public. On paper, it could trade and nothing else.
What both thefts have in common
Permissions are written in the vocabulary of the API, not the vocabulary of the job. Both exchanges separate "trade" from "withdraw". Creating a pool and transferring to another account on the same venue are internal operations, and the permission model treated them as harmless.
Lighter now requires a wallet signature to fund a public pool and is adding IP allowlists and per-key limits. Good fixes, each aimed at this attack. The next attacker reads the same post-mortem and picks a different internal action.
With Pakt, both thefts could have been prevented
Run both incidents again with one change: the signing key is not in the bot or the browser. It sits inside Pakt, generated in a trusted execution environment, and never leaves it. The bot or the agent proposes an action. The secure enclave checks it against a policy the owner set with a cold key, and against the account's projected state, and only then signs.
On Lighter, the third-party library never holds the key, so there are no public signatures to attack. Suppose the attacker gets a credential anyway. The market-making policy says: orders on these markets, up to this size, equity never below this floor. "Create public pool" is not an order. Refused. "Transfer 1 million USDC to pool" is not an order. Refused. The security team learns about the leak from the first refusal, not from the Guardian pausing the chain.
On Aster, the browser never generates a long-lived key with trading rights. The policy for a directional trader has a shape: approved markets, maximum trade size, leverage cap, no transfers to accounts the owner has not registered. Thirty-three BTC shuffled nine times and dumped through seventeen market orders is not that shape. Seven transfers to a wallet created that night is not either. Refused, seven times, with a signed receipt for each.
The difference from the exchanges' own patches is that the policy covers every action a key can sign, not the one action used last week, and that each signature carries a zero-knowledge proof that the policy was checked. The exchange, the trader and an auditor can verify it without trusting us or each other.
Pakt is for anyone putting agents in charge of money
It can help market makers and API traders on Lighter, Aster, Hyperliquid, edgeX, Paradex and any venue with agent wallets, because the model is the same everywhere: a key that can trade without the owner signing each request. And the exchanges themselves, because every one of these incidents ends with the venue pausing withdrawals, refunding from a council and writing a post-mortem about a key it never held.
Pakt is that control layer: fine-grained policies enforced at signing, inside a TEE, with a proof for every decision. We are running pilots with trading firms and venues now. If your API keys can do more than their job, talk to us.
Sources
- Lighter on X, 16 Nov 2026: post-mortem, "Signing Safely on Lighter: Lessons from November 16"
- Bitquery investigation: Lighter incident, $10.4M withdrawn
- CryptoSlate: Lighter loses $15.5M in sudden drain and blames a single API leak
- furongfei (@fuhuahuai) on X, 17 Nov 2026: the trader's account of the Aster theft
- crypto.news, 17 Nov 2026: Aster strengthens security after API Wallet leak and reported $4.56M loss
- Leonard Leung on X, 17 Nov 2026: statement on the API Wallet incident