zerokn0wledge

Secret Network deep dive: TEE-based private smart contracts on Cosmos

Thread1,012 words10 likes
BreakdownPrivacyL1/L2Secret NetworkCosmosSecretSwapKeplrEnigma$SCRT$ATOM

Mega thread on Secret Network: encrypted contract state via TEEs, Cosmos SDK and IBC base, SCRT staking and inflation mechanics, governance, and private DeFi such as SecretSwap that resists front-running and MEV.

Key claims
Mainnet launched 13 Feb 2020, evolved from Enigma
Inflation targets about 15%, ranging 7% to 20% depending on whether stake is above 67%
Historical staking yield 25% to 30%, max 50 validators
0/ @SecretNetwork is an independent, layer 1 blockchain network built using the @cosmos SDK. It supports smart contracts & data privacy by default, thereby enabling developers to build dApps that protect user data & preserve privacy 🔒 A mega 🧵 on $SCRT (0/30) 👇 1/ @SecretNetwork's mainnet went live on Feb 13th 2020. It originally launched as Enigma, a project founded in 2017 with the aim to bring a L2 private computation solution to $ETH 2/ @SecretNetwork is a an open-source protocol built with Rust, enabling dApps to perform encrypted computations. Secret contracts make it possible for dApps to use private data on $SCRT network, while providing similar functionality to their counterparts on $ETH & other chains 3/ It really is @SecretNetwork’s ability to take encrypted inputs and produce encrypted outputs without exposing any data using encrypted contract states during secret contract execution, that makes this L1 so unique 4/ But how do they do it? Data privacy on the $SCRT is achieved through a combination of key management & encryption protocols working within a Trusted Execution Environment (TEE) x.com/mrkusama_eth/status/1484546265329373184 5/ This enables a broad array of use cases. For example, secret contracts allow devs to build private voting mechanisms that are provably correct within their applications, while preserving voter privacy 6/ Moreover, secret contracts could provide the basis for credit scoring applications that are capable of generating credit scores using verified user data without ever exposing sensitive data on-chain 7/ Because preserving data privacy has traditionally been a big issue for blockchain-based applications, secret contracts address a very important topic, that is likely to only gain in importance x.com/mrkusama_eth/status/1484546235549822978 8/ @SecretNetwork was built on the @cosmos SDK using Tendermint for consensus, a popular delegated proof-of-stake (DPoS) consensus algorithm. Currently, a maximum of 50 node operators are validating & hence securing the $SCRT network 9/ Being built on $ATOM comes with the additional benefit of built-in cross-chain interoperability via the inter-blockchain communication (IBC) protocol. IBC supports transmission of arbitrary data across IBC-enabled blockchains in the @cosmos ecosystem 10/ Hence, thanks to IBC, application-specific “zones” and “hubs” in the $ATOM ecosystem can leverage @SecretNetwork by using its distributed network of secret nodes for privacy-preserving computations 11/ $SCRT is the native token of @SecretNetwork and primarily used to secure the network. Nodes in the network receive fees and network rewards in $SCRT but must also stake $SCRT in order to operate a node 12/ When nodes go offline or act maliciously, they can be "slashed" and lose part of their $SCRT stake. Holders of $SCRT who are not operating nodes can participate by bonding their stake to a specific node to become a delegator 13/ Delegators earn a share of network fees and rewards of the validators they are delegating to. Returns depend on the number of coins staked on the network & the $SCRT inflation rate. Historically, staking $SCRT yields an annual return between 25-30% 14/ @SecretNetwork's target issuance or inflation rate for $SCRT is around 15% of total supply. If < 67% of the supply is staked, the inflation rate can increase to a maximum of 20%. If > 67% is staked, the rate gradually decreases to a minimum of 7% 15/ A total of 15% of these rewards get directed to the Secret Foundation in order to fund operations and initiatives to increase network adoption. As opposed to many other projects, the foundation didn't receive a portion of the initial supply 16/ Aside network security & transaction fees, another key utility of $SCRT is governance. Secret nodes can create and vote on governance proposals using $SCRT, which decentralizes control of the network among the community 17/ Most network parameters, such as the inflation & community tax rates, are decided through on-chain governance using $SCRT 18/ @SecretNetwork’s governance system is a token-weighted on-chain mechanism that determines valid proposals & execute changes. $SCRT also uses an off-chain forum that allows contributors & community members to suggest & discuss potential changes before they reach proposal stage 19/ But what makes me really bullish on $SCRT is #SecretFinance. Secret finance refers to an ecosystem of DeFi applications with privacy by default, enabled by smart contracts built on @SecretNetwork 20/ Since smart contracts on @SecretNetwork are privately encrypted, #SecretFinance applications are private by default, meaning that sensitive financial data will be secure and protected from onlookers, malicioius actors & interestingly even front-running bots 21/ Front-running is the process where bad actors trade with inside information of a future transaction that will affect its price substantially. This can be done by purchasing a specific cryptocurrency with the knowledge that a large purchase is about to occur 22/ Due to the public nature of blockchains, transactions and their corresponding gas prices are publicly visible, even before a block is mined. This also causes what is known as "Miner Extractable Value"(MEV) 23/ Simply put, this means a situation in which miners can determine the order in which txs are processed on chain & exploit this power by submitting a transaction with a higher gas price resulting in their transaction being mined first 24/ Front-running and MEV results in a risk-free profit for the malicious actors at the expense of individual users. @SecretNetwork’s default privacy in DeFi solves this problem. Since orders are never visible in the mempool, no attacker can front-run orders 25/ @secret_swap, @SecretNetwork's first major application-layer #DeFi application, launched on back in March 2021. It is a privacy-first cross-chain AMM. Since @secret_swap uses secret contracts, it has the before-mentioned features of… 26/ …Front-Running Prevention: Inputs in the mempool are encrypted, which means miners can’t extract value by reordering or front-running your txs 27/ …Privacy: As inputs to a swap contract are encrypted, users data & txs remain private assuming more than one address executes a swap each block 28/ A popular software wallet that you can use to store your $SCRT is @keplrwallet x.com/mrkusama_eth/status/1484611255998599168 29/ In any case, I’m super excited to watch the $SCRT ecosystem evolve! #PrivacyWeek #ExpectPrivacy #SecretNetwork #Cosmos #IBC #Privacy 30/ What are your thoughts on @SecretNetwork & privacy in the crypto/DeFi space? $SCRT
Open on X
zerokn0wledge avatar
Working together

Research, campaigns and builds for deep-tech teams.