# GUM Docs — Full Documentation
> GUM (gum.ag, built by Jupiter) is the universal identity and liquidity layer for crypto — spot tokens, tokenized stocks, perpetual futures (GUM Perps), Universal Deposit, Universal Swap & Bridge, and a keyless Trading API + CLI/MCP server (`@gumag/cli`).
- Website: https://gum.ag
- Docs index: https://docs.gum.ag/llms.txt
- Sitemap: https://docs.gum.ag/sitemap.xml
- Trading API base URL: https://api.gum.ag/app/v1
- OpenAPI 3.1 spec: https://api.gum.ag/app/v1/openapi.json
- CLI & MCP server: `npx -y @gumag/cli@latest mcp`
---
## Introduction
URL: https://docs.gum.ag/
Markdown: https://docs.gum.ag/index.md
Description: Learn how GUM works, accept deposits with Universal Deposit, swap and bridge assets with Universal Swap & Bridge, or trade from your own code with the Trading API.
import { CardGroup_1 } from "../components/index/CardGroup_1.jsx";
---
## How GUM works
URL: https://docs.gum.ag/how-gum-works
Markdown: https://docs.gum.ag/how-gum-works.md
Description: GUM lets you hold, trade and move assets across multiple chains, with more to come. This page shows what happens behind the app.
import { Steps_1 } from "../components/how-gum-works/Steps_1.jsx";
import { CardGroup_1 } from "../components/how-gum-works/CardGroup_1.jsx";
GUM is the identity and liquidity layer for crypto. You hold, trade and move
assets across multiple chains without a wallet for each chain or a bridge
between them. The GUM app at [gum.ag](https://gum.ag) is the first app built on
it.
## The three layers
### GUM Runtime
* **GUM Network** is the chain GUM runs on, where your account and balances live.
* **DOVES** (Decentralized Observation, Validation, and Execution) are the nodes
that run GUM Network, watch every connected chain and sign the actions GUM sends
out.
* **Universal Accounts** are GUM's native accounts, opened with Google or X
([OpenIDZK](/accounts/openidzk)), a passkey or a wallet. **Each sign-in method
opens its own account.**
### Omnichain Ledger
* Tracks balances across supported chains.
### Core Services
* **Intents.** You choose an action. An authorized session keypair, including a
delegation keypair, can sign the transaction on your behalf; some wallets sign
directly. Core Services handle execution on the target chain.
* **Routing.** For each trade, GUM compares quotes from several aggregators and
uses the best one ([meta-aggregation](/glossary#meta-aggregation)).
## What happens when you deposit, trade and withdraw
## Supported chains
Each supported chain has a **dollar token**, the stablecoin it settles in on
GUM.
You can convert USDT and USDG to USD in the app.
**Only deposit on the supported chains listed above.** Tokens sent on any
other network aren't credited to your account, even if the address looks the
same. See [Deposit](/funds/deposit).
## What you can do today
For costs, see [Fees](/fees). For unfamiliar terms, see the
[Glossary](/glossary). For help, open a ticket on
[Discord](https://discord.gg/gum-ag).
---
## Universal Accounts and sign-in
URL: https://docs.gum.ag/accounts/universal-accounts
Markdown: https://docs.gum.ag/accounts/universal-accounts.md
Description: Your GUM account comes from the way you sign in, with no seed phrase to write down.
import { AccordionGroup_1 } from "../../components/accounts/universal-accounts/AccordionGroup_1.jsx";
A Universal Account is created on GUM.
## Sign-in methods
| Method | How you approve sign-in |
| ------------------------------- | ------------------------------------- |
| Google, Apple or X | Sign in to that account |
| [Passkey](/glossary#passkey) | Your fingerprint, face or screen lock |
| Solana or Ethereum (EVM) wallet | Sign a message in your wallet |
Google, Apple and X sign-in use [OpenIDZK](/accounts/openidzk), GUM's private
social login. New Apple sign-ups are paused during an Apple sign-in migration.
## One method, one account
**Each sign-in method creates a separate account, so you must sign in the
same way every time to reach your funds.** Every Google, Apple or X account,
every passkey and every wallet address opens its own account, with its own
address and balance. Linking sign-in methods, account recovery and
two-factor authentication (2FA) are planned, but not available yet.
## Approvals and sessions
Signing in starts a session: a temporary permission for this device to act for
your account, so you trade without pop-ups.
* **Sessions last about two weeks.** Google, Apple and X sessions
[can end sooner](/accounts/openidzk#why-you-may-be-signed-out-early).
* **A session can do anything your account can**, including withdrawing your
funds.
* **Sessions can't be revoked yet.** **Log out** doesn't cancel the session, so
treat a signed-in device like an unlocked wallet.
## Hardware-wallet mode
A Solana hardware wallet that doesn't support message signing can't authorize
the delegated session key GUM normally uses to act without repeated wallet
approvals. Tick **Hardware Wallet?** when you sign in to use the same account
without delegation. You'll approve each token trade and withdrawal in your
wallet, and [GUM Perps](/perps/overview) trading isn't available.
* **A Ledger needs Blind signing.** Its Solana app only approves GUM
transactions with
[Blind signing turned on](https://support.ledger.com/article/4499092909085-zd).
Ledger turns it off after every Ledger OS or Solana app update, so GUM
reminds you each time it asks you to sign.
* **Approve within about 25 seconds.** A trade or withdrawal expires shortly
after GUM prepares it. If you reject or cancel it, or it expires first,
nothing is submitted or charged: get a new quote and approve again.
## FAQ
---
## Private social login (OpenIDZK)
URL: https://docs.gum.ag/accounts/openidzk
Markdown: https://docs.gum.ag/accounts/openidzk.md
Description: How signing in with Google, Apple or X works, and what stays private.
import { Steps_1 } from "../../components/accounts/openidzk/Steps_1.jsx";
import { AccordionGroup_1 } from "../../components/accounts/openidzk/AccordionGroup_1.jsx";
When you sign in with Google, Apple or X, GUM uses OpenIDZK to open your
[Universal Account](/accounts/universal-accounts). A zero-knowledge proof shows
[GUM Network](/how-gum-works) that you hold a valid login, without revealing who you
are on-chain. The proof is handled for you.
New Apple sign-ups are paused during an Apple sign-in migration.
## What stays private, and what doesn't
**Your email and social account ID never go on-chain, and GUM doesn't store
them.**
Some things aren't private:
* GUM's sign-in services check your login token when you sign in.
* The chain can see which login provider an account uses.
* Your account address and transactions are public on GUM Network.
* Your login provider knows you signed in to GUM.
## How a sign-in works
For what the proof checks, see [OpenIDZK proofs](/protocol/openidzk-proofs).
## Why you may be signed out early
Sessions last
[about two weeks](/accounts/universal-accounts#approvals-and-sessions), but
Google, Apple and X sign logins with keys that get replaced from time to time.
Once the key that signed your login is retired, GUM Network stops accepting your
session. Your account and funds aren't affected: sign in again the same way.
## FAQ
---
## Deposit
URL: https://docs.gum.ag/funds/deposit
Markdown: https://docs.gum.ag/funds/deposit.md
Description: Send supported tokens to your personal deposit addresses on GUM for free.
**Depositing into GUM is free.** Pick a supported chain and send tokens to the
deposit address shown in the app.
## How it works
1. Open **Deposit** in the app and pick the chain you're sending from.
2. Copy the address or scan its QR code, then send from your wallet or
exchange.
On EVM chains, your deposit address starts with `0x` and may be the same on
several networks. Always send on the network selected in the app.
Each sign-in method creates its own account with its own addresses, so copy
the address while signed in to the account you want to fund. See
[Universal Accounts](/accounts/universal-accounts).
## Supported chains
**The minimum deposit is $2.** A smaller deposit waits at your address. Send
more of the same token to the same address, and GUM credits them together once
the total clears the minimum.
You can also deposit other supported tokens. They arrive as tokens in your
account.
## Timing
Deposits usually arrive in under a minute. Ethereum takes a few minutes. If a
deposit hasn't arrived by then, check it with **Deposits not coming in?** on the
Deposit screen. If it's still missing, open a ticket on
[Discord](https://discord.gg/gum-ag).
## Sending from a wallet or exchange
The wallet you send from pays the sending network's usual fee. On an exchange,
choose the same network as in GUM, and check that what arrives after any
withdrawal fee is still worth at least $2. If the exchange doesn't support
Solana deposit addresses like GUM's, use Base or Arbitrum instead.
**Send only on the networks listed above, to the address the Deposit
screen shows for that network.** Funds sent on any other network, or tokens
GUM doesn't support, may never be credited, even where your EVM address looks
valid. Never send to the public key shown in your profile settings: it isn't
a deposit address. If a deposit went wrong, open a ticket on
[Discord](https://discord.gg/gum-ag). Recovery isn't guaranteed.
---
## Withdraw
URL: https://docs.gum.ag/funds/withdraw
Markdown: https://docs.gum.ag/funds/withdraw.md
Description: Send USD or tokens from GUM to an address on another chain, for a flat fee per destination chain.
Withdrawing sends USD or tokens from your GUM account to an address on another
chain. Each withdrawal pays a flat fee that depends on the destination chain.
## How to withdraw
1. Open **Withdraw**, paste the address and choose the chain.
2. Choose the token. The app lists only the tokens you can send to that chain.
3. Enter the amount, review the fee and the address check, then choose
**Withdraw**.
The address check catches malformed addresses and accounts that can't receive
funds, but it can't tell whether an address is yours, or whether the wallet or
exchange behind it supports that network.
## What arrives on each chain
USD goes out as USDC where the table shows it is available, regardless of the
chain it came in on.
Every other token can only be withdrawn to its
[home chain](/glossary#home-chain). If a token is missing from the list, pick
its home chain as the destination.
## Fees
The flat fee comes out of the amount you withdraw, so the amount must be worth
more than the fee. For a token other than USD, you pay the same dollar amount in
that token. See [Fees](/fees#withdrawals) for each chain's fee. These are the
current rates; they may change.
## Timing
Withdrawals usually arrive in about a minute. Ethereum takes a few minutes. A
withdrawal doesn't expire: it stays open until it's delivered. If one looks
stuck, or before you move a very large amount, open a ticket on
[Discord](https://discord.gg/gum-ag).
**Withdrawals can't be reversed.** GUM can't get back funds sent to a wrong
address, or to a wallet or exchange that doesn't support that network. Check
the destination chain and the full address before you confirm.
---
## Gifts
URL: https://docs.gum.ag/funds/gifts
Markdown: https://docs.gum.ag/funds/gifts.md
Description: Send USD to anyone as a link, QR code or code, which they claim by signing in to GUM.
A gift sends USD from your balance as a link, a QR code or a 20-character
code. The person you send it to signs in to GUM, or creates an account, and
claims the USD. Gifts are [free](/fees) to send and claim.
## Send a gift
Open **Gift**, choose **Send**, enter an amount between $1 and $1,000,000 and
choose **Create gift**. Then copy or share the link, or download the gift as an
image. **The code is shown only once**, so save or share it straight away.
## Claim a gift
Open the gift link or scan its QR code, or open **Gift**, choose **Receive** and
enter the code. Sign in and choose **Claim**. The USD arrives in the account
you're signed in to, so sign in the way you normally do. See
[Universal Accounts](/accounts/universal-accounts).
If the app says the gift can't be claimed, it has already been claimed, it has
expired, or the code is invalid.
## Expiry and cancelling
Gifts expire 7 days after they're created if no one claims them. Until then,
you can cancel a gift under **Active** to get the USD back, and its link and
code stop working. If you lose the code, cancel the gift.
**Anyone who has the code or link can claim the gift.** Share it only with
the person it's for, and never post it publicly. Once someone claims it, you
can't cancel it.
---
## Trade tokens
URL: https://docs.gum.ag/trade/tokens
Markdown: https://docs.gum.ag/trade/tokens.md
Description: Buy and sell tokens across supported chains with your USD balance.
import { Steps_1 } from "../../components/trade/tokens/Steps_1.jsx";
import { AccordionGroup_1 } from "../../components/trade/tokens/AccordionGroup_1.jsx";
You buy tokens with your [USD balance](/glossary#usd-balance) and sell them
back to USD across supported chains. [Deposit](/funds/deposit) to fund your USD
balance. Tokenized stocks and Earn tokens trade the same way; see
[Stocks](/trade/stocks) and [Earn](/trade/earn).
## Supported chains
## How a trade works
## Price protection
**Every trade carries a minimum output that you sign and the chain enforces.**
The quote shows it as **Receive at least**. Max [slippage](/glossary#slippage)
caps how far below the quote a trade can fill:
The cap is 2% on Ethereum and Robinhood Chain, and 1% on other supported
chains. If the swap can't deliver the minimum, the trade doesn't go through.
## If a trade fails
**If a trade can't complete, you get a full refund, including the fee:** your
USD on a buy, your tokens on a sale. The app claims the refund for you
automatically. If a refund seems stuck, open the trade and select
**Claim Funds**. If that doesn't help, open a ticket on
[Discord](https://discord.gg/gum-ag).
## Fees
Each trade pays a fee, shown on the quote before you confirm. The standard rate
is 25 bps (0.25%), with a minimum fee per chain; stablecoins, some Earn tokens
and Robinhood Chain have different rates. These are current rates; they may
change. See [Fees](/fees).
## Token warnings
GUM checks tokens for signs of risk and warns you before you trade. In the live
quote check, GUM quotes a $1,000 buy, then quotes selling those tokens straight
back, with no fee and no slippage, and measures how much of the $1,000 comes
back.
| Round trip returns | What happens |
| ---------------------------------- | ----------------------------------------------------------------------- |
| 95% or more | No warning. |
| 50% to under 95% | The quote shows a warning. |
| Under 50%, or no buy or sell quote | Marked **Not tradable on GUM yet**. Buying needs a second confirmation. |
Stocks must clear a stricter bar; see
[When a stock can trade](/trade/stocks#when-a-stock-can-trade).
The app also warns about concentrated or few holders, low liquidity or recent
volume, new tokens, tokens whose issuer can freeze balances or create more
tokens, and poor-value quotes.
Warnings are a guide, not a guarantee. Any token can lose value, or become
hard to sell, without a warning showing.
## FAQ
---
## Stocks
URL: https://docs.gum.ag/trade/stocks
Markdown: https://docs.gum.ag/trade/stocks.md
Description: Trade tokenized stocks and ETFs with your USD balance, and know what a stock token does and doesn't give you.
Stocks lets you buy and sell tokens that track public stocks and ETFs, paid
from your USD balance. **A stock token tracks a stock, but holding it isn't the
same as owning the share.**
## What stock tokens are
A stock token is issued on Solana by a third-party issuer, which sets its
terms. You trade it like any Solana token, with a $1 minimum, 1% max slippage
and the same [fees](/fees); see [Trade tokens](/trade/tokens).
- **Rights sit with the token issuer, not the company.** Unless its terms say
otherwise, you have no shareholder, voting or dividend rights.
- **The price can diverge from the stock**, especially outside market hours or
when trading in the token is thin.
- **The token depends on its issuer.** If the issuer fails or stops supporting
a token, it can become hard to sell and can lose all its value, whatever
happens to the stock.
Pre-stocks are pre-IPO tokens linked to private companies, and they carry
extra risk. There's no public share price to check the token against, and the
company may never list. What
the token represents, and what happens if the company lists, is acquired or
fails, depends entirely on the issuer's terms. Pre-stocks can become hard to
sell and can lose all their value.
## When a stock can trade
**Whether a stock can trade is decided by a live quote check, not by the
clock.** GUM quotes a $1,000 buy of the stock token, then quotes selling it
straight back, with no fee and no slippage. If less than 99% comes back, the
stock shows as **Unavailable**. A result is reused for up to 30 minutes, so a
stock can become available again once quotes improve. This bar is stricter
than the one for [other tokens](/trade/tokens#token-warnings).
The market hours on each stock page are a reference, because quote quality
differs outside them. Outside regular hours, quotes can be worse, and the app
warns you before you trade.
## Dividends and corporate actions
Dividends, stock splits, mergers and other corporate actions follow the token
issuer's terms, and a token may not reflect them at all. GUM doesn't pay
dividends itself.
**There's no redemption through GUM.** You can't turn a stock token into the
underlying shares in the app. To exit, you sell the token for USD.
---
## Earn
URL: https://docs.gum.ag/trade/earn
Markdown: https://docs.gum.ag/trade/earn.md
Description: Buy yield-bearing tokens from third parties with your USD balance, and see where their yield and risks come from.
Earn lists yield-bearing tokens from third parties, with their current APY
(annual percentage yield). You buy them with your USD balance and sell them
back to USD. **Earn isn't a GUM vault: GUM doesn't set, manage or guarantee the
yield.**
## What Earn is
Earn gives you access to yield-bearing tokens across multiple chains. The
third-party protocols behind them generate the yield and set the rates.
- **Depositing buys the token** at a quote, like any [trade](/trade/tokens).
- **Withdrawing sells the token** for USD at the quote at that time, which can
be more or less than you paid. It can be temporarily unavailable while the
token's chain is paused for maintenance.
- **Limits:** $1 minimum for deposits and withdrawals, and a fixed 1% max
slippage.
## Where the APY comes from
GUM shows each token's APY from third-party data. It's the latest available
rate, including compounding, or a 30-day average when there's no current rate.
For some tokens it's an estimate.
**APY varies and isn't guaranteed.** It isn't a forecast, and the value of the
token can fall. The projection in the app assumes the rate holds all year and
the token keeps its value.
## Risks
Yield-bearing tokens carry risks that GUM doesn't control:
- **The token issuer.** The protocol behind a token can fail, change how the
token works or cut its rate.
- **Smart contracts.** A bug or exploit in the token's contracts can cause
losses.
- **Depegging.** A token can trade below the asset it's meant to track.
- **Liquidity.** Withdrawing is a sale. In a thin market you may get less than
the displayed value, or no quote for a while.
You can lose money in Earn, including the amount you put in. There's no
deposit insurance, and GUM doesn't guarantee the yield or your principal.
## Fees
Depositing and withdrawing are trades, so trading fees apply both ways: the
standard 25 bps (0.25%), or a reduced 7 bps (0.07%) on some Earn tokens. These
are current rates; they may change. See [Fees](/fees).
---
## GUM Perps
URL: https://docs.gum.ag/perps/overview
Markdown: https://docs.gum.ag/perps/overview.md
Description: Trade perpetual futures on crypto using your USD balance as collateral. Leverage limits vary by market.
import { CardGroup_1 } from "../../components/perps/overview/CardGroup_1.jsx";
A perpetual future, or perp, tracks an asset's price and never expires. You
don't own the asset: you go **long** to profit when the price rises, or
**short** when it falls. Leverage lets you hold a position worth more than the
USD behind it.
Perps use leverage. A small price move can wipe out the USD behind a
position, and a liquidation can't be undone. Read
[Liquidation](/perps/liquidation) before you trade.
## How GUM Perps works
* **On-chain.** Each market has an order book on GUM Network, where a program
matches orders and tracks positions, so every fill can be verified.
* **USD is the collateral.** Profit and loss, fees and funding are all paid in
USD.
* **Sub-accounts.** You move USD into a perps [sub-account](/perps/accounts) to
trade. You can have up to five, each with its own USD and positions.
## Markets
Markets are open 24/7, except during scheduled maintenance, which the app
announces beforehand.
## Mark price and last price
GUM Perps uses an **oracle price** as its **mark price**. **Your margin,
liquidations and unrealized PnL use the mark price, not the last trade.** The
**last price** is the latest trade on the order book. It can differ from the
mark price, especially in fast markets or when the book is thin.
## Fees
These are current rates; they may change.
* **Maker, 0.5 bps (0.005%):** your order rests on the book and someone else
fills it. It's a charge, not a rebate.
* **Taker, 3.5 bps (0.035%):** your order fills right away against the book.
Liquidations carry an extra fee; see [Fees](/fees).
Deposits and transfers have no account-value cap. Your available balance
and trading limits still apply. See
[Deposits and transfers](/perps/accounts#deposits-and-transfers).
## Learn more
---
## Perps accounts and sub-accounts
URL: https://docs.gum.ag/perps/accounts
Markdown: https://docs.gum.ag/perps/accounts.md
Description: Move USD between your balance and GUM Perps, keep positions apart with sub-accounts, and know the limits that apply.
To trade perps, you move USD from your GUM balance into a perps sub-account.
Each sub-account is a separate margin account with its own USD, positions,
orders and liquidation risk. To keep a cross position open while opening an
isolated position in the same market, use another sub-account.
## Moving USD
Open the transfer screen in Perps and choose a direction. Your main USD balance
is labelled **Spot** there.
- **Spot to Perps:** up to your available USD balance.
- **Perps to Spot:** up to the sub-account's **Available** balance, the USD
that isn't backing positions or open orders. While it has open positions or
orders, $0.01 stays behind.
- **Perps to Perps:** up to the sender's Available balance minus $0.01.
Not available during maintenance.
Transfers are free. Margin set aside for an
[isolated position](/perps/margin-and-leverage#cross-and-isolated-margin) moves
only between that position and its sub-account: use **Adjust margin** on the
position to add USD, or to take back any above its initial margin. If you have
no USD yet, see [Deposit](/funds/deposit).
## Sub-accounts
- You can have up to **five** sub-accounts.
- **Positions in one sub-account can't use USD from another**, and a liquidation
in one doesn't touch the others.
- Isolated positions sit inside a sub-account and don't count toward the five.
## Deposits and transfers
There is no account-value cap on deposits or transfers into a sub-account.
You can move up to your available balance; position and order limits still
apply when you trade. Account value is the sub-account's USD plus the
unrealized PnL of its positions.
## Jupiter Account
You may see a sub-account named **Jupiter Account**. It shows positions opened
through Jupiter's perps interface, which runs on GUM Perps. It's view-only in
GUM; manage those positions on Jupiter. It takes one of your five sub-account
slots.
---
## Margin and leverage
URL: https://docs.gum.ag/perps/margin-and-leverage
Markdown: https://docs.gum.ag/perps/margin-and-leverage.md
Description: How much USD you need to open and keep a position, how leverage and margin modes work, and how the app estimates your liquidation price.
Margin is the USD that backs your positions. You need **initial margin** to
open a position, and **maintenance margin** to keep it open.
Percentages are of position value. The app shows the current leverage limit in
the order form.
Every market uses [margin tiers](#margin-tiers), and the table shows the first
tier.
## Leverage
You set leverage per market in the order form, from 1x up to the market's max,
which is where it starts. **Leverage sets how much initial margin a new position
needs, not your maintenance margin.** The higher the leverage, the less you
need. For a cross position you already hold, lowering the setting doesn't move
your liquidation price; adding USD or reducing the position does.
## Margin tiers
In every market, a larger position needs a larger share of its value as margin,
and allows less leverage. All markets use the same tier rates:
| Max leverage | 50x | 25x | 20x | 10x | 5x |
| ------------------ | --- | --- | ---- | --- | --- |
| Initial margin | 2% | 4% | 5% | 10% | 20% |
| Maintenance margin | 1% | 2% | 2.5% | 5% | 10% |
Each market's tiers end at these position values. Its first tier starts at $0
and each later one where the previous one ends, so SOL's 20x tier covers $20,000
to $50,000. **—** means the market has no such tier.
| Market | 50x | 25x | 20x | 10x | 5x |
| ------------------- | ------- | ------- | -------- | -------- | -------- |
| BTC, ETH | $20,000 | $50,000 | $100,000 | $250,000 | $500,000 |
| SOL | $10,000 | $20,000 | $50,000 | $100,000 | $200,000 |
| ZEC | $10,000 | $20,000 | $50,000 | $100,000 | — |
| HYPE | — | $25,000 | $50,000 | $100,000 | — |
| JUP | — | — | $10,000 | $20,000 | $50,000 |
| SPCX, SKHYNIX | — | — | $50,000 | $75,000 | $100,000 |
- **Your leverage caps your position.** Your position and open orders in a
market can total up to the end of the last tier whose max leverage is at
least yours. ETH starts at 50x, which allows $20,000. At 30x that's still
$20,000, and $50,000 needs 25x or lower. The leverage slider marks each
tier's max.
- **Initial margin is one rate on the whole position**: its value divided by
your leverage. A $50,000 ETH position at 25x needs $2,000.
- **Maintenance margin rises gradually.** Each slice of a position pays its own
tier's percentage, so a $50,000 ETH position needs $800: 1% of the first
$20,000 plus 2% of the next $30,000.
- **A position above the first tier is liquidated one tier at a time.** See
[Liquidation](/perps/liquidation#what-happens).
## Cross and isolated margin
- **Cross** (the default) backs all of a sub-account's positions and orders
with its USD, so a loss can draw on the whole balance.
- **Isolated** sets aside margin for one position, based on your leverage. Only
that margin backs it, so a liquidation doesn't touch the rest of the
sub-account.
In one sub-account, a market is either cross or isolated. To keep both modes
open for the same market, use separate sub-accounts. Otherwise, close the
existing position and cancel its open orders before switching.
## Return on position margin
**Position ROE** is unrealized PnL divided by the margin backing the position,
multiplied by 100. Cross uses the venue's required initial margin at its
reported mark price. The margin equals mark notional times the effective initial
margin rate, which accounts for the position's leverage setting and risk tier.
A stricter risk tier can require more margin than the displayed leverage
implies. At the same PnL, a higher margin requirement moves ROE closer to zero.
Isolated uses posted collateral when available and required initial margin
otherwise. Adding isolated collateral reduces the size of the percentage at
the same PnL.
The percentage beside the account value divides unrealized PnL by the
current account value shown on the tab, multiplied by 100. GUM account tabs use
cross-position PnL and cross-account value. If all open positions are isolated,
a funded GUM cross account shows 0.00%.
The Jupiter Account tab includes the full unrealized PnL of its cross and
isolated positions. Its displayed account value is cross equity plus the
positive equity in each isolated account. For example, with $1,000 in cross
equity and one isolated account at −$50 equity carrying a −$150 open loss,
the tab shows $1,000 and −15.00%. Both tabs show a percentage only when
the displayed account value is at least $0.01. The calculation uses the
unrounded account value.
## Account health
**You're liquidated when your account value drops below the maintenance margin
plus the fees to close your positions**: the taker fee and the market's
[liquidation fee](/perps/liquidation). Account value is the sub-account's USD
plus unrealized PnL, including funding not yet paid.
The app shows this as **Liquidation risk**: above 95% it flags elevated risk,
and at 100% the sub-account can be liquidated. With isolated positions, it shows
whichever margin is closest to liquidation, because each one is liquidated on
its own.
## Liquidation price
The app shows an **estimated** liquidation price for each position, and a
preview in the order form. It assumes only that market's price moves, so
funding, other positions and transfers shift it. Liquidation itself is triggered
by your actual account value, checked on-chain. If the app shows **--**, no
liquidation price falls within the valid market range. The order form skips the
preview for markets with margin tiers, which is currently every market.
---
## Orders
URL: https://docs.gum.ag/perps/orders
Markdown: https://docs.gum.ag/perps/orders.md
Description: The order types and options GUM Perps supports, how big an order can be, and why an order can be rejected.
You can place market, limit and scale orders on every market. Each fill happens
at the price of the order already resting on the book.
## Time in force
Every order has a time in force: how long it stays open before whatever hasn't
filled is cancelled.
| Short name | Full name | What happens |
| ---------- | ------------------- | ----------------------------------------------------- |
| GTC | Good till cancelled | Rests on the book until it fills or you cancel it |
| IOC | Immediate or cancel | Fills what it can right away; the rest is cancelled |
| FOK | Fill or kill | Fills completely right away, or is cancelled entirely |
## Order types
| Order type | What it does | Time in force |
| ---------- | --------------------------------------------------------- | -------------------- |
| Market | Fills right away, within your slippage limit | IOC (default) or FOK |
| Limit | Fills at your price or better; the rest waits on the book | GTC |
| Scale | Places a ladder of limit orders across a price range | GTC, IOC or FOK |
- **Market:** anything that can't fill within your slippage setting (1% by
default, up to 4%) is cancelled.
- **Scale:** splits your size across 1 to 20 orders (5 by default), evenly
spaced in price. Sizes are equal unless you set **Size skew** to weight them
toward one end of the range.
## Order options
- **Post only** (limit and scale): only adds liquidity, so it always pays the
maker fee. It's rejected if any part would fill right away. Always GTC.
- **Reduce only:** can only make your current position smaller, so it never
opens a new position or reverses one. It can't be bigger than your position:
if you're long 1 BTC, a reduce-only sell for more than 1 BTC is rejected.
## Order size
- **Minimum:** $5 per order on-chain, including each order in a scale ladder.
The app also asks for at least $10 on market and limit orders. Reduce-only
orders skip the $10 minimum, but one under $5 must close your whole position.
- **Maximum:** each market caps order and position size, and the order form
shows your max order size. Open orders count toward the position cap.
## Price bands
GUM Perps rejects orders priced further from the
[mark price](/perps/overview#mark-price-and-last-price) than these bands. Limit
and post-only orders are checked on buys above the mark and sells below it;
market orders on their worst possible fill price.
| Order | JUP | All other markets |
| ------------------- | --- | ----------------- |
| Limit and post-only | 20% | 10% |
| Market | 10% | 5% |
A resting order that ends up outside its band is cancelled rather than filled.
## Self-trade prevention
If your order would match your own resting order in the same sub-account, GUM
Perps cancels the resting one and your new order carries on against other
orders.
## TP/SL
A take profit (TP) or stop loss (SL) closes some or all of a position you hold
once the price reaches a trigger you set. Setting one is free; when it
triggers, its order pays the taker fee.
| Position | Take profit triggers at | Stop loss triggers at |
| -------- | ----------------------- | --------------------- |
| Long | The trigger or above | The trigger or below |
| Short | The trigger or below | The trigger or above |
- **Trigger price:** the
[mark price](/perps/overview#mark-price-and-last-price) by default, or the
last price. A last-price TP/SL only counts trades made after you set or last
edited it.
- **Entry price:** a take profit must be on the profit side of your entry price
and a stop loss on the loss side. It's checked against your entry, not the
mark, so one that's already past the mark triggers right away.
- **Size:** a share of the position, a quantity, or a USD amount converted at
the trigger price. A share is worked out when it triggers, so it follows the
position as it grows or shrinks. A TP/SL never closes more than the position.
- **Limits:** up to 8 TP/SL per position. Your take profits together can't be
bigger than the position, and neither can your stop losses.
When it triggers, GUM Perps places a reduce-only order that fills right away
(IOC):
- **Market** (the default): goes ahead only if the book can close the whole
size within the market [price band](#price-bands). Otherwise GUM Perps tries
again, and cancels the TP/SL after 5 failed tries.
- **Limit:** fills at your limit price or better, and whatever can't fill right
away is cancelled. The limit can't be better than the trigger: at or below it
when closing a long, at or above it when closing a short.
A trigger isn't a guaranteed exit price. A market TP/SL fills at the prices
on the book, which can be worse than the trigger in a fast market.
A TP/SL ends when:
- it triggers and its order is placed, even if a limit order fills only partly
or not at all;
- the position is closed or reversed, which removes every TP/SL on it;
- a limit TP/SL's price is outside the price band when it triggers;
- it would close less than the $5 order minimum, and not the whole position.
When a TP/SL triggers, your reduce-only orders in that market that would no
longer fit the position are cancelled. Order history shows them as **Replaced
by take profit** or **Replaced by stop loss**.
While the sub-account is being liquidated, TP/SL don't trigger and you can't
add or edit them.
## Why an order is rejected
- It's below the minimum or above the maximum size, or would take your position
past its cap.
- Its price is outside the price band.
- It's post-only and would fill right away.
- It's reduce-only and you have no position, or it's bigger than your position.
- The sub-account already uses the other margin mode in that market. See
[Cross and isolated margin](/perps/margin-and-leverage#cross-and-isolated-margin).
- There isn't enough Available margin.
- The sub-account is being liquidated, or GUM Perps is under maintenance.
---
## Funding
URL: https://docs.gum.ag/perps/funding
Markdown: https://docs.gum.ag/perps/funding.md
Description: The hourly payments between longs and shorts that keep perp prices close to the oracle price.
Funding is a payment between traders on the same market. Perps never expire, so
funding is what keeps a perp's price close to the
[oracle price](/perps/overview#mark-price-and-last-price) of the asset.
- **When the rate is positive, longs pay shorts.** This happens when the perp
trades above the oracle price.
- **When the rate is negative, shorts pay longs.** This happens when the perp
trades below it.
GUM doesn't take a fee on funding.
## How the rate is set
The rate has two parts:
- **Premium:** how far the order book trades from the oracle price, averaged
over the current hour.
- **Interest:** a small baseline. When the book trades close to the oracle
price, the rate settles at this baseline.
Each market caps the rate in both directions. The rate is recalculated through
the hour.
## When it's paid
Funding is paid every hour, on the hour (UTC), on the size of the position you
hold at that moment. Each payment covers the whole hour before it, at that
hour's rate and mark price: a position held over the hour pays or receives the
full hour's funding, and one opened and closed between two hours pays none.
**Funding is added to or taken from your account value, so paying it moves you
closer to liquidation.**
## How the app shows it
- The chart header shows the current hourly rate and a countdown to the next
payment.
- The funding details also show the rate per 8 hours and annualized. You're
charged the hourly rate; the other two are for comparison.
- Your past payments appear in your funding history.
---
## Liquidation
URL: https://docs.gum.ag/perps/liquidation
Markdown: https://docs.gum.ag/perps/liquidation.md
Description: When GUM Perps closes your positions, what it costs, and how to avoid it.
If your account value falls too low to support your positions, GUM Perps closes
them for you. This is liquidation.
Liquidation can't be undone. You lose the price move up to the close, plus the
fees, and in a fast market the close can fill at worse prices.
## When it happens
**A sub-account is liquidated when its account value, at the
[mark price](/perps/overview#mark-price-and-last-price), drops below the
maintenance margin plus the fees to close its positions.** With cross margin,
the whole sub-account counts; with isolated margin, only that position's
margin. In the app, this is when **Liquidation risk** reaches 100%. See
[Account health](/perps/margin-and-leverage#account-health).
## Liquidation fee
Each close pays the taker fee plus a liquidation fee on the value closed, never
more than what's left in the sub-account.
## What happens
1. Your open orders are cancelled, except reduce-only ones. You can't place
orders, move USD out or change leverage until the liquidation ends.
2. Positions are closed with market orders on the order book, largest first.
A position above its market's first
[margin tier](/perps/margin-and-leverage#margin-tiers) goes first and is
closed one tier at a time.
3. After each close, once the sub-account is back above the threshold,
liquidation stops and any other positions stay open.
## How to avoid it
- **Add USD or reduce your positions** to move your liquidation price away.
- **Use less leverage.** For a cross position, lowering the setting alone
doesn't help.
- **Use isolated margin** for riskier trades.
- **Watch liquidation risk and funding.** Paying [funding](/perps/funding)
lowers your account value over time.
- **Plan around maintenance.** You can't trade, cancel orders or adjust margin
during a maintenance window, but your positions stay open.
If a liquidation looks wrong, open a ticket on
[Discord](https://discord.gg/gum-ag).
---
## Fees
URL: https://docs.gum.ag/fees
Markdown: https://docs.gum.ag/fees.md
Description: What GUM charges when you trade, trade perps, deposit, withdraw or send a gift, and what it doesn't.
## At a glance
| What you do | Fee |
| -------------------------------------- | ---------------------------------------------------------- |
| Trade tokens and stocks | 0.25% (25 bps) |
| Trade stablecoins and some Earn tokens | 0.07% (7 bps) |
| Trade on Robinhood Chain | 0.30% (30 bps) |
| Minimum spot trading fee | $0.01; $0.10 on BSC/Robinhood; $0.30–$3.00 on Ethereum |
| Trade perps | Maker 0.005%, taker 0.035% |
| Deposit into GUM | Free |
| Withdraw | $0.10–$0.60 ([rates by chain](#withdrawals)) |
| Send or claim a [gift](/funds/gifts) | Free |
| Gas | Unapplicable |
## Trading tokens and stocks
Each trade pays a percentage of its size or the chain's minimum fee, whichever
is larger.
| Trade | Rate |
| ------------------------------------------- | --------------- |
| Most tokens and stocks | 25 bps (0.25%) |
| Stablecoins and some Earn tokens | 7 bps (0.07%) |
| Any token on Robinhood Chain | 30 bps (0.30%) |
| Chain the token trades on | Minimum fee per trade |
| ------------------------------------- | --------------------- |
| Solana, Base, Arbitrum, Sui, HyperEVM | $0.01 |
| BSC, Robinhood Chain | $0.10 |
| Ethereum | $0.30 |
On Ethereum, the minimum can rise with network gas, up to $3.00. The fee comes
out of the USD you spend or receive. See [Trade tokens](/trade/tokens).
## Perps
Trading fees are charged on the value of each fill.
| Fee | Rate |
| ---------------------------------------------------- | ---------------- |
| Maker (your order rests on the book and gets filled) | 0.5 bps (0.005%) |
| Taker (your order fills immediately) | 3.5 bps (0.035%) |
Liquidation fees are charged on the value closed:
Funding is paid between traders, not to GUM. See [Funding](/perps/funding) and
[Liquidation](/perps/liquidation).
## Deposits
**Depositing into GUM is free.** When you send from your own wallet, that
wallet pays the sending network's usual fee. See [Deposit](/funds/deposit).
Apps that integrate [Universal Deposit](/universal-deposit/overview) pay its
own fee. See [Deposit costs](/universal-deposit/deposit-costs).
## Withdrawals
| Destination chain | Withdrawal fee |
| ------------------------------------- | -------------- |
| Solana, Base, Arbitrum, BSC, HyperEVM | $0.30 |
| Robinhood Chain | $0.50 |
| Ethereum | $0.60 |
| Sui | $0.10 |
The fee comes out of the amount you withdraw, which must be larger than the
fee. See [Withdraw](/funds/withdraw).
---
## Typed signatures and addresses
URL: https://docs.gum.ag/protocol/typed-signatures
Markdown: https://docs.gum.ag/protocol/typed-signatures.md
Description: How GUM Network accepts signatures from Ethereum wallets, passkeys, social sign-in and session keys, and how each one maps to a 32-byte address.
On Solana, only an Ed25519 key can sign a transaction. [GUM Network](/how-gum-works),
the chain GUM runs on, replaces each signature with a **typed signature**: a
one-byte type tag, followed by a payload in the format that tag defines.
Validators verify every supported scheme themselves, so an Ethereum wallet, a
passkey or a Google, Apple or X account can own a GUM Network account directly, the
basis of a [Universal Account](/accounts/universal-accounts). For the bytes of a
whole transaction, see [Transaction wire format](/protocol/wire-format).
## Signature types
| Tag | Name in code | Scheme | In the GUM app |
| ------ | ---------------------- | -------------------------------------------------------- | --------------------------------- |
| `0x00` | `Ed25519` | Ed25519, as on Solana | Solana wallets |
| `0x01` | `Secp256k1` | ECDSA on secp256k1 | — |
| `0x02` | `Secp256r1` | ECDSA on P-256 | — |
| `0x10` | `Secp256k1ETH` | Ethereum `personal_sign` (EIP-191) | EVM wallets |
| `0x20` | `Secp256r1Passkey` | WebAuthn passkey (P-256) | Passkeys |
| `0x40` | `OpenIDZK` | [OpenIDZK](/protocol/openidzk-proofs) sign-in | Google, Apple and X |
| `0x06` | `Delegation` | [Session key](#session-keys) | Sessions for wallets and passkeys |
| `0x60` | `SubAccountDelegation` | [Session key for a sub-account](#sub-account-delegation) | — |
Validators reject tag `0x04`, a retired OpenID signature without
zero-knowledge proofs.
### What each type signs and carries
- **`0x00`:** a 64-byte signature over the message bytes.
- **`0x01`, `0x02`:** the public key (33 bytes compressed or 65 uncompressed),
then `r` and `s` (32 bytes each), over SHA-256 of the message.
- **`0x10`:** the same payload as `0x01`, over
`keccak256("\x19Ethereum Signed Message:\n" ‖ length ‖ message)`, with the
length in decimal. This is standard `personal_sign`, so any EVM wallet signs
without changes. The typed signature drops the wallet's `v` and carries the
public key instead.
- **`0x20`:** the public key (64 bytes), authenticator data, client data JSON
and signature (64 bytes), verified as a WebAuthn assertion whose challenge is
SHA-256 of the message. The client data type must be `webauthn.get`, and the
authenticator must report user presence and user verification. It signs
`authenticatorData ‖ SHA-256(clientDataJSON)`.
- **`0x40`, `0x06`, `0x60`:** signed by a session key, covered below and in
[OpenIDZK proofs](/protocol/openidzk-proofs#signature-layout-and-size).
ECDSA signatures (`0x01`, `0x02`, `0x10`, `0x20`) must use the low-S form.
## Addresses
Every GUM Network address is 32 bytes. An Ed25519 signer's address is its public
key, so a Solana wallet keeps its base58 address on GUM Network. Every other type
uses a **typed address**:
```layout
bytes 0–29 digest, which depends on the type
byte 30 type tag
byte 31 bump
```
The bump is the smallest value, counting up from 0, that puts the 32 bytes off
the Ed25519 curve. So only the scheme named in byte 30 can sign for a typed
address, and the same key under two types gives two different addresses.
For `0x01`, `0x02`, `0x10` and `0x20`, validators recompute the address from
the public key in the signature and require the smallest bump. A signature can
only authorize the address its own key derives, so each sign-in method creates
its own account.
| Type | Bytes 0–29 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0x01`, `0x02`, `0x20` | The first 30 bytes of SHA-256 of the uncompressed public key (`x ‖ y`, 64 bytes) |
| `0x10` | Bytes 0–19: the Ethereum address, `keccak256(x ‖ y)[12..32]`. Bytes 20–29: `keccak256(ethereum_address)[20..30]`, a checksum |
| `0x40` | The first 30 bytes of `SHA-256(authority_account ‖ sub ‖ salt)`, proven inside the zero-knowledge proof. See [OpenIDZK proofs](/protocol/openidzk-proofs#the-address-and-its-salt) |
| `0x60` | Bytes 0–19: the first 20 bytes of the parent address. Bytes 20–29: a label of 1 to 10 bytes, padded with zeros |
### Worked example: an Ethereum address
The Ethereum address `0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed` maps to this
GUM Network address:
```layout
bytes 0–19 5aaeb6053f3e94c9b9a09f33669435e7ef1beaed the Ethereum address
bytes 20–29 4b9e849aa48d4d35f740 keccak256(address)[20..30]
byte 30 10 Secp256k1ETH
byte 31 03 bumps 0, 1 and 2 are on the curve
base58 76zD55PjRdoDgfapMXpm1gdPy3XDt1pN595fybzQCuia
```
Because the Ethereum address sits in the first 20 bytes, you can derive the
GUM Network address from an Ethereum address alone, and read the Ethereum address
back out.
## Session keys
To avoid a wallet or passkey prompt for every transaction, your device creates
an Ed25519 **session key** with an expiry slot (slots are GUM Network's unit of block
time). Your wallet or passkey authorizes it once by signing a nonce derived from
the session public key and expiry slot. Each transaction then carries a `0x06`
signature, and validators verify your authorization against your address and
the session signature against the message.
```layout
Delegation (0x06) payload
32 bytes session public key (Ed25519)
8 bytes expiry slot, u64 little-endian
64 bytes session key's signature over the message
compact-u16 length of your authorization
n bytes your authorization: a typed signature (tag and payload) over the nonce
```
- The signer slot in the transaction holds **your** address, not the session
key's.
- Your authorization can be an Ed25519, secp256k1, P-256, Ethereum or passkey
signature. OpenIDZK signatures don't need `0x06`: each one already carries
its own session key and expiry.
- A session is valid while the current slot is below its expiry slot, which
the GUM app sets about two weeks ahead.
**A session can do anything your account can, and it can't be revoked before it
expires.**
## Sub-account delegation
A sub-account is a second address derived from yours and a short label (the
`0x60` row under [Addresses](#addresses)). A `0x60` signature works like
`0x06`, except:
- The session key can only act for that one sub-account: your authorization
covers a nonce that commits to the session key, expiry slot and sub-account
address.
- The payload ends with the parent's 32-byte address. Validators check that
the sub-account shares its first 20 bytes, carries tag `0x60` and uses the
smallest bump.
- The parent can also be an OpenIDZK account. The session then ends at
whichever expiry slot comes first: the sub-account session's or the
OpenIDZK session's.
These protocol sub-accounts are separate from
[GUM Perps sub-accounts](/perps/accounts).
## Planned: multi-factor accounts and recovery
Linking sign-in methods to one account, 2FA and recovery are planned through a
future User Program, not available yet. Validators don't accept a User
signature type today.
---
## OpenIDZK proofs
URL: https://docs.gum.ag/protocol/openidzk-proofs
Markdown: https://docs.gum.ag/protocol/openidzk-proofs.md
Description: How a Google, Apple or X sign-in becomes a GUM Network signature: the nonce binding, the address salt, the Groth16 proof and the checks validators run.
OpenIDZK lets a Google, Apple or X account sign GUM Network transactions with a
`0x40` [typed signature](/protocol/typed-signatures). The provider signs a login
token, an OpenID Connect ID token, that commits to a session key on your device.
GUM's sign-in services check your login token when you sign in, return your
address salt and generate a zero-knowledge proof. The proof shows validators
that the token is genuine and ties the session key to your address, without
revealing the token. **Your email and social account ID never go on-chain, and
GUM doesn't store them.** For a plain-language overview, see
[Private social login](/accounts/openidzk).
## The nonce binding
The provider copies the OpenID Connect `nonce` into the token it signs. Your
device sets it to:
```formula
nonce = base64url( SHA-256( session_pubkey ‖ exp_slot ‖ user_rand ) )
```
| Input | Size | What it is |
| ---------------- | -------------------------- | ------------------------------------- |
| `session_pubkey` | 32 bytes | The session key's Ed25519 public key |
| `exp_slot` | 8 bytes, u64 little-endian | The slot at which the session expires |
| `user_rand` | 8 bytes, u64 little-endian | A random value chosen at sign-in |
The nonce is 43 base64url characters, without padding. Because the provider's
signature covers it, the token authorizes exactly this session key until this
slot.
## The address and its salt
```formula
digest = SHA-256( authority_account ‖ sub ‖ salt )
address = digest[0..30] ‖ 0x40 ‖ bump
```
| Input | What it is |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `authority_account` | A 32-byte account in GUM Network's OpenID registry for one provider and one client ID (`aud`). It lists that provider's registered signing keys. |
| `sub` | The provider's ID for your account, taken from the token and padded with zeros to 256 bytes |
| `salt` | Returned by GUM's salt service for your account |
| `bump` | The smallest value that puts the address off the Ed25519 curve, as for every [typed address](/protocol/typed-signatures#addresses) |
The salt keeps your address unlinkable to your social account: without it,
anyone who knew your provider account ID could hash it with the public
authority account and find your address. The salt service returns the same salt
each time you sign in with the same account, so the same sign-in derives the
same address. Each provider has its own authority account, so Google, Apple and
X sign-ins give different addresses, even for the same person.
## The proof
The proof is a 256-byte Groth16 proof on the BN254 curve: point A (G1, 64
bytes), point B (G2, 128 bytes) and point C (G1, 64 bytes), all uncompressed.
It shows that the prover knows an ID token for which:
1. The RS256 signature is valid under the public RSA-2048 modulus, with
exponent 65537.
2. The `nonce` claim equals the nonce hash above, for the public session key
and expiry slot.
3. The `aud` claim equals the public `aud`.
4. The first 30 bytes of `SHA-256(authority_account ‖ sub ‖ salt)`, with `sub`
read from the token, equal the first 30 bytes of the public address.
The token's header and payload, its RSA signature, `sub`, `user_rand` and the
salt are private inputs: the proof doesn't reveal them, and none goes on-chain.
The token's header and payload can be up to 1,524 bytes in base64url, and the
decoded payload up to 1,143 bytes.
Validators rebuild all 29 public inputs, each a BN254 field element, from the
signature and the signer's address, so a proof only verifies for the address
it was made for.
## What validators check
1. **Signature verification.** The signature is at most 816 bytes. The
signer's address carries tag `0x40` in byte 30 and the smallest bump. The
Groth16 proof verifies against the rebuilt public inputs, and the session
key's Ed25519 signature verifies over the message.
2. **Expiry.** The transaction is rejected once the current slot reaches
`exp_slot`.
3. **Registry.** The authority account must exist and belong to the OpenID
registry program. The `aud` registered on it must equal the signature's
`aud`, and the hash of the signature's RSA key must be one of the keys it
lists.
Validators read provider keys from the on-chain registry, never from the
provider. When a provider rotates its signing keys, the registry follows, and
sessions proven with a retired key stop verifying. The GUM app then asks you to
sign in again.
## Signature layout and size
```layout
OpenIDZK (0x40) signature
1 byte tag, 0x40
32 bytes authority_account
1 byte key spec, 0 = RSA with RS256
2 + 256 bytes RSA modulus, with a compact-u16 length
1–2 + n bytes aud, with a compact-u16 length, n ≤ 160
2 + 256 bytes Groth16 proof, with a compact-u16 length
32 bytes session_pubkey
8 bytes exp_slot, u64 little-endian
64 bytes session key's Ed25519 signature over the message
```
The signature is 655 bytes plus the length of `aud`, or one byte more when
`aud` is longer than 127 bytes, up to 816 bytes. A typical Google client ID is
72 bytes, which gives a 727-byte signature. See
[Transaction wire format](/protocol/wire-format).
## Providers
| Provider | Where the ID token comes from |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Google | Google's OpenID Connect sign-in |
| Apple | Sign in with Apple. New Apple sign-ups are paused during an Apple sign-in migration. |
| X | X has no native OpenID Connect, so a GUM-run OpenID bridge signs you in with X and issues an RS256 ID token that carries your nonce. Its `sub` is a hash of your X user ID, not the ID itself. |
---
## Transaction wire format
URL: https://docs.gum.ag/protocol/wire-format
Markdown: https://docs.gum.ag/protocol/wire-format.md
Description: The byte layout of a GUM Network transaction: typed signature records in front of an unchanged Solana legacy message, and the Solana features GUM Network removes.
A GUM Network transaction is an unchanged Solana legacy message with typed signature
records in front. **Standard Solana SDKs can't build or parse GUM Network
transactions**: they write bare 64-byte Ed25519 signatures, without the length
and tag GUM Network requires. For the signature types, see
[Typed signatures and addresses](/protocol/typed-signatures).
## How it differs from Solana
| | Solana | GUM Network |
| ---------------------------------- | -------------------- | ----------------------------------------------------------------------- |
| Signature schemes | Ed25519 only | Eight, identified by a type tag |
| One signature on the wire | 64 bytes | Length, tag and payload: 66 bytes for Ed25519 |
| Maximum transaction size | 1,232 bytes | 12,320 bytes |
| Message formats | Legacy and v0 | Legacy, plus a batched format for GUM batch transactions |
| Address lookup tables | Yes, in v0 messages | No |
| Durable nonces | Yes | No |
| Signature-verification precompiles | Ed25519, secp256k1 | None |
| Transaction ID | The first signature | Derived from the first signature, see [Transaction ID](#transaction-id) |
## Layout
```layout
compact-u16 n, the number of signatures
n records, each:
compact-u16 L, the record length (1 + payload length)
u8 type tag
L − 1 bytes payload
message Solana legacy message, byte for byte
```
- `n` must equal the message's required signature count, its first byte.
- Record _i_ signs for account key _i_ of the message, which for typed signers
is a [typed address](/protocol/typed-signatures#addresses). Every record is
verified against the serialized message.
- Tools may mark an unsigned slot with a single `0x00` length byte, but
validators reject a transaction until every slot is signed.
**compact-u16** is Solana's variable-length integer (shortvec): 7 bits per
byte, lowest first, top bit set when another byte follows. Values up to 127
take one byte.
### The message
```layout
u8 required signature count
u8 read-only signed account count
u8 read-only unsigned account count
compact-u16 account count, then 32 bytes per account key, signers first
32 bytes recent blockhash
compact-u16 instruction count, then the instructions
```
The first byte must be below `0x80`, or `0x81` for GUM Network's batched format,
which only approved senders can submit.
## Worked example: one Ed25519 signer
```layout
offset bytes meaning
0 01 1 signature
1 41 record length 65
2 00 tag 0x00, Ed25519
3–66 64 bytes Ed25519 signature over the message
67– … Solana legacy message
```
## Record sizes
| Type | Record: tag and payload | On the wire, with length |
| --------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| Ed25519 `0x00` | 65 bytes | 66 bytes |
| Secp256k1 `0x01`, Secp256r1 `0x02`, Ethereum `0x10` | 98 bytes with a compressed key, 130 with an uncompressed key | 99 or 132 bytes |
| Passkey `0x20` | 249 bytes or more, depending on the WebAuthn data | 251 bytes or more |
| OpenIDZK `0x40` | 655 bytes plus the `aud` length, at most 816 | 657 bytes plus the `aud` length, at most 818 |
| Delegation `0x06` | 105 bytes, plus the authorization and its length | 173 bytes with an Ed25519 authorization, 239 with an Ethereum one |
| Sub-account delegation `0x60` | As `0x06`, plus 32 bytes | 205 bytes with an Ed25519 authorization, 271 with an Ethereum one |
For an OpenIDZK `aud` longer than 127 bytes, add one byte. See
[OpenIDZK proofs](/protocol/openidzk-proofs#signature-layout-and-size).
## Transaction ID
A transaction's ID comes from its first signature and is written in base58:
- **Ed25519:** the 64-byte signature itself, as on Solana.
- **Every other type:** the SHA-512 hash of the typed signature bytes, tag
included, also 64 bytes.
## Removed Solana features
| Feature | On GUM Network |
| ------------------------------------- | ------------------------------------------------------------------------------------------------- |
| v0 messages and address lookup tables | Rejected, and there's no address lookup table program. List every account in the message itself. |
| Durable nonces | Every nonce instruction in the System Program fails. Use a recent blockhash. |
| Signature-verification precompiles | Not installed. Use typed signatures instead. |
---
## Overview
URL: https://docs.gum.ag/universal-deposit/overview
Markdown: https://docs.gum.ag/universal-deposit/overview.md
Description: Get dollars to any supported chain. Send USDC, USDT, USDG — or a supported token — on whichever chain you like; swapping and bridging are handled for you.
import { CardGroup_1 } from "../../components/universal-deposit/overview/CardGroup_1.jsx";
import { AccordionGroup_1 } from "../../components/universal-deposit/overview/AccordionGroup_1.jsx";
The preview is the real widget on mainnet. For generated deposit addresses,
send only the network's dollar token (USDC; USDT on BSC, USDG on Robinhood),
or a token the widget lists for that network, and meet the applicable
minimum — unsupported tokens are **not recoverable**.
## Two ways to integrate
## Supported chains
| Chain | Chain ID | Dollar token | Address format | Explorer |
| --------- | -------- | ------------ | ---------------------------------------------- | ---------------------------------------------------------------------- |
| Solana | `900` | USDC | Solana wallet address (base58, 32-byte pubkey) | [solscan.io](https://solscan.io) |
| Ethereum | `1` | USDC | EVM address (`0x…`, 40 hex chars) | [etherscan.io](https://etherscan.io) |
| Base | `8453` | USDC | EVM address (`0x…`, 40 hex chars) | [basescan.org](https://basescan.org) |
| Arbitrum | `42161` | USDC | EVM address (`0x…`, 40 hex chars) | [arbiscan.io](https://arbiscan.io) |
| BSC | `56` | USDT | EVM address (`0x…`, 40 hex chars) | [bscscan.com](https://bscscan.com) |
| Robinhood | `4663` | USDG | EVM address (`0x…`, 40 hex chars) | [robinhoodchain.blockscout.com](https://robinhoodchain.blockscout.com) |
| Sui | `101` | USDC | Sui address (`0x…`, 64 hex chars) | [suivision.xyz](https://suivision.xyz) |
The **dollar token** is what a chain settles in: it's the token you send when
depositing from that chain without a swap, and the token that lands when that
chain is the destination. Any supported chain can be the destination or the
source.
Send only the chain's dollar token or a token listed as quotable by the
[token APIs](/universal-deposit/api-reference/overview#building-a-token-picker),
using the exact token address the API returns. Unsupported tokens sent to a
deposit address or tokens sent to the wrong chains are not recoverable.
## FAQ
---
## Embed the widget
URL: https://docs.gum.ag/universal-deposit/embed
Markdown: https://docs.gum.ag/universal-deposit/embed.md
Description: One iframe. Hand it a destination and it handles deposit addresses, QR codes, and wallet transfers.
import { Card_1 } from "../../components/universal-deposit/embed/Card_1.jsx";
import { Accordion_1 } from "../../components/universal-deposit/embed/Accordion_1.jsx";
One `