A Universal Guide to The DAPP Network

Ethereum’s Handbook Of The Universal Second Layer Solution

DAPP Network
The DAPP Network Blog
9 min readJun 15, 2020

--

Editors note: Everything you read here is already implemented and operational

The stakes have never been higher.

While the scaling challenges of base-layer blockchains are nothing new, the growth of the DeFi sector, especially on Ethereum, has brought a newfound sense of urgency to the quest for scale. In the race to remake the financial infrastructure of tomorrow, large corporations hold a commanding lead over disruptive DeFi startups. Optimizing for decentralization comes at the cost of enhanced scalability (to understand why this is so, read up about the Scalability Trilemma.)

Incumbent giants, such as Visa and Mastercard, are shifting their attention to blockchain-based financial services as a way to tap into novel revenue streams, and with good reason. According to Goldman Sachs research, automating B2B payment processing promises “to cut the cost by up to 75% and unleash $1.5 trillion in small business productivity, so it is no wonder that large corporations are exploring novel technologies as a way to streamline B2B payments, with blockchain chief amongst them.” When you add in other key financial services such as lending, savings, insurance and even derivatives trading — all of which are being built out on blockchain — you end up with a global market worth trillions of dollars that can be unlocked by blockchain technology.

Visa and others aren’t concerned about decentralization and therefore they can easily facilitate tens of thousands of transactions a second, while the entire DeFi ecosystem on Ethereum is limited to the 15 transactions per second.

By conquering its scaling limitations, Ethereum can move closer to becoming a key piece of infrastructure for so many industries.

The #DAPPNetwork is a universal layer-2 that could allow #Ethereum to scale massively without harming decentralization.

(Click to Tweet)

Here is how this guide works:

Second-Layer Scaling Done Right: An Introduction to The DAPP Network

The DAPP Network is a universal second-layer that serves as the ‘glue’ between blockchains, currently operating on all EOSIO chains and recently ETH, that allows them to scale horizontally and enjoy a feature-rich experience.

At the heart of the DAPP Network are the DAPP Service Providers, who maintain infrastructure, run blockchain nodes and provide scaling services to developers. These services include:

  • LiquidLink: two-way decentralized cross-blockchain communication network
  • LiquidOracles: decentralized,trustless and customizable web oracles
  • LiquidAccounts: seamless and free end-user onboarding
  • VRAM: Unrestricted decentralized and affordable on-chain memory
  • VCPU: access to cheap, powerful computation
  • LiquidScheduler: task scheduler and automated task services
  • LiquidStorage: an incentivized decentralized storage network
  • LiquidDNS: designed to prevent DNS hacking
  • LiquidHarmony: extension to LiquidOracles, enables easy, powerful plug-ins — LiquidSQL, web oracles, random numbers

The pinnacle of the DAPP Network service suite is LiquidChains, a unique blockchain-as-a-service solution that could especially benefit DeFi dApps. LiquidChains allow everyone to spin up customizable chains configured specifically for their use-case, without sacrificing on the compatibility and interoperability of public networks. The advantages of LiquidChains lie in their unprecedented customizability and in their ability to provide dApps with gas-reduced, trustless transactions while retaining access to the instant pooled liquidity of Ethereum.

LiquidChains are fast, easy, fully customizable blockchains for your project, running on the popular proof of work or proof of stake consensus mechanisms. Each LiquidChain comes out of the box with the full suite of DAPP Network services ready for use.

LiquidChains can also be equipped with any of the other DAPP Network services out of the box. Applications can run computation, oracle services, IPFS hosting, and many other functionalities on a LiquidChain for additional speed, cost-efficiency, and privacy. Maintaining a mainnet connection with DAPP Network IBC allows for periodic updates of the LiquidChain’s state to be recorded on the Ethereum mainnet for complete transparency and auditability. The connection to the Ethereum mainnet also means no tokens need to be migrated and your code does not need to be adapted to a new blockchain.

The DAPP Network introduces a novel concept to second layer scaling — that of a universal middleware that can work across multiple chains as well as provide multiple developer services. If you’re interested to learn more about the products being built on top of the DAPP Network, or even if you just want to join a vibrant, purposeful conversation about the transformative power of blockchain, you should join our community.

Developers Zone: A Deep Dive Into The DAPP Network’s Architecture

Let us look at these components one-by-one:

Provisioning Layer

At the heart of the DAPP Network are the DAPP Service providers (DSPs). DSPs create service packages which they then offer to developers in a free market. In order to access a specific service package, a dApp smart contract needs to stake a sufficient amount of DAPP tokens as per the Service Agreement set out by the DSP. The ‘dappservices’ smart contract is responsible for managing the staking mechanism, package provisioning and quota management. Each service request is recorded on-chain and decreases the remaining quota of actions available to the dApp smart contract.

While the DAPP token is the access token to the DSP services, leasing markets and third-party staking can enable developers on any network to access DAPP Network and its services natively through their own protocol token. Already showcased by Blockstart, leasing markets allow users to access resources on a ‘pay-as-you-go’ model, providing significantly lower price volatility and a more predictable user experience.

DAPP Services Layer

Next up is the DAPP Services Layer. This contains the protocol with which a dApp smart contract can request a specific service from the DSP. A service request is a “function-like” call to the DSP in that it has specific parameters and can trigger a response back to the contract with specific results.

There are two types of requests:

Synchronous Requests: Synchronous requests block the User Contract from executing a transaction and propagating it on a peer-to-peer network until the request returns a response to the contract. Oracle requests represent one such example. When an action requires external price data to be fetched, the oracle data is preloaded prior to completing the execution of the action instead of requiring a later callback. This provides increased responsiveness to users as their original action appears to execute immediately. Another example is the vRAM System, which is explored at length in our vRAM Guide for Experts.

Asynchronous Requests: The dApp smart contract dispatches an event representing the async service request and continues executing a transaction without failing. For example, automating tasks with LiquidScheduler, a cron-like service running on the DAPP Network, involves dispatching an asynchronous request that can be fulfilled at later times.

LiquidChains

In order to spin up a customizable LiquidChain, chain creators must first map out the specifications they wish their chain to possess, including the consensus model which forms the basis of their network. Chain creators then select the DSPs that serve as validators on their chain. Any number and configuration of DSPs can be chosen, thus allowing chain creators to select their preferred level of decentralization. While LiquidChains is a service that is accessed via the same staking mechanism as the rest of the DAPP Network services, it is qualitatively different in a sense that it serves as a prerequisite for accessing all the other DAPP Network services within the Ethereum ecosystem.

DSPs run specialized nodes that comprise several instances including:

  • Dockerized Ethereum Node: A dockerized node of whichever public network the LiquidChain needs to connect to, such as Ethereum.
  • Interplanetary File System (IPFS) instance: The DAPP Service providers use the IPFS as a decentralized storage layer.
  • PostgreSQL database: The PostgreSQL database is used to support the functionality of the DAPP Service provider by logging and preventing duplicate blockchain events.
  • Gateway instance as an API: The gateway instance is the API that connects the following three instances, processed transactions, and fetches IPFS data.
  • EOSIO Nodeos state history plugin enabled instance: The EOSIO Nodeos instance is a read-only node that listens and emits on-chain activity through a web socket.

In addition to validating the chain and processing transactions, DSPs could natively integrate any DAPP Network service the chain creator wishes to access into the LiquidChain. A LiquidChain DSP can serve as either a validator, a service provider, or both.

DAPP IBC

There are a number of ways to achieve interblockchain communication on the DAPP Network:

  • LiquidLink: LiquidLink is the trustless communication service that enables value and data transfer across chains. The service, which is used to communicate with non-EOSIO chains, has demonstrated a connection between EOS and Ethereum and is currently in Alpha.
  • LiquidX + LiquidOracles: allows DAPP Network services — storage, oracles, computation, and so on — to be offered natively on other EOSIO-based chains, without needing LiquidLink. Integrating LiquidX on a given chain connects that chain to the DAPP Services layer and allows developers on that chain to emit service requests to DSPs. A contract on Chain A can utilize LiquidOracles to read the state of a contract on Chain B, after which it can then update its state on Chain A accordingly. This cross-chain communication mechanism can be utilized by public EOSIO chains, private EOSIO chains and LiquidChains alike.

The main difference between the two forms of IBC is that with LiquidLink, the cross-chain transaction is triggered on the chain that is doing the writing.

Furthermore, many of the other DAPP Network services have cross-chain capabilities built-in. LiquidAccounts enables a single account and public key to be used across multiple contracts and multiple chains, while VRAM enables contracts to seamlessly read table entries across chains.

DAPP Network Service Suite

In addition to allowing for gas-reduced transactions in a trust-minimized environment on a LiquidChain, developers can access a range of DAPP Network services natively within their chain. Instead of curating all the necessary services from various third-party providers, developers can integrate them in a plug-and-play fashion within their dApps. Services available include:

IPFS Hosting: IPFS has upended the client-server model of file storage with a distributed, peer-to-peer file storage system. However, it lacks a way to incentivize nodes that host files to remain online and make the data readily available. With LiquidStorage, developers can host their files on the DSPs’ IPFS cluster. DSPs are incentivized to remain online and deliver the files with minimum latency. The hash of the file, which also serves as the pointer used to access the file, could potentially be kept on-chain for validation purposes.

Oracles: Native, decentralized oracle solution for sourcing any external data within your smart contract. Further information on the advantages of LiquidOracles can be found here

Cron-Like Task Scheduler: Base-layer blockchains struggle to enable scheduled tasks since They complicate consensus and history, and there is no way to guarantee the execution of such a task without compromising the safety of the chain. LiquidScheduler is a blockchain automation tool that allows developers to schedule tasks securely. For more on utilizing LiquidScheduler to automate your dApps, read here

LiquidDNS: DSP-managed DNS service that works by allowing a contract to register its website frontend with the DNS service contract.

Zeus SDK

A cross-platform Software Development kit that features a Truffle-like interface, a package manager, and version control. With Zeus, you can install prerequisites easily, start with any of the many prepackaged reference applications, develop your contract and frontend, and compile, test, and deploy your application with simple one-line commands. And if you need specific functionality, you can even plug in your own Zeus extensions.

Breaking the Glass Ceiling

The network effects of Ethereum, particularly in the DeFi sector, give the ecosystem a distinct advantage that keeps it growing. With the growth of Ethereum accelerating, the network is edging towards its glass ceiling which limits the amount of transactions per second available. Central to overcoming this barrier and getting Ethereum ready for prime time are the Layer-2-Plus scaling solutions and sharding mechanisms, such as DAPP Network’s LiquidChains, that could enable gas-reduced transactions and high throughput for Ethereum dApps.

Try out our Zeus SDK, which makes interacting with the DAPP Network seamless and efficient!

Follow LiquidApps

Website | Twitter | Telegram | YouTube | LinkedIn | Github

Please click here to read an important disclaimer.

--

--

DAPP Network
The DAPP Network Blog

DAPP Network aims to optimize development on the blockchain by equipping developers with a range of products for building and scaling dApps.