HIP-1208: Native integration of Hedera Smart Contract Service (HSCS) with Hedera Consensus Service (HCS) topics #1207
Replies: 2 comments 3 replies
-
Thanks for putting together this discussion about a native integration between HSCS and HCS topics. This is a really important area for expanding the capabilities that Hedera offers and the use cases you've mentioned like decentralized coordination, even-driven automation and verifiable attestations are amazing and probably many in the community would agree with this. I myself have also been actively working on a HIP focused on enabling smart contracts to interact with HCS, specifically the "write" aspect. My proposal is around a "Deferred HCS Message Submission Precompile". The idea is that a smart contract would call a precompile to stage an HCS message which is then submitted to the specified HCS topic by the Hedera network itself, but only AFTER the smart contract transaction successfully achieves consensus. I went with this approach to ensure the smart contract's execution remains fully deterministic while still being reliable when it comes to getting messages onto HCS. I am very interested in this proposal and I had some questions I was hoping you could answer:
Looks like we're both interested in this topic(with my current focus being a detailed mechanism for deterministic writes - I have a detailed document outlining this), I think there could be some synergy here. Perhaps, we could collaborate somehow to bring a more comprehensive and robust SC-HCS integration solution to Hedera!! Thanks again for this discussion! I think this is an amazing concept and definitely the community would appreciate. |
Beta Was this translation helpful? Give feedback.
-
Great proposal! I have some questions for the overall specification: Who pays for HCS topic operations when triggered by smart contracts? The contract deployer, the transaction sender, or is there a new fee model? What happens if a message is written to a topic that wasn't intended for the contract? Would you restrict the specific contract to being the only entity that can write messages to the topic it creates? Are there any privacy implications when contract internal state becomes visible through HCS topics? The proposal doesn't address what happens when HCS operations fail. How do smart contracts handle these potential failures? The proposal doesn't have the actual API definitions. What specific functions will be available to smart contracts? How will developers interact with this functionality? Thank you! :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hip: 1208
title: Native integration of Hedera Smart Contract Service (HSCS) with Hedera Consensus Service (HCS) topics
author: Walter Hernandez walter.hernandez.18@ucl.ac.uk, Juan Ignacio Ibañez j.ibanez@ucl.ac.uk, Paolo Tasca p.tasca@exp.science, Nikhil Vadgama nikhil.vadgama@exp.science, Jiahua Xu jiahua.xu@ucl.ac.uk
type: Service
category: Service
needs-council-approval: Yes
status: Draft
created: 2025-06-02
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/discussions/XX
link-to-pr: #1208
Abstract
This proposal enables direct intraoperability between Hedera Smart Contracts and topics created using the Hedera Consensus Service (HCS). Smart contracts will be able to read and write to HCS topics through native integration. This allows for real-time event processing, decentralized messaging, and cross-application coordination without external intermediaries like Oracles.
Motivation
Developers will be able to leverage HCS topics for secure, verifiable messaging and event tracking directly within smart contract logic, opening up use cases such as decentralized coordination, event-driven automation, and consensus-based contract execution.
Rationale
Allowing smart contracts to interact natively with HCS topics enables applications to maintain tamper-proof records, trigger contract execution based on consensus-driven data, and create verifiable off-chain attestations. For example:
User stories
Specification
Backwards Compatibility
The implementation maintains backward compatibility with existing HCS and Smart Contract systems. Applications currently using either system independently can continue to do so without modification. The integration layer adds new capabilities without breaking existing functionality.
Security Implications
To maintain security and prevent unauthorized smart contract interactions with HCS topics:
How to Teach This
Open Issues
References
https://hedera.com/blog/use-cases-for-hcs-based-records-in-play-to-earn-nft-gaming
https://docs.hedera.com/hedera/tutorials/consensus/submit-your-first-message
Copyright/license
This document is licensed under the Apache License, Version 2.0 -- see LICENSE or (https://www.apache.org/licenses/LICENSE-2.0)
Beta Was this translation helpful? Give feedback.
All reactions