DDA — Scaling Overview

thefett
8 min readJul 10, 2018

--

By Nicholas A. Fett and Brenda Loya

Overview

The Decentralized Derivatives Association (DDA) seeks to be the first to market with a fully functional and truly decentralized option for derivatives. Currently, all transactions on the Ethereum network, including DDA contracts, are quite expensive. With the rising price of Ether, along with full blocks necessitating higher gas prices and longer transaction times, DDA ultimately relies on the Ethereum Foundation to succeed in scaling to provide an affordable and fast Ethereum Virtual Machine (EVM) for success. DDA is currently utilizing an Ethereum Foundation grant to develop and implement a short-term scaling solution that focuses on creating a bridged side chain for DDA products, a method that can be widely used by other Ethereum developers.[1]

Figure 1. Ethereum Average Transaction Fees[2]

Motivation

The current Ethereum network and gas prices have proven too expensive for derivatives products to exist on-chain. During initial testing in January 2018 on the Ethereum mainnet, DDA derivative contracts were slow and rather costly compared to their centralized counterparts. Assuming rising volumes on the Ethereum network over time, DDA determined that a scaling solution was needed and needed quickly.

Philosophy

To truly transform the financial industry, the ecosystem needs to rally behind standard contracts. Although many projects echo the incumbent’s business model of becoming a new middleman with their artificial insertion of a token, DDA intends to build a decentralized derivatives platform as it should be built. DDA’s goal is to provide truly peer-to-peer, tokenized derivative contracts. For the first time in history this new technology enables portable (not locked onto an exchange or clearinghouse) and anonymous derivatives. DDA is leveraging this technology and has created and plans to continue to set the bar for the standard derivatives contracts.

The deeper DDA dives into the space, the more we realize that every piece of the puzzle is being built by multiple parties. DDA will continue to further this research but will move one step further by taking the pieces, combining them and launching a project. Tokenized derivatives have been a goal of Ethereum since its inception and now is the time to make this a reality.

When looking at potential options for scaling solutions, DDA had to decide which features were actually important. For us, the following principles served as our guide:

Decentralization

  • Ultimate scaling solution cannot be a centralized database
  • Flexibility to use and change the decentralized consensus — Proof-of-Work / Pure Proof-of-Stake(POS)[3] > Delegated Proof-of-Stake > Proof-of-Authority (POA)[4]

Smart Contract Functionality

  • Some state channels are beginning to tackle this functionality, but we cannot have a scaling solution limited to just payments or value transfer
  • Minimal interaction with main chain to limit costs
  • We want to deploy our EVM smart contracts (Preferably we don’t have to learn a new programming language or rewrite our contracts)

Currently Available / Feasible Technologies

  • We all know that eventually sharding[5] and POS will enable EVMs inside of EVMs with every transaction in a plasma channel, but we need something in months not years

Minimal Reliance on Other Teams

  • DDA recognizes the excellent research done by other teams and we seek to implement as many battle-tested solutions as possible
  • As much as we like other teams, we want DDA’s solution to stand the test of time for us and other companies. So, although there may be some turn key solutions out there, if it involves another party running a server, or us being required to use a token to access their network, then it really doesn’t work.

Product Scaling Overview

A full explanation of the DDA derivatives products can be found in our products description. The exchange functionality discussed is not limited to any one exchange protocol, but rather aims to enable efficient transfer of tokenized derivatives created on the bridged chain.[6]

The Ethereum / cryptocurrency world is awash with potential solutions but no practical implementations or use cases experimenting with the bleeding edge. DDA plans to launch our product using the subsequent methods and will document every step of the deployment for production-ready use by other projects. By creating solutions that enable application developers to choose their own value for the trade-offs between privacy, trust, decentralization and cost, all while being part of the public Ethereum network, this deployment will create short-term scaling solutions which will benefit both users and developers on Ethereum.

DDA’s goal is to build a platform that is unstoppable. Aligned with one of our core beliefs that the true value of distributed systems is in the unstoppable applications that can be built on top of them, DDA will create a fully decentralized implementation for the creation and exchange of derivative instruments.

Summary

DDA will create a new EVM chain, henceforth the ‘dapp chain’. This new EVM will be identical in design to the current mainnet EVM and seek to maintain interoperability. This chain will be linked to the mainchain via a trusted, dedicated relayer and contracts that automate the passage of messages from the dapp chain to the main chain. Parties will be able to send mainchain Ether (mEth) or tokens from the mainnet to the dapp chain. For DDA derivative contracts, parties will lock Ether in a contract on the mainchain which will then be withdrawn as wrapped mainchain Ether on the dapp chain. Parties can then use the theoretically less expensive dapp chain for the inception, trading and closure of derivatives contracts. Upon termination of the derivatives contract, or once the party sells their position, the wrapped Ether can be locked on a dapp chain smart contract where it can then be withdrawn for Ether on the mainnet.

Figure 2: Proposed Dapp chain connected to mainnet EVM via oracle bridge

The Bridged Side Chain

DDA will run a new Ethereum instance for a decentralized derivatives contract creation along with a fully decentralized exchange utilizing DDA contracts. Dapp chain Ether (dEth) will be utilized for the trading of financial contracts on the dapp chain and will hold value, which will incentivize miners. Miners will be further incentivized with additional mEth rewards that will be based upon the activity of the dapp chain and the value of dEth.[7]

DDA plans to roll out this implementation in three phases of decentralization and functionality:

1. Proof-of-Authority(POA) chain with privately run oracle relay method

2. POA chain with custom oracle relay method

3. Public chain with custom oracle relay method

When utilizing the sidechain, DDA’s bridge enables participants to wrap their Ether not within a basic ERC20 contract but rather in a contract linked to an entirely different chain. Once locked within a the mainchain contract, the party will then link the networks via oracle calls to the other chains JSON RPC feed[8].[9] Initially this will require a central party (DDA) to host the network (e.g. Infura[10] style on trusted hardware). Parties can place their mEth into the contract holding function then call the API to withdraw from the other chain. If they wish to withdraw mEth from the mainchain holding contract, they can initiate a withdraw on the sidechain to destroy any mEth tokens they own.

In the first phase, DDA will allow users to interact with the side chain while in the safety of a POA consensus mechanism. The oracle (API which will allow for calls to the other chain) will be run by DDA. For this bridge, the oracle is simply a publicly hosted node that has its JSON RPC port exposed for parties to connect to.

In the second phase, DDA will allow members of DDA contracts to vote on a series of trusted oracles that can be hosted by any party. DDA can then use a staking contract along with promoting nodes verified by TLS Notary proofs to ensure that parties hosting the nodes remain honest.[11] In addition, other methods such as Trusted Execution environments (TEEs) can also be used to further ensure the trust of the hardware based relayer.[12]

The third phase will consist of DDA launching its own EVM chain. Although this is the simplest to do from a technical standpoint, the security implications are enormous. Public chains require miners and an incentive system to support security of mEth on the dappchain. By utilizing mining rewards in mEth and/or pegging a minimum dEth value, DDA can ensure a robust public dapp chain.

From a technology standpoint, several working prototypes (though not yet production ready) are available on the Oraclize github for querying the JSON-RPC of a chain.[13] Additionally, value has been transferred across public networks with services such as Peace Relay[14], BTC Relay[15], or the Doge/Ethereum bridge[16]. DDA has used thoughts from these projects, however is now not linking pre-existing chains but rather newly created EVM chains. DDA hopes that our solution can be generalized for other projects to take advantage of. The sweet spot for the first two phases is for projects that would like decentralization and mainchain Ether interoperability, but currently do not need a completely public solution. For many non-DDA dapps, this solution could provide significant network traffic reductions and allow many dapps to operate on the ‘network’ without requiring them to hold Ether in a centralized wallet or being priced out by high transaction costs.

To list out the pros and cons of our design:

Pros

· Trustless contracts (if on Public sidechain)

· Bridge infrastructure is simple and could be widely used

· Trust of bridge can be verified using hardware solutions

· Efficient withdraws with little gas needed for main chain withdrawals

· No lock up period or stake necessary to preserve integrity

· Future proof / upgradeability

Cons

· Trusted bridge

· Liveliness of dapp chain is assumed

· Security of dapp chain is assumed (if you break the side chain, you can steal all of the Ether)

· Dapp chain faces same scaling issues as mainchain

Further Implementations

The beauty of working with existing technologies is that DDA plans to implement these three phases within 12 months. As additional technologies and methods for bridging and smart contract scaling come to fruition, DDA will likely make adaptations to the roadmap and scaling plan. DDA also recognizes that the current solution will hit the exact same bottleneck in terms of transaction throughput as the mainnet if our contracts have the impact we predict. The medium to long term solutions for this include:

· New chains for every derivatives contract

· Plasma exits[17]

· State channels for transfer of tokens on our network

· Limitation of DDA dapp chain to DDA specific functionality only

· Upgrading relay method to Polkadot[18], Cosmos[19] or other hub technology

Conclusion

In order to reduce transaction costs and create a usable product for customers, DDA’s short term solution will focus on creating a bridged state channel implementation for DDA products. Utilizing a grant from the Ethereum foundation, DDA is actively developing this solution and seeks continued collaboration with other projects looking to scale, as well as the community and other researchers working on similar problems.

To look at the solidity portion of the Bridge: https://github.com/DecentralizedDerivatives/Oracle_bridge

For documentation to use AWS to set up a POA chain for testing the bridge: https://github.com/DecentralizedDerivatives/POA

References:

[1] https://blog.ethereum.org/2018/03/07/announcing-beneficiaries-ethereum-foundation-grants/

[2] https://bitinfocharts.com/comparison/ethereum-transactionfees.html

[3] https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQs

[4] https://wiki.parity.io/Proof-of-Authority-Chains

[5] https://github.com/ethereum/wiki/wiki/Sharding-FAQs

[6] www.ddacoop.org/products

[7] https://medium.com/@nfett/aligning-incentives-for-bridged-sidechains-5bb85d405dab

[8] http://app.oraclize.it/home/test_query#VVJMKFBPU1Qp:anNvbihodHRwczovL21haW5uZXQuaW5mdXJhLmlvLykucmVzdWx0:IHsianNvbnJwYyI6IjIuMCIsImlkIjoxLCJtZXRob2QiOiJldGhfYmxvY2tOdW1iZXIiLCJwYXJhbXMiOltdfQ==

[9] https://github.com/oraclize/ethereum-bridge

[10] https://infura.io/

[11] https://tlsnotary.org/

[12] https://en.wikipedia.org/wiki/Trusted_execution_environment

[13] https://github.com/oraclize/ethereum-bridge

[14] https://medium.com/@loiluu/peacerelay-connecting-the-many-ethereum-blockchains-22605c300ad3

[15] https://github.com/ethereum/btcrelay

[16] www.truebit.io

[17] https://plasma.io/

[18] https://medium.com/polkadot-network/preparing-to-build-on-polkadot-349ff5002885

[19] https://cosmos.network/

--

--