On 8 August 2024, NEAR announced the launch of “Chain Signatures,” which allow NEAR accounts, including smart contracts, to sign and execute transactions across supported blockchains. According to NEAR, Chain Signatures can remove barriers to entry, promote liquidity and greater usability, and foster a chain-abstracted future. This article will examine Chain Signatures and understand how they work. It will also briefly discuss how to create a Chain Signature.
The Challenges Of Cross-Chain Interoperability
Bridge volumes have registered a sharp uptick in recent months, signaling a growing demand for cross-chain interoperability and transactions. However, cross-chain interoperability comes with challenges, primarily because cross-chain bridges are vulnerable to exploits thanks to a large attack surface. The second problem is a lack of chain support. Most bridges do not support non-EVM chains. The third major issue is an inconsistent and cumbersome UX. Each bridge has a different design, meaning users must go through a learning curve before using it.
Another significant problem occurs when users must acquire different tokens to pay gas fees. Some bridges also use a wrapped version of a particular asset. The wrapped version is different from the native asset on the original chain. It may not even be the asset the user needs, and once bridged, they may end up with an unsupported asset or one with low liquidity.
What Are The Challenges Facing Cross-Chain Interoperability?
What Are Chain Signatures?
Chain Signatures on NEAR enable all NEAR accounts, including smart contracts, to sign and execute transactions across multiple supported blockchains. They leverage Multi-Party Computations (MPC), and a distributed network of node operators to create joint signatures, allowing NEAR accounts and smart contracts to control external blockchains. MPC is a privacy-preserving coordination protocol that allows multiple parties to perform computations without revealing the data to one another. Chain Signatures unlock the next level of blockchain interoperability by giving a single NEAR account ownership of a diverse range of assets, data, and cross-chain accounts.
How Do Chain Signatures Work?
Chain Signatures on NEAR function due to interactions between three key elements:
- Derivation paths
- Multichain smart contracts
- Multi-party Computational Service
Let’s take a closer look at each.
Derivation Paths
Chain Signatures allow one NEAR account to be linked to addresses based on other blockchains using a mechanism called Additive Key Derivation. This is a simple mechanism used to derive subkeys from a single master key. The subkeys are generated using Derivation Paths. Now, what is a Derivation Path? A Derivation Path is a simple string that derives a unique address on the target blockchain when used with a NEAR account.
Multichain Smart Contracts
As the name suggests, a multichain smart contract requests signatures for transactions on other blockchains. These contracts use a sign method that considers two primary parameters when requesting signatures.
- The payload or transaction that has to be signed for the target blockchain.
- The path that identifies the account that a user wants to use to sign the transaction.
When a request for signatures is made, the sign method yields “execution waiting”, and the MPC signing service signs the transaction. Once ready, the contract resumes computation and returns the signature to the user. The signature can then be sent to the target blockchain, where it can be executed.
Multi-Party Computation Service
Earlier in the article, we briefly discussed Multi-Party Computation (MPC). MPC enables independent parties to perform shared computations on private information without revealing anything to one another. Blockchains can use this system to sign transactions on behalf of users without disclosing private keys. The Multi-Party Computation Service on NEAR consists of independent nodes. These nodes cannot sign transactions by themselves. Instead they create signature-shares. These signature-shares are aggregated through multiple rounds to jointly sign transactions.
When the MPC service detects a signature request, it executes the following steps.
- Requests the nodes to jointly create a signature for the payload using the account identified by the path.
- Call the v1.signer contract to store the signature once it is ready.
What Key Elements Facilitate The Functioning Of Chain Signatures?
Creating A Chain Signature
Creating a Chain Signature involves five steps:
- Deriving the foreign address
- Creating a transaction
- Requesting a signature
- Reconstructing the signature
- Relaying the signed transaction
Deriving The Foreign Address
As mentioned, Chain Signatures use derivation paths to represent an account or accounts on the target blockchain using the steps listed below. The NEAR account’s name and derivation part are used to derive a unique address for users on the target blockchain.
Creating The Transaction
After deriving the address, the user constructs the transaction that must be signed. The steps to create the transaction that has to be signed differ depending on the target blockchain.
Requesting The Signature
Once the transaction is created and ready to be signed, a signature request can be made by calling “sign” on the MPC smart contract. This method requires two key parameters: the transaction must be signed for the target blockchain and the derivation path for the account being used to sign the transaction.
Reconstructing The Signature
The MPC contract does not return the transaction signature itself. Instead, it returns the elements needed to reconstruct the signature, allowing the contract to generalize the signing process for multiple blockchains.
Relaying The Signature
Once the signature has been reconstructed, it can be relayed to the corresponding network. This method also varies depending on the target blockchain.
Use Cases Of Chain Signatures
Chain Signatures have several potential use cases. Let’s look at some of them.
DeFi On Non-Smart Contract Chains
Chain Signatures can enable DeFi on non-smart contract chains, including Ripple, Doge, and even Bitcoin. So far, these chains only support transfers on the network. NEAR smart contracts can act as escrow contracts, and developers can also build swaps or lending protocols capable of supporting any asset on any chain.
Chain Agnostic Applications
Chain Signatures can sign transactions for multiple blockchains, allowing developers to support different chains with one smart contract.
Multichain Account Abstraction
Chain Signatures can enable users to control assets on multiple chains with just their NEAR account. They can also utilize account abstraction features on different chains, including passkeys and key rotation.
Bridgeless Cross-Chain DeFi
Cross-chain signatures eliminate the need for cross-chain bridges. Instead, cross-chain transactions can be conducted using MPC signature protocols, facilitating a range of DeFi products. Smart contract-based Chain Signatures can also facilitate privacy-focused apps and trustless multichain deployments.
Getting Started With Chain Signatures
You can familiarize yourself with Chain Signatures by following the steps listed below.
- You can review NEAR documentation to understand how Chain Signatures can simplify interactions between blockchains.
- You can also look at some examples of Chain Signature use cases. These include Multichain DAO, Multichain NFT Minter, and the Bitcoin Runes airdrop.
- You can access detailed technical information and code snippets through the Chain Signatures documentation on NEAR.
- You can also use demos to send transactions on Bitcoin, Ethereum, Doge, and Ripple.
- Lastly, you can engage with the Chain Signatures community by joining the Chain Abstraction developers’ channel on Telegram.
In Closing
Having recently made their way to the mainnet, Chain Signatures have emerged as a powerful tool allowing NEAR accounts to control accounts on other blockchains. This marks a crucial step in enabling ownership of assets and data across multiple chains. Chain Signatures make the entire process of cross-chain ownership on-chain. All users must do is call the smart contract and await a response.
What Are The Use Cases Of Chain Signatures?
Deviation paths allow a single NEAR account to control multiple accounts on multiple blockchains, while MPC service allows users to ensure only they can request signatures for those accounts. Chain Signatures can also drive chain abstraction, allowing a single user layer to interact with any asset on any chain, simplifying the complexity of Web3.
Multi-party computational service is a transformative technology that enhances privacy and security in digital transactions. By enabling multiple parties to compute a function together without exposing their individual inputs, it fosters trust and collaboration across various sectors[5].
Chain Signatures represent a significant advancement in blockchain interoperability, offering seamless asset and data management across multiple chains directly from NEAR accounts. This innovation not only enhances the fluidity of asset ownership but also simplifies user interactions with decentralized technologies, embodying a leap towards a truly interconnected blockchain ecosystem.
🤣 🤣 🤣