We believe privacy is necessary for mainstream adoption of decentralized technologies.
Our vision is a future where any blockchain will be able to use privacy features to use data safely and securely. As a result, users of decentralized applications will be able to maintain ownership and control of their identity and data.
To further that vision, we decided to join Cosmos and build part of the internet of blockchains 💫💫💫
In this post, we’ll explain what Cosmos is, how we’re collaborating with various members of the Cosmos ecosystem including the Cosmos Governance Working Group, CosmWasm and the Interchain Foundation, and what possibilities Secret Network opens up by operating as the Cosmos privacy hub.
What is Cosmos?
Essentially, Cosmos is a decentralized network of independent blockchains validated in parallel with BFT consensus algorithms like Tendermint. However, that description barely scratches the surface of its complex architecture, involving three major components:
- Tendermint
- Cosmos SDK
- Inter-Blockchain Communication
From the Cosmos website: “Until recently, building a blockchain required building all three layers (Networking, Consensus, and Application) from the ground up. Ethereum simplified the development of decentralized applications by providing a Virtual-Machine blockchain on which anyone could deploy custom logic in the form of Smart Contracts. However, it did not simplify the development of blockchains themselves.”
The Enigma Discovery network relied on Ethereum for consensus. But Secret Network, operated by validators known as “secret nodes,” is an independent blockchain built using the Cosmos SDK. Our dev team is working to enable running CosmWasm inside SGX for encrypted computation, i.e. “secret contract” functionality. This will power “Secret Apps” that utilize our “Secret Hub.”
Relevant Forum Post:
On-Chain Governance
Our community has learned a lot from the Cosmos Governance Working Group, which is providing extremely useful resources on how to use the on-chain governance module. For example, the working group has built a wiki about parameter changes, along with documentation of best practices for community-spend proposals.
Additionally, there have been interesting questions raised that could similarly apply to Secret Network. Specifically, how does the Cosmos Hub account for the interests of other zones? This podcast featuring GWG leader Gavin Birch includes a fascinating discussion about interchain governance and what it could mean for the Cosmos Hub and its overall ecosystem.
CosmWasm & private smart contracts
CosmWasm allows developers to write multi-chain smart contracts using any programming language, including Rust. CosmWasm is written as a module that can plug into the Cosmos SDK. This means anyone building a blockchain with the Cosmos SDK can quickly and easily add support for smart contracting, without adjusting existing logic.
Since joining the Cosmos ecosystem, we have collaborated with the CosmWasm dev team and made valuable contributions. Building on their hard work, we are introducing a module named compute
, which is designed to enable private computation (secret contracts). On GitHub, you can follow the Enigma dev team’s progress toward milestone 3 of 3: CosmWasm in SGX with encryption.
IBC: Inter-Blockchain Communication Protocol
IBC is a communication protocol that allows different blockchains to talk to each other. Understanding this revolutionary technology is challenging, so the IBC team recommends breaking it down into 4 components:
- Client ~ algorithm with which a machine can verify updates to the state of another machine which the other machine’s consensus algorithm has agreed upon, and reject any possible updates which the other machine’s consensus algorithm has not agreed upon
- Connection ~ two stateful objects on two separate chains, each associated with a light client of the other chain, which together facilitate cross-chain sub-state verification and packet association (through channels)
- Channel ~ conduit for packets passing from a module on one chain to a module on another, ensuring packets are executed only once, delivered in the order in which they were sent (if necessary), and delivered only to the corresponding module on the destination chain
- Packet ~ a particular data structure with sequence-related metadata and an opaque value field referred to as the packet data (with semantics defined by the application layer, e.g. token amount and denomination).
Another way to think about IBC is in comparison to TCP/IP. Modern computers are equipped with network cards to make network requests; however, blockchains can’t really make network requests. There needs to be some sort of actor making those requests on behalf of the individual chains. Such actors are called relayers.
This necessarily introduces fundamental economic imbalances. As coins/tokens move between zones, value is generated. What happens to that value? There will be many zone-to-zone interactions. Knowing the sources and uses of value is going to be instructive for the early stages of IBC, hence why our team is keen to support it.
Secret Hub: the Cosmos Privacy Hub
By building Secret Network as part of the Cosmos, any blockchain in the Cosmos ecosystem will be able to use Secret’s private smart contracts (Secret Contracts) to perform private computations. They will do so by implementing our compute module and using our network of SGX-enabled nodes.
In order to pay for gas, users will need SCRT, the native coin of our network. We believe trust in Enigma’s validator community will be an important factor in the decision to use our network.
Here are some of the exciting use cases this creates:
- Secret can provide transactional privacy for zones in the Cosmos ecosystem, including the Cosmos Hub and DeFi applications
- Secret Contracts enable private access control
- Game developers can use private computations to create surprise loot boxes, and competitive games where moves can’t be observed on-chain
- Secret’s private features can be used for “secret voting”, which could benefit every implementation of the Cosmos SDK and its governance module. Learn more about how that could work:
We’re looking forward to integrating secret contract functionality and continuing to explore the many possible use cases of Secret Apps, building Secret Network into a true Cosmos privacy hub.
If you have any ideas or questions, please come talk with our community in the following channels:
Website | Forum | Twitter | Discord | Telegram