GithubHelp home page GithubHelp logo

arkadiuszsz / etgate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mossid/etgate

0.0 1.0 0.0 110 KB

Ethereum-Tendermint token sending gateway

Go 92.81% Shell 0.51% HTML 2.46% JavaScript 4.21%

etgate's Introduction

ETGate

Send ethereum tokens to tendermint zones.

Usage

Start etgate

  1. Install golang, geth, and basecoin.
  2. Git clone this repository.
  3. cd to cmd/etgate and go build.
  4. Run geth --testnet --fast on the other window and wait until sync is completed.
  5. Run ./init.sh
  6. Run ./etgate gate start --testnet --nodeaddr=tcp://localhost:12347

Deposit/Withdraw ethers

  1. cd to server/ and go build
  2. Run ./server
  3. Open http://localhost:12349 on your web browser
  4. Paste your deployed contract's address and name of the key(money)
  5. Type the amount of ethers you want to deposit and press Deposit
  6. Type the destination address, the amount of ethers, password of your tendermint account, and press Withdraw

Demo

Demo

Features

Deposit

Each time when users send deposit message to the contract, it will generate an event. The relayers, on the other hand, will consistently upload ethereum headers to the tendermint zone. Since an ethereum header contains the merkle root of the receipts, the events could be proven with proving merkle path. This scheme is called sidechaining. The zone will mint new coins right after the relayers uploaded the events.

Withdraw

NOTE: As merkleeyes uses ripemd160 instead of keccak-256, it is extremely expensive to prove data in a tendermint zone with solidity(nearly 0.1ether). For now, ETGate uses 2/3+ validator's multisig for each withdrawal to be validated.

The relayers also upload tendermint headers to the contract. The contract will confirm the header when 2/3+ validators signed. After the corresponding header is confirmed, the users can withdraw their tokens via submitting the necessary data(destination, value, etc) and its merkle proof. The contract will verify the proof, and release the tokens.

etgate's People

Contributors

mossid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.