Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 12 additions & 13 deletions docs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ description: Look up Base documentation with a compact directory-grouped index b
- [Apps](./apps/llms.txt) — A step-by-step guide to building a Next.js tally app on Base using wagmi and viem, with wallet connection, contract reads and writes, and batch transaction support.
- [Base Account](./base-account/llms.txt)
- [Base Chain](./base-chain/llms.txt) — Start here for Base Chain docs, including concepts, network reference, node operation, APIs, and protocol specifications.
- [Docs](./docs/llms.txt)
- [Get Started](./get-started/llms.txt)
- [Ledgers](./ledgers/llms.txt) — An introduction to Base Ledgers, the enterprise way to run confidential payments that settle on Base.
- [Static](./static/llms.txt)
Expand Down Expand Up @@ -80,7 +81,7 @@ npx skills add base/base-skills
|base-chain/api-reference/ethereum-json-rpc-api:eth_blockNumber,eth_call,eth_chainId,eth_estimateGas,eth_feeHistory,eth_gasPrice,eth_getBalance,eth_getBlockByHash,eth_getBlockByNumber,eth_getBlockReceipts,eth_getBlockTransactionCountByHash,eth_getBlockTransactionCountByNumber,eth_getCode,eth_getLogs,eth_getStorageAt,eth_getTransactionByBlockHashAndIndex,eth_getTransactionByBlockNumberAndIndex,eth_getTransactionByHash,eth_getTransactionCount,eth_getTransactionReceipt,eth_maxPriorityFeePerGas,eth_sendRawTransaction,eth_subscribe,eth_syncing,eth_unsubscribe,net_version,web3_clientVersion
|base-chain/api-reference/flashblocks-api:base_transactionStatus,eth_simulateV1,flashblocks-api-overview,newFlashblockTransactions,newFlashblocks,pendingLogs
|base-chain/flashblocks:faq
|base-chain/network-information:base-contracts,base-solana-bridge,bridging-and-withdrawals,configuration-changelog,ecosystem-bridges,network-faucets,network-fees,throughput-and-limits,transaction-finality,transaction-ordering,troubleshooting-transactions
|base-chain/network-information:b20-token-standard,base-contracts,base-solana-bridge,bridging-and-withdrawals,configuration-changelog,ecosystem-bridges,native-account-abstraction,network-faucets,network-fees,throughput-and-limits,transaction-finality,transaction-ordering,troubleshooting-transactions
|base-chain/node-operators:node-providers,performance-tuning,run-a-base-node,snapshots,troubleshooting
|base-chain/quickstart:connecting-to-base
|base-chain/security:avoid-malicious-flags,bug-bounty,report-vulnerability,security-council
Expand All @@ -91,21 +92,19 @@ npx skills add base/base-skills
|base-chain/specs/protocol/execution:index
|base-chain/specs/protocol/execution/evm:precompiles,predeploys,preinstalls
|base-chain/specs/protocol/proofs:challenger,contracts,index,proposer,registrar,tee-prover,zk-prover
|base-chain/specs/reference:configurability,glossary
|base-chain/specs/reference:configurability,glossary,native-account-abstraction
|base-chain/specs/reference/b20:changelog,constants-and-addresses,errors-and-events,index
|base-chain/specs/reference/b20/interfaces:IActivationRegistry,IB20,IB20Asset,IB20Factory,IB20Stablecoin,IPolicyRegistry
|base-chain/specs/reference/b20/interfaces/IActivationRegistry:activate,admin,checkActivated,deactivate,isActivated
|base-chain/specs/reference/b20/interfaces/IB20:BURN_BLOCKED_ROLE,BURN_ROLE,DEFAULT_ADMIN_ROLE,DOMAIN_SEPARATOR,METADATA_ROLE,MINT_RECEIVER_POLICY,MINT_ROLE,PAUSE_ROLE,SEIZE_HOLDER_POLICY,SEIZE_RECEIVER_POLICY,SEIZE_ROLE,TRANSFER_EXECUTOR_POLICY,TRANSFER_RECEIVER_POLICY,TRANSFER_SENDER_POLICY,UNPAUSE_ROLE,allowance,approve,balanceOf,burn,burnBlocked,burnWithMemo,contractURI,decimals,eip712Domain,getRoleAdmin,grantRole,hasRole,isPaused,mint,mintWithMemo,name,nonces,pause,pausedFeatures,permit,policyId,renounceLastAdmin,renounceRole,revokeRole,seizeWithMemo,setRoleAdmin,supplyCap,symbol,totalSupply,transfer,transferFrom,transferFromWithMemo,transferWithMemo,unpause,updateContractURI,updateName,updatePolicy,updateSupplyCap,updateSymbol
|base-chain/specs/reference/b20/interfaces/IB20Asset:MAX_UI_MULTIPLIER,OPERATOR_ROLE,WAD_PRECISION,announce,balanceOfUI,batchMint,cancelUIMultiplierUpdate,effectiveAt,extraMetadata,fromUIAmount,isAnnouncementIdUsed,multiplier,newUIMultiplier,scaledBalanceOf,toRawBalance,toScaledBalance,toUIAmount,totalSupplyUI,uiMultiplier,updateExtraMetadata,updateMultiplier,updateUIMultiplier
|base-chain/specs/reference/b20/interfaces/IB20Factory:createB20,getB20Address,isB20,isB20Initialized
|base-chain/specs/reference/b20/interfaces/IB20Stablecoin:currency
|base-chain/specs/reference/b20/interfaces/IPolicyRegistry:MAX_COMPOSITE_CHILD_POLICIES,MIN_COMPOSITE_CHILD_POLICIES,compositePolicyChildIds,createCompositePolicy,createPolicy,createPolicyWithAccounts,finalizeUpdateAdmin,isAuthorized,pendingPolicyAdmin,policyAdmin,policyExists,renounceAdmin,stageUpdateAdmin,updateAllowlist,updateBlocklist,updateComposite
|base-chain/specs/upgrades/azul:exec-engine,node-upgrade,overview,proofs
|base-chain/specs/upgrades/beryl:b20-playground,overview
|base-chain/specs/upgrades/beryl/b20:demos
|base-chain/specs/upgrades/beryl/b20/specification:index
|base-chain/specs/upgrades/beryl/b20/specification/reference:constants-and-addresses,errors-and-events-index
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces:IActivationRegistry,IB20,IB20Asset,IB20Factory,IB20Stablecoin,IPolicyRegistry
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IActivationRegistry:activate,admin,checkActivated,deactivate,isActivated
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20:BURN_BLOCKED_ROLE,BURN_ROLE,DEFAULT_ADMIN_ROLE,DOMAIN_SEPARATOR,METADATA_ROLE,MINT_RECEIVER_POLICY,MINT_ROLE,PAUSE_ROLE,SEIZE_HOLDER_POLICY,SEIZE_RECEIVER_POLICY,SEIZE_ROLE,TRANSFER_EXECUTOR_POLICY,TRANSFER_RECEIVER_POLICY,TRANSFER_SENDER_POLICY,UNPAUSE_ROLE,allowance,approve,balanceOf,burn,burnBlocked,burnWithMemo,contractURI,decimals,eip712Domain,getRoleAdmin,grantRole,hasRole,isPaused,mint,mintWithMemo,name,nonces,pause,pausedFeatures,permit,policyId,renounceLastAdmin,renounceRole,revokeRole,seizeWithMemo,setRoleAdmin,supplyCap,symbol,totalSupply,transfer,transferFrom,transferFromWithMemo,transferWithMemo,unpause,updateContractURI,updateName,updatePolicy,updateSupplyCap,updateSymbol
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Asset:MAX_UI_MULTIPLIER,OPERATOR_ROLE,WAD_PRECISION,announce,balanceOfUI,batchMint,cancelUIMultiplierUpdate,effectiveAt,extraMetadata,fromUIAmount,isAnnouncementIdUsed,multiplier,newUIMultiplier,scaledBalanceOf,toRawBalance,toScaledBalance,toUIAmount,totalSupplyUI,uiMultiplier,updateExtraMetadata,updateMultiplier,updateUIMultiplier
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Factory:createB20,getB20Address,isB20,isB20Initialized
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Stablecoin:currency
|base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IPolicyRegistry:MAX_COMPOSITE_CHILD_POLICIES,MIN_COMPOSITE_CHILD_POLICIES,compositePolicyChildIds,createCompositePolicy,createPolicy,createPolicyWithAccounts,finalizeUpdateAdmin,isAuthorized,pendingPolicyAdmin,policyAdmin,policyExists,renounceAdmin,stageUpdateAdmin,updateAllowlist,updateBlocklist,updateComposite
|base-chain/specs/upgrades/canyon:overview
|base-chain/specs/upgrades/cobalt:eip-8130
|base-chain/specs/upgrades/cobalt:overview
|base-chain/specs/upgrades/delta:overview,span-batches
|base-chain/specs/upgrades/ecotone:derivation,l1-attributes,overview
|base-chain/specs/upgrades/fjord:derivation,exec-engine,overview,predeploys
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/guides/accept-b20-payments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Call `publicClient.simulateContract` with the same arguments before sending. It

## Related pages

- [B20 token standard](/base-chain/specs/upgrades/beryl/b20/specification): the full interface, including memos, policies, pausing, and roles.
- [B20 token standard](/base-chain/specs/reference/b20): the full interface, including memos, policies, pausing, and roles.
- [Query B20 events](https://docs.cdp.coinbase.com/data/sql-api/b20-events): index `Transfer` and `Memo` events with the CDP SQL API to reconcile payments against orders at scale.
- [Launch a B20 token](/get-started/launch-b20-token): create your own B20 token.
134 changes: 134 additions & 0 deletions docs/base-chain/network-information/b20-token-standard.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
title: "B20 Token Standard"
description: "Learn about B20, Base's native ERC-20-compatible token standard."
tag: "New"
---

## What is B20?

B20 is Base's native token standard for stablecoins, real-world assets (RWAs), and other fungible tokens. It retains ERC-20 compatibility, so wallets, exchanges, and apps can use B20 tokens through standard ERC-20 flows. Issuers can add B20 controls without requiring those integrations to use a new token interface.

The [B20 Factory](/base-chain/specs/reference/b20#factory) establishes a token's operational configuration. The factory applies the configuration atomically, so the token starts with the selected controls. The issuer supplies roles, policies, supply limits, pause controls, and metadata for that configuration.

After creation, the token applies its configuration to each operation. [Roles](/base-chain/specs/reference/b20#roles-model) control privileged issuer actions. The token queries the [PolicyRegistry](/base-chain/specs/reference/b20#policy-registry) for configured authorization checks. Holders can transfer and approve tokens. Apps and indexers continue to use standard ERC-20 calls and events.

## Why B20?

Token issuers may need controls beyond ordinary transfers. Examples include mint permissions, transfer restrictions, operation pauses, and payment references. A standard ERC-20 requires issuers to implement these controls in a custom contract. B20 standardizes the controls that issuers configure for a token.

The standard includes:

- **Issuer controls:** B20 includes [roles](/base-chain/specs/reference/b20#roles-model), [policy scopes](/base-chain/specs/reference/b20#policy-integration), [supply caps](/base-chain/specs/reference/b20#supply-cap), [pauses](/base-chain/specs/reference/b20#pause), [memos](/base-chain/specs/reference/b20#memos), and [signed approvals](/base-chain/specs/reference/b20#erc-2612-permit--eip-712).
- **Integration surface:** B20 retains [ERC-20 compatibility](/base-chain/specs/reference/b20#erc-20-compatibility). B20-specific functionality uses a consistent interface.
- **Execution model:** B20 runs as a precompile. [Precompile addresses](/base-chain/specs/reference/b20#precompile-addresses) define the protocol entry points.

## How B20 works

The diagram shows the B20 lifecycle. The issuer configures the token during creation. The token applies that configuration during later operations. Use the diagram to identify the component that controls each part of the lifecycle.

```mermaid
flowchart LR
AR[ActivationRegistry] -->|enables a B20 variant| F[B20 Factory]
I[Issuer] -->|chooses variant and initial configuration| F
F -->|creates and initializes| T[B20 token]
I -->|assigns roles and policy scopes| T
I -->|manages allowlists and blocklists| PR[PolicyRegistry]
T -->|checks configured policy scopes| PR
U[Holders and ERC-20 apps] -->|transfer, approve, balanceOf| T
O[Issuer operators] -->|mint, pause, seize, update metadata| T
```

In practice, the flow is:

1. **Choose a variant.** Check [activation](/get-started/launch-b20-token#verify-the-activation-registry-is-enabled) for the selected variant.
2. **Create the token.** The issuer calls the factory with creation parameters and bootstrap calls. [Factory creation](/base-chain/specs/reference/b20#factory) defines the call. [Address derivation](/base-chain/specs/reference/b20#address-derivation) defines the token address.
3. **Configure operations.** Built-in roles gate sensitive operations. [Policy scopes](/base-chain/specs/reference/b20#policy-integration) authorize or deny accounts for each operation.
4. **Use the token.** Holders and applications use ordinary ERC-20 methods. B20 methods can add a memo or perform an issuer operation.

## What can I do with B20?

<CardGroup cols={2}>
<Card title="Issue and manage a token" icon="coins">
Create a token. Set a supply cap. Assign roles for minting, pausing, seizure, and metadata. [Manage roles](/base-chain/specs/reference/b20#roles-model).
</Card>
<Card title="Apply transfer rules" icon="shield-check">
Connect allowlists, blocklists, or composite policies to transfer, mint, and seizure scopes. Scopes allow every account by default. [Set policies](/base-chain/specs/reference/b20#policy-integration).
</Card>
<Card title="Control token operations" icon="circle-pause">
Pause transfers, mints, burns, or seizures independently. Authorized operators can mint, burn, or seize balances. [Review pauses](/base-chain/specs/reference/b20#pause) and [seizures](/base-chain/specs/reference/b20#seize).
</Card>
<Card title="Reconcile activity" icon="receipt">
Memo-enabled operations emit a `bytes32` reference. The reference can identify an order or invoice. [Review memo events](/base-chain/specs/reference/b20#memos).
</Card>
<Card title="Use signed approvals" icon="signature">
Use ERC-2612 [`permit`](/base-chain/specs/reference/b20#erc-2612-permit--eip-712) for signed approvals. Standard `approve` and allowance flows remain available.
</Card>
<Card title="Handle asset lifecycle events" icon="chart-line-up">
Asset tokens support scaled UI balances, announcements, batch minting, and extra metadata. [Review Asset features](/base-chain/specs/reference/b20#asset).
</Card>
</CardGroup>

### Choose the right variant

Every B20 token uses one of two variants. The issuer chooses the variant during creation. The choice determines the token's decimals and additional methods. Use the table to select the variant for the token's use case.

| Variant | Best for | Key differences |
|---|---|---|
| **Asset** | RWAs, equities, funds, and long-tail assets | Configurable 6 to 18 decimals. Multipliers, announcements, batch minting, and extra metadata. |
| **Stablecoin** | Fiat-referenced stablecoins | Fixed 6 decimals. An immutable uppercase currency code such as `USD`. The code validates format only. It does not validate reserves, legal status, or registration. |

This overview does not define method-level behavior. Read the [B20 technical specification](/base-chain/specs/reference/b20) for methods, events, errors, and configuration rules. Read the [generated interface reference](/base-chain/specs/reference/b20/interfaces/IB20) when you need the full callable interface.

## How can I get started?

### Explore the issuer flow

The B20 demo runs issuer flows in the browser. Use the demo to explore token creation and issuer controls before you integrate B20. The demo does not require a wallet or setup.

<Frame caption="The B20 demo at chain.base.org/demos/b20">
<iframe
width="100%"
height="640"
src="https://chain.base.org/demos/b20"
title="B20 demo"
frameborder="0"
allow="clipboard-write"
referrerpolicy="strict-origin-when-cross-origin"
></iframe>
</Frame>

[Open the demo in a new tab](https://chain.base.org/demos/b20).

<Note>
Standard `forge` cannot simulate B20 precompile calls. B20 precompile addresses have no contract bytecode. Use Base's Foundry build: `base-forge`, `base-cast`, and `base-anvil`. The tools register B20 precompiles in their EVM.
</Note>

## Availability

| Network | Live since |
|---|---|
| Base mainnet | 2026-06-25 (Beryl) |
| Base Sepolia | 2026-06-18 (Beryl) |

## Next steps

<CardGroup cols={2}>
<Card title="Launch a B20 token" icon="rocket" href="/get-started/launch-b20-token">
Create a token with one factory call.
</Card>
<Card title="Accept B20 payments" icon="credit-card" href="/apps/guides/accept-b20-payments">
Integrate memo-tagged payments. Handle B20-specific reverts.
</Card>
<Card title="Read the B20 spec" icon="book" href="/base-chain/specs/reference/b20">
Read the normative standard.
</Card>
<Card title="View constants" icon="hashtag" href="/base-chain/specs/reference/b20/constants-and-addresses">
Find protocol constants and addresses.
</Card>
<Card title="Browse interfaces" icon="code" href="/base-chain/specs/reference/b20/interfaces/IB20">
Browse B20 and registry methods.
</Card>
<Card title="Review changes" icon="clock-rotate-left" href="/base-chain/specs/reference/b20/changelog">
Review standard changes by release.
</Card>
</CardGroup>
Loading
Loading