Arweave to Ethereum cross-chain system design - everFinance - Medium

Recently everPay has launched AR cross-chain, users with AR native token can cross-chain to ethereum mint WAR (Wrapped AR) via everPay.

How to Make Cross-chain Transfers between Arweave and Ethereum with everPay

The following article describes in detail how everPay implements a decentralized AR cross-chain system.

AR Cross-Chain Architecture

There are two main players involved in the cross-chain system:

proposal hub & watchmen

proposal hub

proposal hub implement the following functions:

  • RSA threshold signature secret key distribution

  • Collect watchmen signatures and perform signature

  • Multi-signature transaction and on-chain

RSA threshold signature secret key distribution

On ethereum, cross-chain systems use smart contracts to implement multiple signatures.

Since arweave does not support smart contracts, the only way to implement multiple signatures on arweave is through additional cryptographic algorithms.

Since only RSA encryption algorithm exists on arweave, the cross-chain system chooses to implement multiple signatures based on IBM Labs’ RSA threshold signature algorithm. (Note: This article will not discuss the principle of RSA threshold signature implementation, interested readers can learn Practical Threshold Signatures by themselves).

proposal hub ​​​​shoulders the responsibility of RSA threshold signature key generation and distribution.

In order to prevent the leakage of the generated threshold signature key from the source, the ecc pubkey of the watchman is injected in the process of generating the RSA threshold signature key to carry out ecies asymmetric encryption, and only the watchman can decrypt the RSA threshold key shared distributed to himself using the respective ecc private。

Even if the proposal hub has a data leak, hackers cannot get the key shared, and to decrypt the key shared they must have the watchman’s ecc private key. Only by getting more than two-thirds of the watchman’s ecc private can control the AR lock position address on arweave, which greatly enhances the attack cost of hackers.

The ecc curve used by proposal hub is fully compatible with ethereum, so watchers only need to keep a valid ethereum secret key pair to complete multiple signatures for ethereum and arweave.

The RSA threshold signature key pair is generated only once, and a new threshold signature key pair is re-generated only when a watchman is added or removed.

The key generation and gaining process in the system is as follows:

  1. The first time the system is running, the proposal hub needs to get the pubkey of all watchmen, and the hub automatically generates RSA key shards and uses the pubkey for encryption.

  2. After the RSA key shard is generated, watchmen request the proposal hub to obtain the RSA threshold signature key shard using the ethereum address.

  3. watchmen decrypts the shard using the private key held by ecc and uses the shard for Arweave signing.

Collect watchmen signatures and perform signature

The proposal hub collects AR burn proposals and proposal signatures submitted by watchmen.

If the signers of the proposal reach the threshold of multiple signatures, all watchmen signatures of the proposal are automatically aggregated and the transaction is then set off for the on-chain execution.

Multi-signature transaction and on-chain

Proposal signatures that have completed signature aggregation are uploaded by the hub for processing.

If the proposal is signed with a burn native AR token, assemble the arweave tx and send it to arweave.

If you sign a burn ERC20 WAR proposal, assemble the ethereum tx and send it to ethereum.

watchmen

watchmen is a service that every watchman needs to run, mainly to implement the following features:

  • Decrypting RSA Threshold Key Shards

  • Listening for proposals from burn AR on everPay

  • Submitting signatures

Note: “Proposal” below in AR token cross-chain means the user initiates an AR burn transaction in everPay.

Decrypting RSA Threshold Key Shards

After watchmen starts, it goes to the proposal hub to get the watchmen’s rsa threshold secret key shard, and then uses the watchmen’s private key to decrypt the completed RSA key shard, which is used to sign the burn ar to arweave proposal.

Listening for proposals from burn AR on everPay

Watchmen listens to all transactions of everpay rollup on the arweave network in real time. watchmen automatically verifies the validity of all transactions, and when there is a valid ar burn transaction, watchmen generates an ar burn proposal and signs it.

Submitting signatures

Submit the proposal with your signature to the proposal hub。

When the proposal has collected enough signatures in the hub, the hub completes the aggregation of signatures and processes the proposal for uploading.

Reference

Subscribe to Sandy
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.