Book a free call

How to Create Tokens with Hedera Consensus Service

Hedera Consensus Service orders and timestamps token transfers, while the token rules run off-chain. Here is how that pattern works and when to use it.

Hertiv engineering teamReviewed by a senior engineer
8 min read
How to Create Tokens with Hedera Consensus Service
On this page

Short answer

Creating a token with the Hedera Consensus Service means building your token logic off-chain and using Hedera to order and timestamp every transfer. You create a topic, submit each transfer as a message, and your own node reads the ordered messages to work out every balance. The token itself is not a native Hedera asset.

What does creating a token with HCS mean?

Creating a token with the Hedera Consensus Service means running your token as an off-chain system whose transaction order is decided by Hedera. HCS does not hold balances, check rules or create tokens. It takes messages sent to a topic and returns them with a consensus timestamp and a sequence number, so everyone agrees on the order in which things happened.

That is a different model from a native token. Hedera also has a Token Service, HTS, which creates tokens that live on the ledger itself, with supply, freeze and KYC controls built in. An HCS token is the opposite: your own code holds the balances and enforces the rules, and Hedera is only the shared log that proves the order of events.

Teams pick HCS when they need custom token rules that a native token service cannot express, or when they want the token to live in their own system while still having a public, tamper-evident record of every transfer. For the native-token route, see how to create an ERC-20 token.

HCS or HTS: which one creates the token?

HCS and HTS answer different questions. HTS creates and manages tokens on the Hedera ledger. HCS orders messages so an off-chain system can agree on what happened. Picking the wrong one is the most common mistake in this area, so the difference is worth stating plainly.

Question Hedera Consensus Service Hedera Token Service
Where does the token live? In your own database, off-chain On the Hedera ledger as a native asset
Who enforces the rules? Your own token node code The ledger, through token keys
What does Hedera provide? Ordering and timestamps for messages Creation, minting, burning, transfers
Custom rules Any rule you can code Only the controls HTS supports
Who can hold it? Anyone your system admits Accounts associated with the token
Best for Private token logic, audit trails Stablecoins, loyalty points, NFTs

The short version: if you want a token that exchanges and wallets can hold without your software, use HTS. If you want a token whose rules live in your system and Hedera only proves the order of transfers, use HCS. Some projects use both, with HTS for the token and HCS topics for the audit log. For how tokens differ from coins, see coin versus token development.

How does an HCS token system work?

An HCS token system has three layers: a topic that carries the messages, a mirror node that reads them, and a token node that applies the rules. Hedera sits in the middle as the ordering layer, and your code does everything else.

  1. Create a topic. A topic is a named channel on Hedera. Every token transfer, mint and burn is sent to it as a message. A submit key can limit who is allowed to post.
  2. Submit transfer messages. Each message is a signed record of one action: who sends, who receives, how much, and a reference. The network gives it a consensus timestamp and a sequence number.
  3. Read the ordered log. A mirror node subscribes to the topic and serves the messages in consensus order through an API, so any node can replay the full history.
  4. Validate each message. Your token node checks the signature, checks the sender has enough balance, and rejects anything that breaks the rules.
  5. Apply valid messages to state. Valid transfers update balances in your database. Invalid ones are recorded as rejected, so the log stays complete.
  6. Serve balances from your API. Wallets and apps read balances from your service, not from Hedera directly, because Hedera does not store them.

The key property is that two nodes reading the same topic reach the same state, because they see the same messages in the same order. That is what makes the system trustworthy without a central database. For the economics of token design, see what tokenomics is.

What are the steps to build one?

Building an HCS token takes seven steps, and most of the work is in your own code rather than on Hedera. The Hedera side is two transactions: create a topic and start submitting messages.

  1. Decide what the token is for. Write down the purpose, the supply, who can hold it and what it can be spent on. A token with no clear use is a liability, not an asset.
  2. Choose HCS or HTS, and write the choice down. If the token needs to trade on exchanges or sit in third-party wallets, HTS is the better fit. If the rules are custom and the token stays inside your system, HCS fits.
  3. Design the message format. Fix a JSON shape for transfers, mints, burns and freezes, with sender, receiver, amount, a nonce and a signature field. Changing it later means migrating every client.
  4. Create the topic and the keys. Create an HCS topic, set a submit key so only your service can post, and keep the admin key somewhere safe. Fees are set in US dollars and charged in HBAR; see the vendor site for current figures.
  5. Build the token node. Write the state machine that replays messages in order, checks signatures and balances, and stores the result. This is the part that must be correct, because it is the only place the rules exist.
  6. Build the mirror-node reader. Subscribe to the topic through a mirror node, store messages locally, and rebuild state from scratch on startup so a restart never loses the history.
  7. Test with a replay. Run the same message log through two independent nodes and compare the final balances. If they differ, the rules are not deterministic and need fixing before launch.

Do not skip the replay test. It is the one check that catches the bugs that matter: messages applied in the wrong order, balances that depend on timing, and rules that behave differently on a second run.

What does it cost to run?

Running an HCS token costs little on Hedera itself and most of the money goes to your own infrastructure. Hedera fees are set in US dollars and charged in HBAR, so the dollar cost stays stable while the HBAR amount moves with the token price.

Cost What it covers Notes
Topic creation One HCS topic for the token A one-off fee, see vendor site
Message submission One fee per transfer message Very small; batch transfers to cut it
Mirror node reads Reading the topic history Public mirror nodes are free to query
Your token nodes Servers that validate and store state The main running cost
Key management Secure storage for topic and signing keys Use a hardware-backed store

Batching is the main cost lever: several transfers can ride in one message, which cuts the per-transfer fee. The other lever is message size, since larger messages cost more. Keep messages short and put detail in your own database, with only a reference on the topic. For the wider cost of launching a token, see how to create a cryptocurrency.

Example: a loyalty token for a coffee chain

Example (hypothetical): a coffee chain with 5,000 regular customers launches a loyalty token on HCS. Each customer earns 200 points for joining, so the initial mint is 5,000 x 200 = 1,000,000 points. Points are worth 100 points to one dollar of coffee, so the full supply is a $10,000 liability if every point is redeemed.

In the first month, customers earn points on 20,000 purchases and redeem points in 2,000 transactions, so the topic carries 22,000 messages. The token node replays them in consensus order, checks each sender's balance, and updates the ledger in the chain's database.

At month end, the chain reports 1,000,000 points issued, 400,000 redeemed and 600,000 still held. Because every transfer is on the HCS topic with a consensus timestamp, an auditor can replay the month and reach the same three numbers without trusting the chain's database.

The numbers are illustrative. The point is the shape of the system: Hedera proves the order of events, and your node proves the balances.

What are the common mistakes?

The most common mistakes with HCS tokens are assuming HCS creates the token, trusting the log instead of validating messages, and building a token that nobody can hold outside your own app.

  • Thinking HCS mints tokens. HCS orders messages; it never creates an asset. If you need a native token, use HTS or a smart contract.
  • Trusting messages without validation. Anyone who can post to the topic can send a bad message. The token node must check every signature and balance, or a forged transfer will be applied.
  • No replay test. If two nodes cannot rebuild identical balances from the same log, the rules are not deterministic and the token is not trustworthy.
  • Messages that are too large. Storing whole documents on the topic wastes fees. Store a short reference and keep the detail off-chain.
  • One key for everything. A single admin key that can change the topic or the rules is a single point of failure. Split keys and require more than one signer for changes.
  • Ignoring the holder problem. An HCS token only exists inside your system, so exchanges and wallets cannot list it without your software. Say that plainly to stakeholders before building.

Key takeaways

  • HCS orders and timestamps messages; it does not create tokens or hold balances
  • An HCS token is an off-chain system: topic, mirror node and token node, with Hedera as the ordering layer
  • HTS is the right choice when the token must live in third-party wallets and exchanges
  • Every message must be validated by the token node, or a forged transfer will be applied
  • Replay the same message log through two nodes and compare balances before launch
  • Keep messages short and batch transfers to keep Hedera fees low

Frequently asked questions

Does HCS create tokens on Hedera?

Not by itself. HCS accepts messages on a topic and gives each one a consensus timestamp and a sequence number. The token, its balances and its rules live in your own code. If you need a token that exists on the ledger, use the Hedera Token Service, which creates native fungible tokens and NFTs.

What is an HCS topic?

A topic is a named channel on Hedera that applications send messages to. Each message gets a consensus timestamp and a running sequence number, and mirror nodes store the messages so anyone can read the full history in order. A submit key can limit who is allowed to post to the topic.

Can I move an HCS token to a wallet or exchange?

Not directly. An HCS token only exists inside the system that runs the token node, so wallets and exchanges cannot hold it without that software. If the token needs to trade outside your system, issue it through HTS instead, or build a bridge that locks the off-chain token and mints an on-chain one.

How do I prove a transfer happened?

Replay the topic from a mirror node. Every message carries a consensus timestamp and a sequence number, and the running hash links each message to the one before it. Two independent nodes that replay the same topic in order will reach the same balances, which is the proof.

What happens if the token node goes down?

The messages are safe on Hedera and on mirror nodes, so nothing is lost. A replacement node can subscribe to the topic, replay the full history from the first message, and rebuild the same state. Keep backups of the signing keys, because a lost key cannot be recovered from the log.

Is HCS cheaper than a smart contract token?

Usually, yes, for high-volume simple transfers, because each message costs a fraction of a cent and the token logic runs on your own servers. The trade-off is that you build and operate the infrastructure yourself, while a smart contract token runs on the network and is held by wallets directly.

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

Building a token on Hedera and unsure whether HCS or HTS fits? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Blockchain 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