Cosmos-sdk: Enabling Photon spoon

Created on 22 Feb 2018  路  8Comments  路  Source: cosmos/cosmos-sdk

The hub has two native tokens, Atoms and Photons. Atoms will be distributed in the genesis file according to the fundraiser, while Photons will be distributed based on a snapshot of the Ethereum state.

Goals of the Photon spoon:

  • Enable anyone that holds Ether in keys or contracts to burn their Ether (in the snapshot) and receive Photons on the hub

The main issue to solve is how to give people access to the Ethereum state without polluting the Cosmos Hub with it.

I propose that we run an Ethereum VM and the snapshot of the Ethereum state within the Cosmos hub. Anyone that wants to claim their Photons has to construct a transaction or series of transactions that burns their Ether. The hub checks the logs of the EVM for those events and then credits a certain account on the hub (set by the user) with the correct amounts of Photons.

The challenge of this approach is that we have to run an EVM on the hub for a limited amount of time. We should set an automatic expiry date at which all EVM transactions get rejected. Furthermore, we should take measures to prevent people from using the hub EVM as Ethermint.

I propose that we have a ClaimPhotonMsg { ethTrans: signedEthTransactionBytes }. Ether holders can send a ClaimPhotonMsg that includes a signed ethereum transaction that is passed to the EVM. That way users are able to claim their Photons. The gas cost (in terms of Atoms/Photons) should be high enough to discourage the use of the hub EVM as a normal VM. Furthermore, we should communicate very clearly that the Ethermint zone is the place for all EVM style contracts.

The benefits of the above approach are:

  • people have the ability to claim their Photons from keys and contracts
  • we limit the feasability of using the hub EVM for anything besides claiming photons
  • we can launch an Ethermint zone without the pre-existing Ethereum state
  • we can include an automatic kill switch for ClaimPhotonMsg's which will limit the user incentive to use the hub EVM for anything besides claiming Photons

I spoke to Martin (Gnosis) about this and he liked the idea. His main concern was that if we snapshot the full Ethereum state into a fully-fledged and permanent Ethermint zone, that token holders would get confused which ERC20 tokens are the correct ones. Furthermore, he brought up the problem of them having to potentially maintain both versions of the contracts. I think it will be paramount to launch an Ethermint zone without any Ethereum state in order to prevent massive confusion within the community. Any Ethereum snapshot that we take and run should be extremely limited to only claiming Photons.

Lastly, we should consider whether we want to allow any Web3 access or write detailed guides instead on how to sign raw Ethereum transactions and submit them in a ClaimPhotonMsg.

@ebuchman @jaekwon @rigelrozanski @sunnya97 I'd like your feedback on the above.

All 8 comments

YOOOOO where did you get the idea you need to burn ether to claim photon? This is a spoon, not a sacrifice - The current design would just be a one way peg. This is fine if we want to encourage experimentation, but not encourage uptake. I was under the impression we wanted to encourage uptake, and actually have decent volume of fee tokens............. I understand the concerns with the multiple ERC20 tokens - but I think we need to keep them - people ought to get used to a multi-token world bae. So yeah, not my kind of idea

You don't burn the Ether on the actual Ethereum chain. We spoon the state and within the copy of our state you have to burn the Ether. Otherwise with 1 Ether you could claim an infinite amount of Photons.

This is great feedback. What do you think is the best way to clarify this?

It's just a claim process - I wouldn't even mention the keywords burn in any high level description.. I'd say maybe "activation"....... and if you don't activate in X period of time you won't receive your ether?

We should build in a switch that automatically turns off the Ethereum state. So if you don't claim your Photons within that timeframe you just won't get them. I suggest a year as a timeframe.

great summary of thoughts @adrianbrink !

@adrianbrink Does the Photon spoon need to happen before launch?

@cwgoes No it does not

The hub has one native token for now, only atom.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fedekunze picture fedekunze  路  3Comments

mossid picture mossid  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

hendrikhofstadt picture hendrikhofstadt  路  3Comments

ValarDragon picture ValarDragon  路  3Comments