Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
28c3f1f
docs(x402): the overview covers metered routes and agent clients
Joh077 Nov 4, 2026
d35b8ac
docs(x402): the merchant quickstart covers metered routes and handler…
Joh077 Nov 4, 2026
4d07ae8
docs(x402): the concepts page covers metered usdc, the gas quota and …
Joh077 Nov 4, 2026
9dbc2f7
docs(x402): the verify and settle page covers route v and slow handlers
Joh077 Nov 4, 2026
f4cf522
docs(x402): the schemas page covers permit2 entries and the full receipt
Joh077 Nov 4, 2026
ab5db3f
docs(x402): the webhooks page adds the facilitator's payment lookup
Joh077 Nov 4, 2026
f627c5a
docs(x402): the api reference covers metered usdc and the facilitator…
Joh077 Nov 4, 2026
37636ed
docs(x402): the error codes cover the permit2 refusals and the 64 kb …
Joh077 Nov 4, 2026
8e6a688
docs(x402): the agent quickstart covers x402-fetch 0.5.2 and metered …
Joh077 Nov 4, 2026
0bbedb0
docs(mcp): the mcp page covers the stateless endpoint and its real wa…
Joh077 Nov 4, 2026
2d687eb
docs(mcp): trim the mcp page back to its corrections
Joh077 Nov 4, 2026
ba4c591
docs(mcp): the tools page drops the fee share figure and the price im…
Joh077 Nov 4, 2026
57fb0d6
docs(mcp): the transactions page corrects the response shapes and the…
Joh077 Nov 4, 2026
dffdb0d
docs(cli): the wallet model covers pay engine, --address and pay prepare
Joh077 Nov 4, 2026
ffa4a04
docs(cli): drop the inert global flags and correct three error rows
Joh077 Nov 4, 2026
087d235
docs(security): the x402 risks match the metered routes, gas and mcp …
Joh077 Nov 4, 2026
fa389db
docs(x402): the escrow approval is renewed once payments use it up
Joh077 Nov 4, 2026
ef1dc32
Merge remote-tracking branch 'origin/docs/coinbase-migration-page' in…
Joh077 Nov 4, 2026
49321af
docs(x402): align the pages with x402 0.10.1
Joh077 Nov 6, 2026
3602b3f
docs(x402): note the route key check and the normalized matching of 0…
Joh077 Nov 6, 2026
82c9ce7
docs(x402): note the Next.js cookies on a refusal and the HANDLER_TIM…
Joh077 Nov 6, 2026
4a94377
docs(agents): the verify refusals of every route since the settle is …
Joh077 Nov 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/pages/agents/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Global flags, available across commands:
| `--dry-run` | | Build the transaction without signing or broadcasting |
| `--wallet [path\|env]` | `-w` | Sign and broadcast — see [the wallet model](/agents/cli#the-wallet-model) |
| `--address <0x…>` | | Simulate a write for a real account without a wallet — works on swap, savings, staking and bridge write commands |
| `--no-cache` | | Bypass the read cache and force a fresh RPC call |
| `--verbose` | `-v` | Verbose logs |

## Protocol data

Expand Down Expand Up @@ -143,10 +141,10 @@ Failures exit 1 and print `Error [CODE]: message`. In JSON mode the envelope `{
| `INVALID_AMOUNT` | Negative, zero, malformed or sub-decimal amount |
| `UNKNOWN_CHAIN` | Chain identifier not recognised |
| `CHAIN_SUNSET` | Operation not available on a sunset chain |
| `PARALLELIZER_NOT_DEPLOYED` | Mint, redeem and savings need a chain with a Parallelizer |
| `PARALLELIZER_NOT_DEPLOYED` | Mint and redeem need a chain with a Parallelizer |
| `COLLATERAL_NOT_SUPPORTED` | Collateral (or bridge token) not accepted on this chain |
| `EXCEEDS_CAP` | Mint or redeem beyond the collateral's deposited capacity — the message carries the remaining capacity |
| `EXCEEDS_BRIDGE_LIMIT` | Daily or global bridge limit reached — the message carries the reset time |
| `EXCEEDS_CAP` | Mint beyond the collateral cap, or redeem beyond what is deposited — the message carries the remaining capacity |
| `EXCEEDS_BRIDGE_LIMIT` / `EXCEEDS_GLOBAL_LIMIT` | Daily or global bridge limit reached — the message carries the daily capacity left, or the global limit |
| `ROUTE_UNAVAILABLE` | The bridge route does not exist (same chain, or no bridgeable token on the destination), or `pay prepare` cannot sign for the token: its signing domain matches no known version |
| `PARTIAL_READ` | Some chain reads failed and the aggregate would be wrong — retry shortly |
| `INSUFFICIENT_BALANCE` | Wallet balance too low for the requested amount |
Expand Down
4 changes: 2 additions & 2 deletions src/pages/agents/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Requires Node.js ≥ 22. The package is MIT-licensed.
```bash
parallel protocol overview # TVL, USDp supply, savings APY, solvency ratio
parallel protocol tvl --chain base
parallel savings rate # protocol-wide sUSDp APY (~12% at the time of writing)
parallel savings rate # protocol-wide sUSDp APY
```

Optionally, set your defaults once — `parallel config init` walks you through it and writes `~/.parallel/config.toml`.
Expand All @@ -52,7 +52,7 @@ Success envelopes print to stdout; error envelopes print to stderr, so stdout st

## The wallet model

The CLI never looks for a key unless you pass `--wallet`. Without it, nothing signs: add `--dry-run` to any transaction command and it prints the full unsigned transaction (add `--address <addr>` to simulate for a real account instead of the zero address); with neither `--wallet` nor `--dry-run`, the command refuses with `WALLET_REQUIRED`.
The CLI never looks for a key unless you pass `--wallet`, or run `pay engine`, which signs with `$PARALLEL_PRIVATE_KEY`. Without it, nothing signs: add `--dry-run` to any transaction command and it prints the full unsigned transaction (add `--address <addr>` to simulate for a real account instead of the zero address, which also prints it without `--dry-run`). With none of `--wallet`, `--dry-run` or `--address`, the command refuses with `WALLET_REQUIRED`. `pay prepare` never refuses: without a wallet it prints an unsigned payload.

| You run | What happens |
|---|---|
Expand Down
8 changes: 4 additions & 4 deletions src/pages/agents/mcp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Total TVL, USDp supply, the savings APY and the proof-of-solvency ratio, in one
What's the current sUSDp savings rate?
```

The live protocol-wide APY (around 12% at the time of writing), the exchange rate and total deposits per chain.
The live protocol-wide APY, the exchange rate and total deposits per chain.

```
Quote me a mint of 500 USDp with USDC on Base
Quote me a mint of USDp with 500 USDC on Base
```

Expected output, fees and price impact — a read, nothing to sign.
Expected output, fees and oracle price — a read, nothing to sign.

```
Deposit 100 USDp into savings on Base, receiver 0xYourAddress
Expand All @@ -70,7 +70,7 @@ An unsigned transaction (plus an approval if needed) ready to review and sign in
|---|---|
| Reads on-chain data through public RPCs | — |
| Builds and simulates unsigned transactions | Reviews, signs and submits every transaction |
| Warns before risky operations (slippage, penalties, lost boosts) | Decides |
| Warns before risky operations (failed simulations, unstake penalties, lost boosts, sunset chains) | Decides |
| Holds no keys, no funds, no user accounts | Holds the keys |

The endpoint is public and unauthenticated by design: there is nothing to steal and nothing to configure.
Expand Down
8 changes: 4 additions & 4 deletions src/pages/agents/mcp/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { HelpFooter } from '@/components/HelpFooter'
| `get_supported_chains` | The 24 chains USDp is deployed on, with status and contract addresses (Sonic is flagged sunset — mint, redeem and savings were wound down there under PIP-64, while USDp, bridging and balance reads stay live) |
| `get_supported_collaterals` | Collaterals accepted on a chain, with caps, utilization and mint/redeem status |
| `get_fee_rates` | Adaptive mint/redeem fees per collateral — can be negative (incentives) |
| `get_savings_rate` | The protocol-wide sUSDp APY (7d/30d/90d), exchange rate and total deposits, with `feeShare`: the share of the protocol surplus not kept by the DAO Treasury, read on-chain (90% today), or `null` when that read fails |
| `get_savings_rate` | The protocol-wide sUSDp APY (7d/30d/90d), exchange rate and total deposits, with `feeShare`: the share of the protocol surplus not kept by the DAO Treasury, read on-chain, or `null` when that read fails |
| `get_proof_of_solvency` | Total backing vs USDp supply — the canonical solvency ratio, per chain |

## Savings (sUSDp)
Expand All @@ -44,7 +44,7 @@ import { HelpFooter } from '@/components/HelpFooter'

| Tool | What it does |
|---|---|
| `get_quote` | Exact mint or redeem quote: output, fees, price impact — read-only |
| `get_quote` | Exact mint or redeem quote: output, fees, oracle price — read-only |
| `mint` | Builds a mint of USDp from a collateral (`collateral`, `amount`, `chain`, `receiver`, `slippageTolerance?`) |
| `redeem` | Builds a redemption of USDp into one collateral |
| `redeem_proportional` | Builds a redemption into the whole collateral basket, market-neutral |
Expand All @@ -70,15 +70,15 @@ import { HelpFooter } from '@/components/HelpFooter'
| `unstake` | On the `chain` that holds the position. With `amount`: builds the cooldown start. Without: builds the withdrawal of matured requests |
| `claim_rewards` | Builds reward claims for sPRL1/sPRL2 on Base, paid in USDp, plus one on Polygon, paid in PAR, for the epochs published before the move to Base that can still be claimed |

New stakes go to Ethereum or Base: sPRL1, and the sPRL2 v2 vault, which replaced the paused v1 vault on Ethereum. sPRL1 on Polygon and Sonic is being sunset: a stake there is refused with `CHAIN_SUNSET`, while unstaking and withdrawing stay open and carry a `STAKING_SUNSET` warning. Every staking APR comes with an `aprNote`: a 0.00% means the last epoch distributed no rewards, not that a vault pays none.
New stakes go to Ethereum or Base: sPRL1, and the sPRL2 v2 vault, which replaced the paused v1 vault on Ethereum. sPRL1 on Polygon and Sonic is being sunset: the `stake` tool does not accept them, while unstaking and withdrawing stay open and carry a `STAKING_SUNSET` warning. Every staking APR comes with an `aprNote`: a 0.00% means the last epoch distributed no rewards, not that a vault pays none.

## Governance

| Tool | What it does |
|---|---|
| `get_proposals` | Snapshot proposals (PIP/PGP/PIR), filterable by type and status |
| `get_proposal_details` | One proposal in full, votes and result included |
| `get_protocol_parameters` | Contract addresses, governance roles, fees, collateral caps, bridge limits and `savingsFeeShare` (90% today, read on-chain, `null` when that read fails), in one JSON answer |
| `get_protocol_parameters` | Contract addresses, governance roles, fees, collateral caps, bridge limits and `savingsFeeShare` (read on-chain, `null` when that read fails), in one JSON answer |

## Agent payments (x402)

Expand Down
14 changes: 7 additions & 7 deletions src/pages/agents/mcp/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { HelpFooter } from '@/components/HelpFooter'

# How transactions work

The server prepares; **your wallet decides**. No write tool signs, broadcasts or custodies anything — each returns an **unsigned** transaction object you inspect, sign and submit yourself (from a wallet, a script, or an agent runtime).
The server prepares; **your wallet decides**. No write tool signs, broadcasts or custodies anything — each returns **unsigned** data you inspect, sign and submit yourself (from a wallet, a script, or an agent runtime).

## The transaction object

Every write tool returns the same shape — raw calldata, no signature anywhere in it:
The Parallelizer, savings and bridge tools return this shape — raw calldata, no signature anywhere in it:

```json
{
Expand All @@ -27,7 +27,7 @@ Every write tool returns the same shape — raw calldata, no signature anywhere

- `to`, `data`, `value`, `chainId` — pass them to your wallet as-is.
- `gas` is a best-effort estimate; it can be absent (for `bridge` the field is named `gasEstimate`). Never block on it — your wallet estimates anyway.
- Most tools return a single `tx` (plus an `approvalTx` when needed). Some staking flows return more: `stake` for sPRL2 returns an `approvalTxs` array and a `txs` array, and `claim_rewards` returns a `txs` array that can span several chains. Check whether you got `tx` or `txs`, and check each transaction's `chainId` before sending.
- `stake` for sPRL1 and `unstake` nest it under `tx`. Some staking flows return more: `stake` for sPRL2 returns an `approvalTxs` array and a `txs` array, and `claim_rewards` returns a `txs` array that can span several chains. Check whether you got `tx` or `txs`, and check each transaction's `chainId` before sending.

## Approvals

Expand All @@ -45,7 +45,7 @@ The approval is **bounded**: the calldata grants exactly `approvalAmount` — th

## Pre-flight simulation

Every write is statically simulated before it reaches you:
Every transaction is statically simulated before it reaches you:

- `simulation.success: false` comes with a `revertReason`. When the response bundles an `approvalTx`, a revert on allowance is the expected pre-approval state and is flagged `PENDING_APPROVAL` with severity `info` — submit the approval first, then the transaction. Any other revert is flagged `SIMULATION_FAILED` with severity `error`: the transaction would fail on-chain, don't send it.
- `warnings[]` also surfaces business risks before you sign: an sPRL1 early-unstake penalty (`EARLY_UNSTAKE_PENALTY`), a ParaBoost about to be lost on unstake (`PARABOOST_LOST`) or locked on stake (`PARABOOST_LOCK`), or an unstake on Polygon or Sonic, where staking is being sunset (`STAKING_SUNSET`).
Expand All @@ -54,19 +54,19 @@ Each warning has a `severity` (`info`, `warning`, `error`) and a human-readable

## When the server refuses

Impossible operations fail with a structured error code instead of doomed calldata: a sunset chain (`CHAIN_SUNSET`), a chain without a Parallelizer deployment (`PARALLELIZER_NOT_DEPLOYED`), a redeem or mint beyond the deposited collateral (`EXCEEDS_CAP`, with the remaining capacity), a bridge route that does not exist (`ROUTE_UNAVAILABLE` — same-chain, or a destination without a bridgeable token), a bridge amount above the daily capacity (`EXCEEDS_BRIDGE_LIMIT`, with the reset time), or an unknown collateral (`COLLATERAL_NOT_SUPPORTED`, with the valid list).
Impossible operations fail with a structured error code instead of doomed calldata: a sunset chain (`CHAIN_SUNSET`), a chain without a Parallelizer deployment (`PARALLELIZER_NOT_DEPLOYED`), a mint beyond the collateral cap or a redeem beyond the deposited collateral (`EXCEEDS_CAP`, with the remaining capacity), a bridge route that does not exist (`ROUTE_UNAVAILABLE` — same-chain, or a destination without a bridgeable token), a bridge amount above the daily capacity (`EXCEEDS_BRIDGE_LIMIT`, with the reset time), or an unknown collateral (`COLLATERAL_NOT_SUPPORTED`, with the valid list).

## Partial reads

Multi-chain aggregates never fake completeness. When a chain read fails, the response carries `partial: true` and a `failedChains` list, and the totals exclude those chains — a lower bound, never a silently amputated number. Partial results are also never cached, so the next call retries the failed chains.

Some reads go further and refuse to answer at all rather than mislead — `get_proof_of_solvency` (a ratio computed on incomplete data could declare the protocol insolvent when it is not) and the savings rate reads, whose partial answer would be structurally wrong. These fail with a `PARTIAL_READ` error naming the chains that could not be read.
Some reads go further and refuse to answer at all rather than mislead — `get_proof_of_solvency` (a ratio computed on incomplete data could declare the protocol insolvent when it is not) and the savings rate reads when Ethereum, which the APY is computed on, cannot be read. These fail with a `PARTIAL_READ` error naming the chains that could not be read.

**How to handle it:** `PARTIAL_READ` is transient — a retry a few seconds later usually succeeds. If it persists, `parallel_health_check` tells you which chain's RPCs are down.

## Data freshness

Read tools cache briefly: savings and exchange rates 30 s, TVL/supply/staking 60 s, collaterals and fees 120 s, chain list 5 min. Bridge status and history are always live. If an RPC degrades, the server serves the last known value for up to 10 minutes rather than failing.
Read tools cache briefly: savings and exchange rates 30 s, TVL/supply/staking 60 s, collaterals and fees 120 s. Bridge status and history are always live. If an RPC degrades, the server serves the last known value for up to 10 minutes rather than failing.

## Next steps

Expand Down
2 changes: 1 addition & 1 deletion src/pages/agents/recipes/migrate-from-coinbase-x402.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ app.use(paymentMiddleware({
}));
```

Install `@parallel-protocol/x402` 0.10.0 or later. It is the first version that takes payments from Coinbase x402 clients, on metered routes. A version before 0.8.0 no longer settles anything: since 1 October 2026 the facilitator refuses a settle that does not present the token it issued at verify. Version 0.8.1 adds the URL checks below.
Install `@parallel-protocol/x402` 0.10.1 or later. Version 0.10.0 is the first that takes payments from Coinbase x402 clients, on metered routes, and 0.10.1 stops a request from reaching a paid route unpaid through another form of its path. A version before 0.8.0 no longer settles anything: since 1 October 2026 the facilitator refuses a settle that does not present the token it issued at verify. Version 0.8.1 adds the URL checks below.

Keep the facilitator's URL in https, as above. Since 0.8.1, the SDK refuses a plain http URL outside `localhost`, `127.0.0.1` and `[::1]` with an `X402ConfigError` when the middleware is created. It calls that address only and never follows a redirect, which fails the call with `FACILITATOR_UNAVAILABLE`.

Expand Down
Loading