Book a free call

How to Create a Stablecoin on the XDC Network

A stablecoin on the XDC Network is an XRC-20 token with its value tied to a fiat currency or asset. You can create one with no code or deploy a custom contract.

Hertiv engineering teamReviewed by a senior engineer
5 min read
How to Create a Stablecoin on the XDC Network
On this page

Short answer

To create a stablecoin on the XDC Network, you deploy an XRC-20 token and back it with reserves held against the currency or asset it tracks. The no-code route uses XDC Origin with an XDCPay wallet, while developers can generate the contract with OpenZeppelin Wizard and deploy it through XinFin Remix. Test on Apothem first, then decide on supply, minting rules and compliance for your market before mainnet.

What is a stablecoin on the XDC Network?

A stablecoin on the XDC Network is a token built to the XRC-20 standard whose value is tied to a fiat currency or asset, usually one token to one unit of that currency. The XDC Network is an enterprise-grade hybrid blockchain that runs on delegated proof of stake, known as XDPoS, which gives fast settlement for token transfers.

The stablecoin itself is a smart contract on XDC. It tracks balances, moves tokens between wallets and enforces the rules you choose, such as pausing transfers or minting new tokens. The peg comes from the reserves behind it, not from the contract: the issuer holds assets matching the tokens in circulation.

XDC suits stablecoins because it is EVM-compatible, so contracts written for Ethereum-style tooling work on it, and because its token standard, XRC-20, mirrors ERC-20. For the wider picture of how stablecoins are built, see how stablecoin development works.

What do you need before you start?

Before you create a stablecoin on XDC, you need a wallet, test funds, the token details and a backing plan. The wallet signs the deployment transaction, the test funds pay gas on the testnet, and the backing plan is what makes the token a stablecoin rather than an ordinary token.

Item What it is Notes
XDCPay wallet Holds XDC and signs transactions Install the browser extension
Test XDC Gas for the Apothem testnet Free from the faucet
Token details Name, symbol, decimals, supply Decide before you deploy
Backing plan Reserves matching the peg One unit of reserve per token
Compliance check Rules for your market and users Check before mainnet

Decide the supply and the features before you deploy, because changing them later means deploying a new contract or building upgrade paths in from the start. The cost and compliance picture is covered in how to launch a stablecoin.

How to create a stablecoin with XDC Origin

XDC Origin is a no-code token creation tool for the XDC Network. It provides tested smart contract frameworks for XRC-20 and XRC-721 tokens, so you can create a stablecoin without writing Solidity.

  1. Connect your XDCPay wallet to XDC Origin at origin.xdc.org and select the network, mainnet or Apothem testnet.
  2. Click Create XRC-20 and enter the basic information: token name, symbol, decimals, an optional description and links.
  3. Set the initial supply and the supply limit for your stablecoin.
  4. Choose the features for the contract: pausable, burnable and mintable, as needed.
  5. Deploy or save a draft. Deploying sends the transaction and returns the contract address, transaction hash, minted tokens and gas fee used.
  6. Import the token into XDCPay. Copy the contract address, add it in the wallet with the symbol and decimals, and the minted tokens appear.

Origin applies burnable and mintable features by default, and you can add pausable if you need it. Once deployed, the Manage Contracts view lets you pause or resume the contract, mint more tokens, burn tokens and transfer ownership.

How to deploy a custom contract with Remix

Developers who want full control can generate the contract with OpenZeppelin Wizard and deploy it through XinFin Remix, the XDC version of the Remix IDE. The route takes longer but lets you shape every rule in the contract.

  1. Generate the contract in OpenZeppelin Wizard. Set the name and symbol, set the premint amount, and tick mintable, burnable or pausable as needed.
  2. Copy the generated Solidity code into a new file in XinFin Remix ending in .sol.
  3. Compile the contract with the compiler version shown at the top of the generated code.
  4. Connect XDCPay to Remix using the injected web provider, and switch to the Apothem testnet with test XDC from the faucet.
  5. Deploy and confirm the transaction in XDCPay, then check the contract on the XDC block explorer.
  6. Test minting, transfers and burning on Apothem before repeating the deploy on mainnet.

The Wizard handles the standard logic, so your job is the choices around it: supply, decimals, who can mint and whether the contract can be paused. For the ERC-20 equivalent on Ethereum, see how to create an ERC-20 token.

What features should the token have?

The features you pick decide what the issuer can do after launch. A stablecoin needs at least a clear minting rule, because every new token must be matched by new reserves, and a way to remove tokens when users redeem them.

Feature What it does When to use it
Pausable Halts transfers and operations If a bug or attack is found
Burnable Removes tokens from supply To shrink supply or redeem
Mintable Creates new tokens later To grow supply against new reserves
Capped supply Sets a hard maximum To promise a fixed ceiling

Mintable without a cap is the riskiest combination, because nothing in the contract stops unlimited supply growth. Pair minting with a clear rule, such as a cap or an owner-only mint tied to reserve deposits, and write that rule into your public documentation. For a stablecoin built as a service, see stablecoin development.

Example (hypothetical): a 1,000,000-token stablecoin launch

Example (hypothetical): a team launches a dollar-pegged stablecoin on XDC with a total supply of 1,000,000 tokens. The split is 600,000 tokens in circulation, 250,000 held as reserve stock and 150,000 for the team, which adds up as 600,000 + 250,000 + 150,000 = 1,000,000.

Backing works on the circulating tokens, not the total supply. At one dollar per token, 600,000 circulating tokens need 600,000 dollars in reserves, so the reserve ratio is 600,000 / 600,000 = 100%. The 250,000 reserve tokens are unminted capacity, not circulating supply, so they need no backing until they are issued.

If the team later mints 50,000 more tokens into circulation, reserves must rise by 50,000 dollars to stay at 100%, giving 650,000 / 650,000 = 100%. If reserves do not rise, the ratio falls to 600,000 / 650,000 = about 92%, and the peg is no longer fully backed.

What are the common mistakes?

The most common mistakes when creating a stablecoin on XDC are deploying straight to mainnet, minting without reserves, and skipping the compliance check for the market you serve.

  • Skipping the testnet. Deploy on Apothem first and test minting, transfers and burning before mainnet.
  • Minting without reserves. Every new token needs matching reserves, or the peg is only a promise.
  • Unlimited minting with no rule. Mintable without a cap or a reserve rule invites supply growth nobody can audit.
  • Forgetting the pause plan. Without a pausable feature, a bug means watching the damage instead of stopping it.
  • Skipping compliance. Stablecoins face rules that differ by market; check them before mainnet, not after launch.
  • No reserve reporting. Users trust a stablecoin they can verify, so publish the backing and update it regularly.

Key takeaways

  • A stablecoin on XDC is an XRC-20 token backed by reserves
  • XDC Origin creates one with no code; Remix gives full control
  • Test on Apothem before mainnet
  • Every minted token needs matching reserves
  • Pausable, burnable and mintable are the key features

Frequently asked questions

What is an XRC-20 token?

XRC-20 is the fungible token standard on the XDC Network, mirroring ERC-20 on Ethereum. It defines how tokens are transferred, how balances are tracked and how approvals work, so wallets and exchanges can support any XRC-20 token the same way.

Do I need to write code to create a stablecoin on XDC?

No. XDC Origin is a no-code tool that creates and deploys XRC-20 tokens from a form: name, symbol, supply and features. Developers who want full control can generate the contract with OpenZeppelin Wizard and deploy it through XinFin Remix.

What wallet do I need for XDC?

XDCPay is the wallet used with XDC Origin and XinFin Remix. Install the browser extension, create an account and connect it to the tool. For testing, switch to the Apothem testnet and get test XDC from the faucet.

How is a stablecoin different from an ordinary token?

A stablecoin is backed by reserves matching the tokens in circulation, usually one unit of fiat currency per token. An ordinary token has no such backing. The contract is the same kind of token; the backing and the rules around minting are what make it a stablecoin.

What does pausable mean for a stablecoin?

Pausable means the contract owner can halt transfers and operations, then resume them later. It is used when a bug or attack is found, so the damage can be stopped while a fix is prepared.

Do stablecoins need licences?

It depends on the market and the users you serve. Stablecoin rules differ by country and cover issuance, reserves, custody and reporting. Check the rules for your market before mainnet, since launching first and asking later is the expensive order.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a stablecoin on XDC or another chain? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Stablecoin Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call