Use this file to discover all available pages before exploring further.
Technical reference for the custom stablecoin. The source code is available on GitHub at coinbase/custom-stablecoin.For code examples and common workflows, see Quickstart and Examples.
Each custom stablecoin is an ERC-20 token that extends the standard with additional capabilities:
Standard
Description
ERC-20
Fungible token interface
ERC-2612
Permit — gasless approvals via EIP-712 signatures
ERC-3009
Transfer with authorization — meta-transaction transfers
ERC-7572
Contract-level metadata URI
ERC-165
Interface detection
Your stablecoin’s contract address is provided during onboarding. See Key Addresses for the testnet CBTUSD address.
Coinbase may update the stablecoin implementation over time. Your contract address does not change on update, and the public interface described below remains stable.
These functions attach a 32-byte memo to a transfer. The Memo event is emitted immediately after the ERC-20 Transfer event. Memos are useful for correlating on-chain transactions with off-chain order IDs, payment references, or other business records.
Memo values are permanently visible on the public blockchain. Do not include sensitive information such as customer names, account numbers, or PII. If you need to attach sensitive data, encrypt it off-chain before encoding it as bytes32 and decrypt it off-chain when reading the event. Use only non-sensitive references (such as a hashed or opaque order ID) as the on-chain memo value.
Permit allows a token holder to authorize a spender using an off-chain EIP-712 signature, so the spender can pull tokens without the holder sending a prior approval transaction.
function DOMAIN_SEPARATOR() external view returns (bytes32)
Returns the EIP-712 domain separator for this contract. Most signing libraries compute this automatically from name(), "1" (version), chainId, and the contract address — you rarely need to call this directly.
ERC-3009 meta-transactions let a token holder sign a time-bounded transfer authorization. Any party can submit the transaction on-chain. Nonces are random 32-byte values (not sequential) to support multiple concurrent authorizations.ERC-3009 vs ERC-2612 Permit — when to use each:
ERC-2612 Permit
ERC-3009
What it authorizes
Approval (spending allowance)
A specific transfer
Who submits
Anyone
Anyone (transferWithAuthorization) or recipient only (receiveWithAuthorization)
Nonce type
Sequential — one active at a time
Random — multiple concurrent authorizations supported
Use case
Gasless approve before a transferFrom
Gasless direct transfer, pay-for-me flows
Front-running risk
Low
Use receiveWithAuthorization when front-running is a concern
Same parameters as transferWithAuthorization, but msg.sender must equal to. This prevents front-running by restricting submission to the intended recipient.
Specific addresses can be blocked from sending or receiving tokens. Any transfer involving a blocklisted address will revert with AddressBlocklisted(account). You can check blocklist status before sending with isBlocklisted(address).
All token transfers can be paused in an emergency. Any transfer attempted while paused will revert with EnforcedPause(). Monitor the Paused and Unpaused events to detect state changes.
Custom stablecoins on Solana are standard SPL tokens (not Token-2022). You interact with them using the standard @solana/spl-token library — no custom program or IDL is required.Your stablecoin’s mint address is provided during onboarding. See Key Addresses for the testnet CBTUSD mint.The mint authority and freeze authority for every custom stablecoin are held by Coinbase. The freeze authority allows specific token accounts to be frozen — parallel to the blocklist on EVM. Check the isFrozen field on a token account before transferring; frozen accounts will cause transfers to fail.
import { getAssociatedTokenAddress } from "@solana/spl-token";import { PublicKey } from "@solana/web3.js";const ataAddress = await getAssociatedTokenAddress( mintAddress, // PublicKey of the stablecoin mint walletAddress // PublicKey of the wallet);
The ATA address is fully deterministic. You do not need to store it — derive it at runtime.
These are the standard SPL Token instructions available for custom stablecoins. All require the SPL Token Program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA).