How it works
Starknet
Gloam on Starknet runs on Starknet's own privacy pool, with Gloam's account layer and relay on top. Over a channel that is already open, a payment hides who paid, who was paid and how much. The first payment to someone shows their private account.
- Network
- Starknet
- Pool
- Starknet's privacy pool
- Asset
- USDC
- Proofs
- Starkscan's prover
What it is
Gloam has no vault of its own on Starknet. It uses Starknet's privacy pool (STRK20, from starkware-libs/starknet-privacy), which Starknet runs. Gloam adds the rest: a private account that keeps your main wallet out of the pool, a relay that pays Starknet's fees, payroll and claim links. Everything else in these docs about the Gloam vault does not apply here.
- Network, Starknet
- Pool,
0x040337b1af3c663e86e333bab5a4b28da8d4652a15a69beee2b677776ffe812a, Starknet's canonical privacy pool - USDC,
0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb(6 decimals) - Who runs the pool, Starknet. Its owner can change its code without a delay. Gloam's relay sends to it only while its code is the version Gloam checked, and pauses Starknet otherwise.
Your private account
Your private account is its own Starknet account, made from your Gloam key. A browser wallet signs a fixed text to open it (twice the first time, to check it signs the same way each time). A Gloam wallet opens it with its passkey or backup code. The same wallet, passkey or code opens the same account on any device.
Gloam's relay deploys the account and sends every one of its transactions, so it never holds STRK and your main wallet never appears in the pool. Opening it registers its viewing key and opens its own channel in one transaction. That shows the account's address, and it is why a later cash out never names the account.
What is public and what is hidden
- A payment over a channel already open: hidden. Nobody sees who paid, who was paid or how much.
- The first payment to someone opens a channel to them, which shows their private account. It never shows who paid or how much. A payroll with several first payments shows those accounts together.
- Adding money shows your private account and the amount.
- A cash out shows where the money went and how much, never which private account it came from.
- Opening an account shows its address.
- Every pool transaction shows that it happened, how many notes it made, and Gloam's relay as its sender.
Who else can read it
- The pool's auditor key. Starknet's pool has a mandatory auditor key. Registering an account stores its viewing key encrypted to that key, so whoever holds it can read the account's private activity for authorized inspection. It cannot spend.
- The prover. Proofs are made by Starkscan's prover, through Gloam's server. The prover runs each transaction to prove it, so it sees what the transaction does. On the networks with the Gloam vault, proofs are made on your device.
- Finding your notes. On mainnet, Starknet's hosted discovery service finds an account's notes with its viewing key, so it can read them too. The request is sealed to that service (OHTTP) and passes through Gloam, so Gloam can't read it and the service doesn't see who asked.
- Screening. Starknet screens deposits: an add carries a screening check, and a deposit it refuses does not go in.
See what stays private for the Gloam vault on the other networks.
What it costs
- Gloam's relay pays Starknet's network fees, so you never need STRK.
- On mainnet each add, payment and cash out pays Gloam's relay fee, 0.25 USDC, inside its proof. The app reads it from the relay and shows it before you confirm. If it changes before your proof is made, nothing is sent and the app asks again.
- Opening an account is free, with a daily cap.
- Bringing USDC in from another network adds Gloam's fee for receiving it on Starknet, shown before you sign. Cashing out to another network adds Circle's fee, shown with the rest as one figure.
- A claim link costs its amount and three fees (paying it, opening its one-time account, and the claim), so the person who claims it gets the whole amount.
Limits for now
- Proofs come from Starkscan's prover, through Gloam, and Gloam has a few a day for now. When they are used, Starknet says it is busy and nothing is sent. Try again later.
- A proof reads Starknet as it was 10 blocks back, so each move waits for about 10 blocks, then for its proof, which can take a few minutes.
- An add has a cap per transaction. The app says it when you go over.
Payroll, claim links and requests
Payroll pays up to 200 people in a run, and up to 28 in one proof, as many as fit, with Gloam's fee once per proof. A row with no account gets a claim link. A row naming an account that was never opened is skipped, and says so. A run is saved before each proof goes, so resuming never pays anyone twice. See private payroll.
Claim links (gloam.trade/c#sn=...) pay a person with no account yet. Each link is a one-time private account whose key rides in the link. Paying it shows that one-time account, never yours. Claiming it moves the money into the claimer's own private account, which shows that account, as a first payment does. A link is claimed once. Until someone claims it, you can take it back under Sent links.
Payment requests (made under Receive) are links that ask to be paid into your private account, with an amount or none, a note and your name. Opening one fills in Pay on Starknet; the payer checks it and pays. Nothing about a request goes on chain. A Starknet payment carries no note, so the note is only shown to the payer, and the name is only what the link says. The payment is like any other: a first payment to you shows your private account.
From and to other networks
Add can bring USDC from another network into your private account:
- From the networks Circle's CCTP serves (Base, Ethereum, Arbitrum, OP Mainnet, Polygon, Avalanche, Unichain, World Chain, Linea, Monad, HyperEVM, Sonic and X Layer), you sign once on that network, Circle moves the USDC, and Gloam's relay receives it on Starknet and adds it.
- From Robinhood Chain, Tempo, BNB Chain and Elysium, one Relay order takes the USDC through Base first. You still sign once.
- From a Solana wallet.
- Or send USDC on Starknet to your private account's address from any wallet or exchange, then Add.
Bringing money in is public, like funding the account from any wallet: the send on the other network, the arrival on Starknet and the add can all be seen. Cash out can send to any of the CCTP networks above. The money leaves through a one-time account, so the cash out never names your private account, and Circle delivers it on the other network.
Not on Starknet
- A proof of funds or of a single payment for /verify. Instead, Prove can share every payment between you and one other account, and that can't be taken back.
- Private swaps
SDK
@gloamtrade/sdk from 0.10.0 has Gloam on Starknet at @gloamtrade/sdk/starknet, for servers and agents. It opens the same private account the app opens and goes through Gloam's routes. It needs starknet and StarkWare's privacy SDK next to it. StarkWare publishes that on GitHub Packages only, so Gloam vendors the build it runs.
npm i @gloamtrade/sdk starknet@10.5.0
npm i https://github.com/gloamtrade/gloam/raw/main/app/vendor/starknet-privacy/starknet-privacy-sdk-0.14.4-rc.2-gloam.1.tgzimport { privateKeyToAccount } from "viem/accounts";
import {
openStarknetAccount, starknetViemWallet, registerStarknetAccount, starknetBalances,
addToStarknetPrivate, payStarknetPrivately, payStarknetMany, cashOutStarknet,
makeStarknetClaimLink, claimStarknetLink,
} from "@gloamtrade/sdk/starknet";
const account = await openStarknetAccount({ wallet: starknetViemWallet(privateKeyToAccount(key)) });
await registerStarknetAccount(account); // once: the relay deploys it, one proof opens it
await starknetBalances(account); // { usdc: { private, public } } in base units
await addToStarknetPrivate(account, { amount: 5_000_000n });
await payStarknetPrivately(account, { to, amount: 1_000_000n }); // firstPayment says if it showed them
await payStarknetMany(account, { payments }); // up to 28 people, one proof, one fee
await cashOutStarknet(account, { to: "0x...", amount: 1_000_000n });
const link = await makeStarknetClaimLink(account, { amount: 1_000_000n, keep: (l) => save(l.url) });
await claimStarknetLink({ link: link.url, to: claimerAddress }); // their Gloam private account on Starknet| Call | What it does | Public on chain |
|---|---|---|
openStarknetAccount | Opens private account index from a wallet's signature or a 32-byte seed, as the app does | Nothing |
registerStarknetAccount | The relay deploys it, then one proof registers its viewing key and opens its own channel. Free, capped | The account |
addToStarknetPrivate | Makes what sits at the account's address private, Gloam's fee inside | The account and the amount |
payStarknetPrivately, payStarknetMany | Pays one or many Gloam private accounts, one proof | A first payment: the payee's account |
cashOutStarknet | Cash out to any Starknet address | The destination and the amount |
makeStarknetClaimLink, claimStarknetLink | The app's /c#sn= links: kept first, then paid; claimed once | The link's one-time account, then the claimer's |
Errors are typed and come before anything is proven or sent: StarknetOffError (Starknet isn't open on that server, or the relay sends no moves), StarknetBusyError (code quota when the day's proofs are used, or a rate limit or pause), StarknetFeeChangedError (the fee changed since the account read it, or is above maxFee) and StarknetInsufficientError. On mainnet the SDK proves only into Starknet's canonical pool. More in the SDK readme.
MCP tools
@gloamtrade/mcp from 0.12.0 has the gloam_starknet_* tools. The agent's EVM key (GLOAM_AGENT_PRIVATE_KEY) opens the same private Starknet account the app opens for that wallet. Spending limits name the network starknet-mainnet, and a payment or cash out counts its amount and Gloam's fee.
| Tool | Does |
|---|---|
gloam_starknet_info / gloam_starknet_balance | What Starknet hides and shows, the relay and its fee, the agent's account and balance (read) |
gloam_starknet_register | Puts the agent's account on chain and opens it, once. The relay pays |
gloam_starknet_add | Makes USDC at the account's address private (limits tool shield) |
gloam_starknet_pay / gloam_starknet_cash_out | Pays a Gloam private account, or cashes out to any Starknet address (limits tool pay) |
gloam_starknet_tx_status | Accepted, reverted or pending (read) |
See agents for spending limits.
Try it
In the app, pick Starknet in the network menu, open your private account, then add, pay or cash out in the Vault. See also networks.