Skip to content

Instantly share code, notes, and snippets.

@CDDelta
Last active April 15, 2023 22:59
Show Gist options
  • Save CDDelta/b9680a7f20908b58572a104be3d46e3e to your computer and use it in GitHub Desktop.
Save CDDelta/b9680a7f20908b58572a104be3d46e3e to your computer and use it in GitHub Desktop.
Ethereum -> Arweave Bridge Draft Proposal

Ethereum -> Arweave Bridge

Status: Draft

Abstract

This document describes a possible implementation for an Ethereum to Arweave bridge that allows Ethereum smart contracts to create Arweave transactions. Note, this does not involve bridging the AR token onto Ethereum.

Motivation

Currently, in order to use Arweave a user needs to have an Arweave wallet with AR. To use Arweave in tandem with another network a user will need to own both their network's native token and AR, creating friction in the user experience and making Arweave integration in DApps unapproachable for most. Arweave's utility as a permanent store of information can be greatly extended with a method for DApps from other networks to "purchase" storage on it.

Ethereum is the largest smart-contract capable blockchain in the world and a bridge between it and Arweave will not only enable new DApp use cases but also increase the value of the Arweave network as a whole.

Note: This proposal is not about bridging AR onto Ethereum.

How can it work?

Taking inspiration from Wormhole (an Ethereum <-> Solana bridge), a proof of authority (PoA) network that will accept payments in ETH/ERC-20 tokens in exchange for creating Arweave transactions can be setup.

This network can be backed by trusted members in the Arweave community (Arweave Team, ARCA DAO etc.) whose incentives are aligned with the success of Arweave. While a PoA network his reduces the decentralization of the bridge it also saves on complexity by removing the need for complicated proof of stake game theory.

Paying for Storage

A user calls an Arweave point of sale contract with details of the transaction they want to upload onto Arweave and pays the price specified in the contract (ETH or any ERC-20 token as defined by the contract). This payment is locked into the smart contract over the course of the transaction.

Creating the transaction

Nodes in the PoA network observe the smart contract for transaction requests and select a member (in a round-robin or random manner) to create the corresponding transaction on Arweave. The selected node is given a short period of time to create the transaction on Arweave. If the selected node fails to create the transaction in time, another is selected.

Whether or not a node did create a transaction can checked using the owner of the data bundle transaction that contains the caller's requested transaction id. (The network does not need to know who created the transaction at first, it just needs to know that someone did. As long as the "pending" status on the transaction is known, nodes can stop trying to select a new node to create the transaction. Who created which transaction can be decided when the time comes to redeeem rewards from the contract, by then the data bundle transaction should be mined and its data should be accessible all over the network. Before it is mined this is unknown since the contents of the bundle would be inaccessible outside of the gateway it was created with)

Transactions can be created using Arweave's delegated transactions feature which will allow the contract caller to own the transaction with their own Arweave wallet even without AR.

Node Rewards

Nodes are rewarded for participating in the network with the tokens paid to the smart contract which can be unlocked when 2/3+ majority of all nodes in the network agree to the conditions of the payout.

Nodes that have uploaded transactions onto Arweave can be paid more to compensate for their AR costs.

Uploading the Transaction Data

Since the caller knows the id of the transaction they created, they can observe the status of the transaction on Arweave with a gateway and upload their data eagerly before it is even mined. (Can you upload data to a gateway that does not yet know that the transaction exists? When do gateways receive notice that a transaction is "pending"? Maybe gateways can be modified to observe the Ethereum network for requests to create Arweave transactions)

Specification

404 Not Found

Security Considerations

Many!

Further Work/Questions

  • The contract can be extended to allow callers to buy AR. (Maybe we can start with this first...)
  • Can nodes be rewarded for participating with a better Wildfire score? Does it make sense for a miner to do this since not all nodes can participate?
  • How will nodes remember which node was selected to do uploads? Wormhole posts all of its node's actions on Solana, can Arweave keep up with the speed required for this? Maybe use a custom blockchain for this network (saves on fees)?
  • Investigate Polkadot/Substrate for this.
  • Pricing using oracles??
  • Bridging AR onto Ethereum as an ERC-20 token introduces complexity because of the burns/mints/vaults that need to be orchestrated while providing minimal utility.
  • Does this entire thing even work???
  • Extension to other chains
  • True decentralisation...

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment