EOS21 Protocol ✌🏻☝🏼

Teleport your ERC20 tokens to EOS.

中文版

Summary

EOS21 is a protocol to enable cross-chain ⛓ token movement between ETH and EOS.

The goal of this protocol is to provide a standard for app developers to move their tokens and apps between chains.

Join the shEOS telegram to discuss EOS21. Also please consider casting your vote for sheos21sheos as a Block Producer.

Built With

Prerequisites

EOS21 Overview

We believe that any token should be able to move as the developers desire or require as their apps may be best run on different chains at different times.

Typically, the way this has been done is by using what we call the “snapshot” method. 📸 This method is commonly used by token “airdrops” to send to accounts on ETH or EOS chains that match certain criteria such as having an address with at least X balance of the chain’s native token. The EOS native token generation from the ERC20 was a snapshot airdrop. EOS was able to do this by expiring their ERC20 contract thereby making the ERC20 EOS tokens non-fungible.

In the EOS21 protocol, we are providing another option for ERC20 contracts that do not have a built-in pause/expiry function but who want to move their token to another chain. We are calling this action: teleportation. To teleport a token from one chain to another, it will exist on the destination chain, but no longer exist in a fungible form on the source chain.

The EOS21 Protocol has 3 Dimensions

The standard Blackhole contract has 2 functions - be authorized to receive token Y from Ethereum and then receive the EOS account info the tokens to be distributed on the destination chain via the Oracle.

Once a user sends their tokens and destination account to the Blackhole, the ERC20 tokens will become non-fungible and the EOS tokens will be teleported to their destination account on the EOS chain.

The developer can choose to either send the tokens to a 0X000 address and thereby 🔥 them, or hold them in the Blackhole contract.

EOS21 Github Inventory

Contributing

Pleaes read CONTRIBUTING.md

EOS21 is open-source and we encourage you to customize, fork, and use the code. We built this as a example case. Some of the ideas we have include:

End-to-End Testing

For testing, we will use a local Ethereum chain via Ganache and the EOS Jungle Testnet.

Overview for Testing

Our scripts automate some of this process, but this is to help you understand what each step is in the process.

  1. Create token on Ethereum. Truffle does this. (4 tokens will be notated as 40000 with 4 decimals in Ethereum contract - configure this in the config.json).
  2. Distribute new tokens to fresh Ethereum account. Truffle does this.
  3. Deploy blackhole contract. Contract address will automatically update in the truffle config file).
  4. Deploy standard eosio.token contract on Jungle Testnet.
  5. Issue EOS token via eosio.token contract. Parameters are configured in config.json
  6. Start teleport_oracle on node.js server.
  7. Source Ethereum account must send 2 actions.
    • Authorize blackhole to teleport an amount of ERC20 tokens.
    • Send EOS account name to activate teleportation.
  8. Oracle will catch the event on Ethereum and send the tokens to the EOS account specified in step 7.
  9. Close blackhole.

Ganache / Jungle Testing Prerequisites

Ganache / Jungle Testing Preparation

Step 1: Truffle Deployment of Ethereum Contracts (ERC20 token + Blackhole)

Step 2: Deploy Oracle

Step 3: Deploy EOS Token Contract

Step 4: Test Teleportation

Your test tokens have been teleported!

Mainnet Deployment

WARNING !

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

We strongly recommend testing first using the Ganache / Jungle Guide outlined above.

Testing Preparation

People

Authors

Contributors

Shoutouts

Cryptolions - For keeping the Jungle Testnet alive! And for the awesome Jungle Testnet T-Shirts.

Brock Pierce - Thanks for giving the protocol a name - EOS21.

Crystal Rose - Thanks for giving birth to the idea for this protocol and all of your support.

License

This project is licensed under the MIT License - see the LICENSE.md file for details