OMG Network

Request for Information: ONC Stewardship over Cosmos "spoon"

Great - I look forward to following your notes here!

Update 5/8: @tousthilagavathy ONC Coop. successfully enacted a vote to transfer initial disbursement of 30 DAI to your EthAddress:
Screenshot_2019-05-08%20Aragon

Please let us know if it worked for you!

Going ahead: I would endorse follow-on commitment of 20 OMG (including prior 10 OMG award, for ease of voting…) for a brief follow up on “Connecting Plasma OMG Network to multiple root chains.”

As we locate additional support for ONC, I believe we should commit more resources to this independent research project, as it should create value for all OMG stakeholders and presents a practical way to collaborate with OmiseGO + Cosmos on public staking.

1 Like

Thanks @ro5s . I received the 30 dai in my Eth address. Sorry for the late reply. I contracted an infection and had a fever for five days. I’ve recovered and have been up for the past two days. Started getting into more details of “Connecting Plasma OMG Network to multiple root chains". Interoperability has many benefits and seems quite attractive. Will post my notes when things are more clear.

1 Like

Seems @AA has left OmiseGo. Will she continue being a part of ONC?

She certainly will :slight_smile:

1 Like

@AA that’s great to know.

I am glad you are feeling better @tousthilagavathy and look forward to reading your notes here!

I’ve mostly finished researching and organizing my thoughts regarding the feasibility and approx design of “Connecting Plasma OMG Network to multiple root chains”. It required looking into the details. I hope to finalize my thoughts, write it down clearly and put it up here in two to three days.

2 Likes

Thanks for the update @tousthilagavathy :heavy_check_mark:

Sorry, for the late reply. “Connecting Plasma OMG Network to multiple root chains” required some extra work to verify the design.

Some facilities provided by connecting to multiple root chains
. It makes plasma interoperable across many layer1 chains.
. It also means plasma acts like a bridge amongst multiple chains
. Tokens from one chain can be used to indirectly execute contracts on another chain

One associated problem is the plasma withdrawal time of two weeks, which is bad UX. I’ve discussed this problem in the plasma.build forum as an hindrance to plasma adoption itself. Karl has provided some solutions for it and I’ve got a solution too. I hope to post a seperate thread here regarding that.

Providing my design for “Connecting Plasma OMG Network to multiple root chains” in the next comment.

1 Like

@ro5s

CONNECTING PLASMA TO MULTIPLE ROOT CHAINS

REQUIREMENTS TO SATISFY

  1. Foundation requirements
  • Use the existing Tesuji plasma chain design
  • Use the existing plasma contract design of omisego, so that the
    plasma contract code can be used as is or can be used to program
    a duplicate contract code in each root chain
  1. Core requirements
  • Support for multiple wallet addresses and private key schemes that
    each root chain uses.
  • Token transfers only within same root chain wallets(Ethereum,
    Cosmos, etc.)
  • Depositing and Withdrawing tokens, from and to different root chains
  1. Integration requirements
  • Must integrate well and support DEX across tokens from all the root chains

HIGH LEVEL DESIGN

  1. The existing plasma contract design/code of omisego is used to implement a
    duplicate plasma contract on the other root chain. Eg. OMG Cosmos Zone

  2. The overall design is to use root chain id and wallet types with the
    existing Tesuji plasma chain

  • The UTXO output already holds the token, token amount, wallet address, etc.

  • Root chain id and wallet type needs to be additionally stored within the UTXO output

  • Root chain id can be some unique three/four letter symbol to identify the root chain
    the token belongs to. Eg. ZOMG for Cosmos OMG Zone. This root chain id is added to the UTXO ouput

  • Wallet types are for Ethereum, Cosmos, etc. The wallet type is added to the UTXO ouput. The wallet address in the UTXO output then corresponds to the wallet type. The wallet type is used to choose the transaction signing method. Given a private key, the wallet type is used to determine if the provided key matches with the wallet address. Example wallet types are Ethereum ECDSA : uses ECDSA secp256k1 eliptic curve & Keccak256 hashing, Cosmos EDDSA : uses EDDSA ed25519 eliptic curve & SHA256 hashing, etc.
    For wallet type Ethereum ECDSA, a sample private key to wallet address matching
    STEP 1 : Public Key = ECDSA secp256k1(Private Key) -> converts private key to public key using ECDSA secp256k1
    STEP 2 : hash = Keccak256(Public Key) -> Convertes public key to hash using Keccak256 or SHA3 hashing function
    STEP 3 : Wallet Address = ‘0x’ + last 20 bytes of hash

  1. Deposits, Withdrawals and Transfers
  • When depositing from a root chain, an UTXO is created with the corresponding root chain id, wallet type, wallet address, token, token amount, etc.

  • When withdrawing an UTXO, the root chain id, wallet type, wallet address, token, token amount, etc. are used to exit. The root chain id is used to identify the root chain to exit to. The wallet type and wallet address provides the root chain wallet address to withdraw to.

  • Token transfers are only done between wallets that have the same root chain id and wallet type.The wallet type is used to choose the transaction signing method. Given a private key, the wallet type is used to determine if the provided key matches with the wallet address.

  1. DEX across tokens from all the root chains
  • Wallet A is from root chain 1(Eg. Ethereum, DAI), Wallet B is from root chain 2(Eg. OMG Cosmos Zone, ATOM)

  • User of wallet A, creates a wallet A1 in plasma chain, with root chain id belonging to root chain 2 (Eg. OMG Cosmos Zone)

  • User of wallet B, creates a wallet B1 in plasma chain, with root chain id belonging to root chain 1 (Eg. Ethereum)

  • User of wallet A sends chain1 token amount(Eg. DAI) to wallet B1. User of wallet B sends equivalent chain2 token amount to wallet A1(Eg. ATOM)

THE SUBSEQUENT TECHNICAL STEPS HERE ARE

  1. Verify the above design from peers and make the necessary modifications
  2. Do the low level design or specification
  3. Implement and Test
1 Like

I’m unable to edit the above post, so adding some notes here.

TL;DR of the above : The design has been kept as simple as possible. Just by adding a root chain id and by supporting multiple wallet types, the OMG plasma chain can be made to connect to multiple root chains.

1 Like

Fantastic summary @tousthilagavathy // I will have more thoughts here over the weekend, but really appreciate the level of detail and breakdown at the end. I have created a vote to enact a 20 OMG transfer to your account for this research :ballot_box::

57%20PM

Ok @ro5s

@tousthilagavathy really interesting breakdown, thank you. I’m wondering what your thoughts would be on the advantages of using multi-root-chain plasma that connects to both Ethereum and Cosmos rather than a Tendermint chain using Cosmos IBC. I don’t understand the Cosmos ecosystem well enough yet to make a coherent argument one way or the other - just curious if you’ve looked into it.

1 Like

Thanks @ro5s . I’ve received the 20 OMG.

1 Like

Excellent // glad the bounty was received @tousthilagavathy :+1: :rosette:

This is illuminative research you have provided :flashlight:, and I am pleased to see our progress in identifying opportunities for the Network to help bridge chains!

The facilities provided by multi-root Plasma design (MRP) seem worthwhile for further study, and I am highly curious about how to begin testing the proposed method of using tokens to indirectly execute contracts between different blockchain networks.

Related //

I have made a new repo (:crystal_ball: ONC-Plasma :crystal_ball:) for continued research related to this “Bridge” deliverable (we can coordinate by opening “issues” and pull-requests…). I will begin gathering your suggested materials, starting with what I can fork from the OmiseGO code sources.

Also, needless to say, your TLDR was quite :ok_hand:

@AA sorry for the late reply.

Cosmos is a tree like structure of blockchains. The root blockchain of all is the Cosmos Hub which has the Atom token. Many blockchains called Zones can be connected to the Cosmos hub. These Zones can be Hubs themselves, allowing more blockchains/zones to connect to it. This can keep recursively going on and on. Hub blockchains and zone blockchains commuincate/transfer tokens between themselves using IBC.

Three ways to connect the OMG Network to Cosmos apart from connecting to Ethereum

  1. Connect directly to Cosmos Hub as you’ve mentioned
  2. Create our OMG Spoon Zone and connect to it.
  3. Use the Ethermint Zone

Regarding Method 1

  • This blockchain is created and run by Cosmos so we don’t have to run/manage anything
  • It doesn’t have smart contract capability, so we don’t have a permissionless way of programming the Plasma contracts. We would need to strike a deal with Cosmos to hardcode the Plasma contracts and by way of governance get the community’s vote to make it a part of the future Cosmos Hub upgrades. The procedure might not be exactly as said, but would be similar.
  • Incorporating the Spoon token would need to follow a procedure similar to the above. Getting permission for a custom token on Cosmos hub could be very difficult.

Regarding Method 2

  • We would need to program the blockchain using modules available in the Cosmos SDK. Though made easy, we would have to expend some effort and cost.
  • Since this is in our control we can program in the Plasma contracts and spoon token logic.
  • We would also need to gather, incentivize and manage validators. We also would need to handle other issues like governance, community, etc. in the running of the OMG Spoon blockchain.
  • By way of IBC, Atom can get here from the Cosmos Hub and from here get into the OMG Network.
  • This method gives you the flexibility to do what you want but also more work is required in the initial stage and thus more cost.

Regarding Method 3

  • Ethermint is a zone to run Ethereum smart contracts. It replaced the PoW based consensus with Tendermint consensus.
  • Cosmos or somebody else will create and run this zone so we don’t have to do anything to implement the blockchain, run and manage it.
  • We just have to program the Plasma smart contracts and the spoon token smart contracts.
  • By way of IBC, Atom can get here from the Cosmos Hub and from here get into the OMG Network.
  • Ethermint Zone is being built and would have to ask the Cosmos guys as to when it will be available.

Imo, method 3 will be the easiest to start with but obviously subject to more debate.

1 Like

In Polkadot, in order to receive a parachain slot, you must first acquire DOTs in order to participate in an auction to lease a parachain. Only when you win the auction (by outbidding other DOT whales) do you get entitled shared security by DOT validators of the Relay Chain.

As described in their blog post:

  • There will be a finite number of parachain slots that will start low at genesis and increase over time.
  • There will be unpermissioned, market-based leasing of slots. To ensure fairness in allocating >parachain slots we decided to use auctions. Anyone can participate; the auction format is a candle auction modified for blockchain with a retroactively determined random ending time.
  • If someone (individuals or smart contract) wins an auction they don’t need anyone’s permission to deploy their parachain.
  • Parachain slots will have a finite lifetime.
  • A small number of slots will be reserved for a limited period of time for special “common good” parachains to be administered by the Web3 Foundation.

While shared security is meant to be more formalized in this on-chain mechanism in Polkadot, it’s no less convenient than it is to bootstrap your chain on Cosmos with the existing network of Cosmos Hub validators.

In the case of Cosmos, you could just ask validators in the Cosmos validator working group to validate your chain.

Also, should you guys need technical support building a SDK chain, just go here.

1 Like

Cosmos is a tree like structure of blockchains. The root blockchain of all is the Cosmos Hub which has the Atom token. Many blockchains called Zones can be connected to the Cosmos hub.

Cosmos is architected in a hub and spoke model rather than a tree. In a tree with chains on chains on chains, whereby child chains fall back on the security of a root chain, that’s more descriptive of Plasma’s architecture design.

Regarding the 3 proposed methods:

  1. Connect directly to Cosmos Hub
  • The blockchain that you mention being “created and run by Cosmos so we don’t have to run/manage anything” isn’t an accurate assessment of the work that needs to be done. Any blockchain that is being built in Cosmos uses the Cosmos SDK. The SDK is a totally separate thing from the Cosmos Hub. So if you want to build an OMG chain, you’d use the Cosmos SDK. We have plenty of educational material to teach you how to do that. This tutorial could be the most relevant one for your purposes.
  • Cosmos SDK does not currently support contracting as a module but there is work being done by other projects like Kadena working to build their smart contracting lang (Pact) and integrating it onto Tendermint ABCI to be ecosystem-compatible within Cosmos. This doesn’t mean that this feature would be “hardcoded into the Cosmos Hub”; that’s explicitly not what the Cosmos Hub is for.
  • You don’t need any permission to launch a new token on a new chain, e.g. OMG zone. Getting it whitelisted as a fee token on the Cosmos Hub is also not a difficult task.
  1. Create our OMG Spoon Zone and connect to it.
  • Method 2 is your only available option right now. Fortunately, FourthState has already built a Plasma chain using the SDK, so just follow their repo and tutorial that I linked above.
  • Getting validators onboard is the easy part. The hard part is finding a go application developer who can use the SDK to build your OMG zone. Building the actual chain is non-trivial work.
  1. Use the Ethermint Zone

Ethermint will likely undergo development late into the year and it’s currently not available for use. If you want to opt for Method 3, you would likely not have a chain until sometime in 2020.

4 Likes

@ro5s good to have the ONC Plasma repo

1 Like