- Ethereum Virtual Machine
- Solana Virtual Machine
Overview
Each custom stablecoin is an ERC-20 token that extends the standard with additional capabilities: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.
ERC-20 functions
transfer
amount tokens from the caller to to.Failure scenarios:transferFrom
amount tokens from from to to, deducting from the caller’s allowance.Failure scenarios:approve
spender to amount.Failure scenarios:balanceOf
account.totalSupply
allowance
spender is allowed to transfer on behalf of owner.decimals
name
symbol
Memo functions
These functions attach a 32-bytememo 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.transferWithMemo
amount from the caller to to with a memo.transferFromWithMemo
amount from from to to with a memo, deducting from the caller’s allowance.ERC-2612 Permit
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.permit
spender’s allowance for owner to value, validated by an EIP-712 signature signed by owner.Failure scenarios:nonces
owner. This is a sequential counter — increment after each permit call.DOMAIN_SEPARATOR
name(), "1" (version), chainId, and the contract address — you rarely need to call this directly.ERC-3009 Transfer with authorization
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:transferWithAuthorization
from to to validated by a signed authorization. The authorization must be signed by from. Anyone may submit the transaction.Failure scenarios:
receiveWithAuthorization
Same parameters as transferWithAuthorization, but msg.sender must equal to. This prevents front-running by restricting submission to the intended recipient.cancelAuthorization
authorizer must sign a CancelAuthorization message. Once canceled, the nonce cannot be used for a transfer.authorizationState
true if the authorization nonce has been used or canceled.View functions
isBlocklisted
true if account is on the blocklist. Blocklisted addresses cannot be the sender, recipient, or msg.sender of any transfer or approval.contractURI
supportsInterface
true for ERC-20 (0x36372b07), ERC-2612 (0x9d8ff7da), and all inherited interfaces.Safety controls
Custom stablecoins include two safety mechanisms managed by Coinbase. These are transparent on-chain — your integration should handle them gracefully.Blocklist
Specific addresses can be blocked from sending or receiving tokens. Any transfer involving a blocklisted address will revert withAddressBlocklisted(account). You can check blocklist status before sending with isBlocklisted(address).Pause
All token transfers can be paused in an emergency. Any transfer attempted while paused will revert withEnforcedPause(). Monitor the Paused and Unpaused events to detect state changes.Events
Errors
What to read next
Quickstart
Get up and running in 10 minutes
Examples
Code samples for transfers, permit, and ERC-3009
Key Addresses
Contract and mint addresses
Overview
Learn about Custom Stablecoins