Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOST Protocol - Cross Chain Token Transfers from/to Ethereum #28

Open
treeder opened this issue Jun 21, 2019 · 7 comments
Open

GOST Protocol - Cross Chain Token Transfers from/to Ethereum #28

treeder opened this issue Jun 21, 2019 · 7 comments

Comments

@treeder
Copy link
Contributor

treeder commented Jun 21, 2019

In an effort to support stablecoins on GoChain, backed by existing stablecoins on Ethereum (USDC, TUSD, PAX, etc), I propose the following cross chain transaction concept, aka GOST Protocol, to be built into GoChain. This concept keeps the transfers decentralized as the protocol is built directly into GoChain and requires all nodes in the network to participate. Tokens can be transferred to GoChain and transferred back to Ethereum at any time. This would make GoChain one of the first (if not the first) truly interoperable blockchains.

Why Move Tokens to GoChain

Much faster transaction speeds, supports much higher transaction volumes and much lower fees that can support day-to-day purchases such as buying coffee or playing games.

Fees

As of right now, the average transaction fee for Ethereum is $0.15:

Screenshot 2019-06-22 at 11 25 15 AM

And the average transaction fee for Bitcoin is $3.66:

Screenshot 2019-06-22 at 11 25 07 AM

Those fees are much too high for day-to-day transactions. You can't use it as payments for coffee if the fee costs just as much as the product.

Speed

Similarly you can't buy coffee if customers have to wait at the cashier for minutes or hours. GoChain transactions are almost always under 5 seconds.

Bitcoin typically takes a minimum of 10 minutes for a single block confirmation since block times are 10 minutes. It's usually longer since the network is typically congested. Ethereum block times are 15 seconds which is a vast improvement over Bitcoin, but the problem is the Ethereum network is also almost always congested so it typically takes minutes for a transaction to make it into a block.

Here is an example of two transactions at the same time performed at a random day/time on GoChain and Ethereum. Ethereum took 3 minutes 29 seconds to make it into a block while the GoChain transaction took 1 second.

D3aCzYpUYAAvxzD

Cross Chain Consensus

Consensus so far in blockchains has been limited to agreement on a single blockchain (ie: the database). There is no reason why consensus has to be restricted to a single data set. GOST Protocol works by the GoChain node network coming to consensus on both GoChain data and another chain's data (Ethereum to start). After a certain number of blocks have passed, we can be fairly certain that the data is set in stone and can no longer be modified, much like exchanges accept transactions after a certain number of block confirmations.

Transferring Tokens to GoChain

Each token on GoChain represents exactly one of the same token on the original chain. Let’s use USDC in this example. Transferring to GoChain requires two steps:

  • User deposits X USDC to a special smart contract on Ethereum - GOST-C1 (very similar to a multi-sig wallet)
  • GoChain nodes monitor this contract for transactions
  • If a transaction is found, the nodes will wait X blocks for confirmation (30-60)
  • After confirmation, a minting transaction is confirmed. X USDC on GoChain (USDC? GOUSDC? GOUSD?) is minted in an ERC20/GO20 token contract on GoChain to the original depositors address

Transferring Tokens back to Ethereum

User has to burn tokens on GoChain to get the original tokens back. This could work the following way:

  • User sends a burn transaction tx3 to burn tokens in in the token contract on GoChain (can include extra data such as a withdrawal address on Ethereum)
  • GoChain nodes accept the burn transaction, tx3, immediately removing the tokens from circulation
  • After X (30-60) block confirmations, each node sends in a transaction to the GOST-C1 wallet on Ethereum which says to transfer the funds to the address in tx3
  • Once a high percent of nodes (75%?) submit their transaction, the transaction proceeds and the tokens are transferred to the user

Future

Beyond this initial use case, this paves the way for massive scalability increases for GoChain by enabling multiple GoChain networks to work together. GoChain -> GoChain transactions means we can create any number of GoChain shards which can then transact across each other.

@treeder treeder pinned this issue Jun 22, 2019
@individualpirate
Copy link

individualpirate commented Jun 24, 2019

Some thoughts:
Is there any chance ETH-based stablecoins could agree on a single GoChain ticker (GOST), so that regardless if you transfer PAX, USDC or TUSD they all turn into GOST? If so, could the correct "ancestor" still be derived in a reverse transfer?

What fees would be involved in a transfer? I'm assuming it's 1 eth tx-fee to deposit in GOST-C1 and one GO tx-fee to mint, and the reverse being true going back. The timeframe for transfers looks to be about 1 minute?

@treeder
Copy link
Contributor Author

treeder commented Jun 24, 2019

Is there any chance ETH-based stablecoins could agree on a single GoChain ticker (GOST)

We've been thinking about this, it could be possible if person chooses the coin they'd like on the way back to Ethereum and the amount of the coin exists in the smart contract on Ethereum.

Fees: That is correct. Deposit fee covered by user. Minting fee probably covered by the nodes initially. Who pays withdraw fee from GOST-C1 TBD.

Time to deposit: 1 ETH transaction: 15 seconds to some number of minutes depending on congestion (we'll use 15 assuming no congestion) + 30-60 block confirmations, 15 seconds each: 450-900 seconds + GoChain transaction: ~5 seconds = 470-920 seconds = ~8-15 minutes

Time to withdraw: 1 GoChain transaction: 5 seconds + 30-60 block confirmations, 5 seconds each: 150-300 seconds + 1 ETH transaction: 15 seconds = 170-320 seconds = ~2.8-5.3 minutes

@Juan-cc
Copy link

Juan-cc commented Jul 2, 2019

Hi, I have some questions about GOST nodes.

  • GOST Nodes that check for transactions are those running current Gochain Public network? Or who owns GOST protocol nodes?
  • Is GOST going to be part of Gochain network client software or it's going to be a separate process?
  • Transfers are atomic? What happens if I send coins to the GOST contract and there is an issue in GOST nodes. Is there a way to revert my coins from the contract (Ethereum) to my wallet? Will there be a fee for that, if so who would pay for it?
  • How many GOST nodes will be checking for transactions?

Thanks!

@treeder
Copy link
Contributor Author

treeder commented Jul 2, 2019

  • GOST will be build directly into GoChain, so the existing nodes will also be GOST nodes.
  • See ^.
  • There won't be a way to revert transactions, since you can't revert blockchain transactions.
  • All of them. It's similar to GoChain transactions where all nodes verify all transactions, they will also verify the transactions on the other chain.

@treeder treeder unpinned this issue Oct 12, 2020
@treeder treeder added forvote Proposals that have been promoted to voting. and removed forvote Proposals that have been promoted to voting. labels Oct 23, 2020
@naiemk
Copy link

naiemk commented Nov 16, 2020

After X (30-60) block confirmations, each node sends in a transaction to the GOST-C1 wallet on Ethereum which says to transfer the funds to the address in tx3
Once a high percent of nodes (75%?) submit their transaction, the transaction proceeds and the tokens are transferred to the user

How does this work? For one burn on GoChain side, nodes will have to generate lots of transactions on the Ethereum side?

If so, it would be too expensive, if not, how can one aggregate all transactions into one transaction without falling back to some sort of centralization?

@treeder
Copy link
Contributor Author

treeder commented Nov 18, 2020

@naiemk you are right, that is the biggest flaw to this. Too slow and too expensive.

If so, it would be too expensive, if not, how can one aggregate all transactions into one transaction without falling back to some sort of centralization?

Good question. If we could figure out something like that, that would solve a lot of problems. Open to ideas if you have any.

@naiemk
Copy link

naiemk commented Nov 24, 2020

@treeder Only idea that I have on this, and it's pretty much how most other cross-chain projects work these days, is to have a randomly selected quorum of nodes and use a threshold signature method to share a private key and sign a transaction. The biggest flaw of this approach is of course (ignoring the collusion risk) we need to make sure a threshold of nodes are always up. Its a tough problem and I have not seen a good solution yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants