Introduction to Private, Decentralized Custody

Guest author Excheqr provides an intro to keeping your digital assets secure and decentralized.

Secret Network
April 10, 2023
Twitter
LinkedIn

Note: This blog post was written by a guest author. We’re featuring this article as part of a new “Research” category on the Secret Network blog, which will explore topics relating to cryptography, privacy, and general blockchain technology. These topics all tie into the research being done for Secret 2.0. If you’re interested in having your own article featured, contact us. You can also join in on the Secret 2.0 discussion on the Secret Discord and Telegram.

If you’re interested in more from this author, the original article can be found here.


Excheqr is the first fully programmable and private, chain-agnostic custody protocol and wallet infrastructure that lets businesses quickly spin up powerful, bespoke digital assets operations with no upfront engineering investment. Excheqr combines institutional-grade security of cutting-edge cryptographic protocols (MPC/TSS) with smart contracts’ programmability and immutability to provide the most advanced and secure stack on the market for managing digital assets efficiently and at scale. This architecture lends our custody solution unique properties that have historically been limited to centralized or custodial services, most significantly: privacy and arbitrary wallet automations.

MPC or Account Abstraction?

One of the big debates recently in custody management is which of MPC and Account Abstraction (AA) will power custody tech in the future.

MPC or Multi-party Computation refers to a family of cryptographic protocols that allow a set of untrusting parties to do a computation jointly without revealing their respective secrets. In the context of blockchains, MPC and threshold cryptography are used to shard the private key associated with an account off-chain to distribute the resulting key shares among multiple parties. Signing a transaction then requires coordination among a threshold number of parties without the said parties needing to reveal their respective shares. This technique works beautifully across most public blockchains today since the underlying signature schemes in use are homogenous (primarily ECDSA, EdDSA). Another interesting property is that the final signature (performed off-chain) looks like a signature from the original key — which is both privacy preserving and gas-efficient. One of the key drawbacks of MPC is limited programmability — it’s very hard to enhance MPC protocol designs to suit specific use cases.

Account Abstraction (AA) is the encapsulation of a family of related ideas collectively aimed at improving the end-user experience when interacting with services on Ethereum and other decentralized networks. EIP-4337 enshrines the latest ideas for implementing AA, setting standards for its implementation at the application level. At its core AA seeks to substitute the inflexibility of externally-owned accounts (EOAs) with the programmability of smart contracts, establishing smart contract-based accounts as the default user accounts in Ethereum and other chains that maintain the EOA vs. smart contract account distinction. EOAs impose rigid requirements for validating transactions that are hard-coded into the protocol layer. Abstract accounts (i.e. AA-compliant smart contract accounts) allow for incorporating highly expressive rules for validating transactions, making it possible to program custody to fit specific use cases. In addition to validation rules, AA also seeks to abstract concepts of gas and nonce in Ethereum transactions — technical details everyday users should not have to deal with. However, there are still some challenges with smart contract-based accounts limiting their usability, chief among them are: gas inefficiency (complex validation rules means more on-chain compute, which means more gas); varying support for live, battle-hardened smart contract accounts across chains; and irregular support for the contract wallet signature specification (EIP-1271) across dApps on Ethereum. A more fundamental gap with smart contract accounts on fully-transparent chains like Ethereum is the lack of privacy — a number of corporations and institutions would hesitate to expose internal risk and policy controls by putting them on-chain.

The truth is that while both MPC and AA are powerful technologies to design digital asset custody, today they each have limitations that make them suitable for certain types of applications. Until now, businesses needed to choose one or the other depending on their use cases or the experience they need to deliver for their end-users. Our stack combines the benefits of both MPC and AA bringing a “silver-bullet” custody suite to institutions and businesses:

  • Standardized implementation and chain-agnostic
  • Fast and gas-efficient
  • No special support needed from DApps
  • Extensive programmability to support any use case

Solution Design

The best way to think about our solution is as a single decentralized point of access to all blockchain networks with programmable and private multiparty access control. We achieve this by using Multi-Party Computation (MPC) to split an account’s private key material, combined with a smart contract policy engine on a privacy-preserving network, such as the Secret Network.

MPC protocols are hard to program to arbitrary use cases and introducing more capabilities into the protocol often comes with risks. Enter hybrid custody. Hybrid custody is the idea that the user retains some shares of the root key and allows a third party to custody some number of shares that is usually less than the threshold M needed to generate a signature. This has many use cases, but one powerful aspect of this design is that a trusted third party can be used to impose arbitrary access control rules. Take a 2-of-2 scheme for example. One key is with the user and the other key is controlled by a trusted counterparty. This counterparty can be used to impose arbitrary access and risk control rules as a way to protect the user’s assets. The counterparty key works as a protection mechanism. But there are a few drawbacks to this approach:

  1. You are trusting a third party to securely store their key share and/or make it available in a timely fashion whenever you need it to sign a transaction.
  2. You further hope that they will accurately impose your controls for you without ever failing on that promise from factors beyond their control: eg: vulnerability introduced by accidentally pushing bad code; malicious intent; internal collusion, etc.
  3. Since your counterparty only holds partial key material, you’re needed to sign / approve every single transaction that you’d like to execute. This limits what you can do with on-chain services and also precludes automated on-chain risk mitigation.

This is where smart contracts, with their properties of trustless immutability, come in. Smart contracts are useful when you need to eliminate risks originating from counterparty reliance. And hybrid custody is a powerful use case thereof. In our design, we use a set of smart contracts on the Secret Network to encapsulate the logic of user-defined risk controls and policies (eg.: role based access controls). The contract also stores encrypted partial key material accessible for generating signature only when the policies in the contract are satisfied. In other words, a private smart contract does the job of the trusted counterparty in the hybrid custody model described earlier.

Wallet automations-as-a-service

An important feature of our stack is the concept of proxy key control. The idea is that the wallet owners grant selective access to a third-party service provider (or multiple providers) through “proxy keys”. Proxy keys are a kind of access key that can only execute a predetermined set of transactions on the wallet owners’ behalf. These preconditions for performing a transaction are coded into smart contracts that emulate the programmability of abstract accounts and run on the network holding the final MPC key share in a secure / encrypted manner. Proxy keys make the magic of arbitrary programmability and automations possible, while eliminating the need to trust a counterparty with your keys.

Our stack thus allows businesses and institutions to automate any on-chain activity (eg. executing DeFi trades, risk mitigation, token distribution and vesting etc) in a generalizable way, and on any chain. You get all the advantages of a custodial solution (such as CEXs) without giving up key custody or being constrained on how you define or distribute access to the keys to a wallet.

Use cases

Excheqr’s cutting-edge stack makes it easy and quick to set up crypto operations back-office for institutions, asset managers, merchants and service providers managing digital assets for themselves or on behalf of their customers. These include a number of novel use cases heretofore not possible with non-custodial wallet infrastructure providers. While a lot of use cases are technically possible given the powerful generalizability of our stack, we plan to start with focusing on the following:

Institutional custody and back-office for crypto/DeFi

Institutional funds such as traditional hedge funds, crypto/DeFi focused funds, market makers, banks and exchanges, prop funds, family offices and asset managers looking to support crypto offerings or trade in DeFi today rely extensively on centralized exchanges or custodians for securing crypto, executing trades, and mitigating risks. However, recent events (including collapse of FTX, BlockFi and Celsius) have exposed the non-trivial counterparty risks associated with reliance on centralized/custodial providers. Our stack is the only production-ready non-custodial stack that supports similar or a higher degree of sophistication when it comes to supporting these use cases in a generalizable fashion. Our automation-as-a-service offering drastically reduces set up time by eliminating the engineering time and resources needed for institutions to set up non-custodial crypto operations on their own, and offers scalable and programmable security, privacy and efficiency in DeFi trading cost effectively. In doing so, we significantly reduce the barriers to entry for new institutional players looking to access the world of crypto and DeFi. We support both no-code (highly customizable SaaS platform) and API based setup.

Wallets

Wallets today are limited in their capabilities. There’s significant demand for things like seedless wallet setup, social recovery, and social logins to authorize access to the wallet. Further, one of the more interesting use cases emerging is auto-payments or debits — something users have come to expect from their financial services provider because of its efficiency and great user experience. This is not possible with any traditional wallet or wallet infrastructure provider today. Our automation-as-a-service feature via proxy key control allows wallet providers to turbo-charge their wallet offering in a competitive market to truly stand out.

DApps

DApps can take advantage of our stack to not only simplify onboarding for new users, but also plug into our stack to directly support trade and risk management automations within their application UI, without needing to deal with the onerous regulatory requirements associated with becoming qualified custodians.

Crypto payments

Crypto payments and merchant settlements (especially in stablecoins) are gaining popularity among merchants and payment service providers (PSPs) looking to either support payments in crypto or looking to take advantage of the finality and near-instant settlement times associated with crypto. Our stack can support these use cases for merchants directly, or enable PSPs to offer support for these use cases to their merchants, by plugging into our infrastructure. Perhaps the most striking feature we enable, without the need to involve a custodian (i.e. entirely non-custodially) is auto-payments. Let’s say a merchant wants to support crypto payments for their users. One of the features of crypto payments that make them secure but has also held back its wider adoption is that crypto payments are push-based and typically need a user signature. Abstract accounts are a step in the right direction for making crypto payments more practical to support for a wide range of use cases. Our stack brings those benefits across chains (including Bitcoin, Ethereum, Polygon and other chains that enjoy significant adoption) today.

Keep up with Excheqr: Website | Twitter | Medium | Discord | Email


Note: This blog post was written by a guest author. We’re featuring this article as part of a new “Research” category on the Secret Network blog, which will explore topics relating to cryptography, privacy, and general blockchain technology. These topics all tie into the research being done for Secret 2.0. If you’re interested in having your own article featured, contact us. You can also join in on the Secret 2.0 discussion on the Secret Discord and Telegram.

If you’re interested in more from this author, the original article can be found here.

Onwards and upwards!

To discuss Secret Network and Secret Apps, visit our community channels:

Website | Forum | Twitter | Discord | Telegram