The Secret Network community believes privacy is necessary for mainstream adoption of decentralized technologies. Our vision of the future involves many different blockchains with specific purposes, all of which benefit from being able to use private data safely and securely. Users of decentralized applications will be able to maintain ownership and control of their identity and data. This is one of the reasons we are thrilled to be building part of the internet of blockchains with Cosmos. 💫💫💫

In this post, we explain how the Secret Hub can benefit Cosmos. First, we give an overview of the Cosmos network, then we share ways our community is learning, collaborating and coordinating with particular members of the Cosmos ecosystem, including the Cosmos Governance Working Group, CosmWasm and the Interchain Foundation. Next, we discuss opportunities to support existing projects. Ultimately, our goal is to make privacy one with the Cosmos!

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:

  1. Tendermint
  2. Cosmos SDK
  3. 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.”
cosmos.network/sdk

Whereas the Enigma Discovery network relied on Ethereum for consensus, the 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:

Why the Cosmos move doesn’t mean we’re leaving Ethereum
Seen this question/assumption pop up again and again, so wanted to address it head on. Just because the Enigma Chain is its own chain with Tendermint PoS consensus (based on Cosmos), doesn’t mean that we’re abandoning Ethereum. It’s important for people to separate the technical aspect from the pro…

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

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

Understanding this revolutionary technology is challenging, so the IBC team recommends breaking it down into 4 components:

  1. 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
  2. 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)
  3. 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
  4. 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).
packet transit between two machines, rendered spatially

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.

Secret Hub

In the future, application-specific zones will use our network of SGX-enabled nodes for private computations. By implementing our compute module, any blockchain developer will gain the ability to utilize Secret Contracts in their system. In order to pay for gas, users will need Secret coins (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, which should operate like a Secret Hub with many connections to other zones that need privacy.

cosmos.network

For example, transactional privacy will be important for zones in the Cosmos ecosystem, including the Cosmos Hub, Terra, etc. Secret access control is another interesting way to leverage the power of secret contracts. We’d love to see more creative applications built on Cosmos, and game developers might need private computation in order to meet certain requirements. Secret voting is another exciting use case, which potentially benefits every implementation of the Cosmos SDK and its governance module. Learn more about how that could work:

Secret governance module
In addition to collaborating with the CosmWasm team, we have been exploring ways to contribute within the Cosmos ecosystem. One particularly exciting opportunity involves extending the gov module to enable privacy-preserving voting for on-chain governance. As we’ve covered before, secret ballots are…

We’re looking forward to integrating secret contract functionality and continuing to explore the many possible use cases of Secret Apps. If you have any ideas or questions, please come talk with our community in the following channels:

Our Forum | Cosmos Discord | Secret RocketChat

To infinity and beyond! 🛸