USDCx and native gas
USDCx is Miden's native gas token: the single asset used to pay protocol transaction fees. The same USDCx balance can fund payments and Miden fees.
USDCx represents USDC held in Circle's xReserve on a source chain. An attested deposit lets the Miden faucet mint USDCx. A withdrawal burns USDCx before the service releases source-chain USDC.
Identify the fee asset
Identify USDCx by its network and issuing faucet account, rather than its symbol or logo. A USDC token from another bridge may have a different issuer and cannot substitute for the network's fee asset.
For protocol 0.17, sync the client, then compare the asset's faucet with the Web SDK's await client.feeFaucetId(). This identity comes from ProtocolConfig::fee_asset_id(). Use an SDK compatible with the deployment; switching endpoints does not move balances.
Fund an empty account
Use Arc Testnet for direct xReserve deposits to Miden Testnet. See the wallet's network configuration and check network status before funding.
Before you start
- Have a compatible Miden wallet and preserve the account's signing material and required private-state backup.
- Have an EVM wallet holding Arc Testnet test USDC for the deposit.
- Keep additional USDC for source-chain gas. Arc uses USDC for gas, and approval and deposit can require separate transactions.
Deposit and claim
- Select Miden Testnet in the wallet and create or select the recipient account.
- In Receive, choose the USDCx route and Arc Testnet, then connect the EVM wallet.
- Review the recipient, network, amount and charges. Approve the xReserve allowance if needed, then submit the deposit.
- Wait for Circle's attestation and the relayer's mint. The faucet creates a funding note for the recipient. Keep the deposit identifier while delivery is pending.
- Claim the note through the wallet and sync the confirmed account state.
- Check the remaining vault balance before sending. Keep enough USDCx for the send and later claims or withdrawals.
Custom accounts and automatic claims
Custom accounts must expose the standard miden::standards::wallets::basic::receive_asset procedure with its matching MAST root to claim the P2ID funding note.
The wallet uses a conservative automatic-claim threshold of 30 × verification_base_fee base units. This wallet threshold is separate from the actual protocol fee.
Units and fees
Amounts
USDC and this USDCx implementation use six decimals: 1 USDCx = 1,000,000 base units, and 0.01 USDCx = 10,000 base units. The amount encoding preserves these units without decimal rescaling.
Use integer base units for amounts and fees. Reject excess decimal precision instead of rounding silently.
Fee types
| Charge | Who pays |
|---|---|
| Miden protocol fee | The executing account: the sender for a send, the recipient for a claim, and the faucet or network account for its own mint or burn processing. |
| Source-chain gas | The EVM transaction payer, unless the route sponsors it. Approval and deposit can be separate transactions. |
| Network-account application fee | The note sender when the target requires sponsorship. This is separate from the sender's protocol fee. |
| Deposit, withdrawal or proving-service charges | As specified by the provider's policy or quote. These are separate from the protocol fee. |
The protocol fee pays for verification and batch inclusion. Standard authentication withdraws the fee and creates a public TX_FEE note. Payment takes effect with onchain inclusion. See Transaction fees for calculation and payment inspection.
The wallet sets the xReserve deposit-fee ceiling to maxFee = 0. Source-chain gas and Miden protocol fees are separate.
Balance example
Suppose a claim and a send each cost 0.008500 USDCx (8,500 base units):
| Action | Protocol fee | Vault balance after confirmation |
|---|---|---|
Claim a 1.000000 USDCx funding note | 0.008500 USDCx | 0.991500 USDCx |
Send 0.500000 USDCx | 0.008500 USDCx | 0.483000 USDCx |
These amounts illustrate balance deductions. Check the transaction's fee before submitting.
Withdraw USDCx
Choose the wallet's USDCx Send route and review the supported Testnet destination and payout deductions. A withdrawal has three stages:
- Creating a public burn note removes the amount from the holder's vault.
- The faucet consumes the note and burns the USDCx.
- The withdrawal service pays USDC on the destination chain.
The withdrawal service requires the burn note to have been committed in an earlier block. The official xReserve faucet supports only the standard USDCx burn-note script.
Withdrawal quotes and routes
Read a successful POST /v1/prepare-withdrawal response for the selected environment, destination and amount. Preparing a quote does not submit a withdrawal or prove payout.
| Field | Format |
|---|---|
Request valueIncludingFees | Decimal USDC string |
Request forwardingOptions.maxFee | Decimal USDC string |
Response batches[0].burnIntents[0].maxFee | Integer string in six-decimal base units |
The attester supports one returned burn intent. An error, an unexpected hook, or multiple intents is not a supported quote.
Circle's route guide distinguishes direct payouts through Gateway from withdrawals requiring an additional CCTP leg. The Miden attester validates the destination and hook:
| Returned route | Withdrawal fee components |
|---|---|
| Direct payout: requested destination and recipient, zero forwarding-contract address, empty forwarding calldata | Returned xReserve quote; no additional CCTP cap is added. |
| Supported forwarding through Arc with a validated CCTP call | Returned xReserve quote plus a separate CCTP fee. The service checks against the full configured CCTP cap; the actual charge can be lower. |
useCircleForwarding: true alone does not identify a CCTP route. Check the prepare response to identify the supported route. An additional withdrawal leg does not change USDCx's xReserve backing or Miden's native fee asset.
Example direct payout: for a request with valueIncludingFees: "10.000000", a returned maxFee of "24000" represents an xReserve fee of 0.024000 USDC and a prepared payout of 9.976000 USDC. A separate CCTP leg would also deduct its charge.
An operator cap or wallet payout-confirmation allowance is not the charged fee. A Testnet quote is not a Mainnet price.
Network limits
| Environment | Funding and limits |
|---|---|
| Local/devnet | Use that deployment's configured fee asset and funding service or faucet. Local tokens have no implied external redemption. A zero base fee means no protocol fee note. |
| Testnet | Use test assets and the wallet's offered destinations. Withdrawals must meet the faucet's minimum-burn policy and exceed the destination's payout-fee allowance. |
| Mainnet | The wallet supports withdrawals on Testnet only. Mainnet funding, payout fees and operational limits are unconfirmed. |
SDK amount and deposit limits
The fee asset, verification base fee, minimum burn, supply cap, provider charges, and faucet request or rate limits depend on the deployment.
The amount type's maximum (2^63 − 2^31 base units) is a type limit, not an approved deposit limit. The minimum burn is at least one base unit, but administrators can raise it.
The wallet uses empty hook data. For custom deposits, check the matching release's hook-data transport capacity before locking funds. See faucet configuration and withdrawal validation.
Troubleshooting
| Issue | What to check |
|---|---|
| Funding is pending | Check deposit, attestation, delivery, claim and confirmation separately. |
| Wrong-asset error | Compare issuing faucet IDs on the selected network. |
| Claim fails | Check the incoming USDCx amount and the account's receiving procedure. |
| Receipt or withdrawal is blocked | Check whether the faucet is paused or the account is blocklisted. |
| A transaction times out | Reconcile transaction and note status before resubmitting. Follow the provider's recovery instructions if services are unavailable. |
| Destination payout is pending | Verify destination-chain USDC receipt separately from Miden burn confirmation. The wallet's balance-based check can be affected by unrelated transfers. |