Creating a DEX in the Plasm ecosystem

Written by: Maarten Henskens

Plasm Network is a multi-chain dApps hub on Polkadot that supports Ethereum, WebAssembly, and layer 2 solutions like ZK Rollups. Shiden Network, the sister network of Plasm, will be the multi-chain dApps hub on Kusama.

Today, I’m very excited to announce KwikSwap as the first DEX built inside our ecosystem.

KwikSwap aims to be a new cross-chain automated protocol on Polkadot & Ethereum incorporating Plasm Network Parachains. The KwikSwap protocol provides developers, liquidity providers, and traders the opportunity to participate in a decentralized financial marketplace that is open and accessible to all.

What is a DEX?
A decentralized exchange (DEX) is exchanging cryptocurrencies or other blockchain-based assets without a centralized agency or intermediary. These exchanges for decentralized finance (DeFi) have inherited the advantages of blockchain: decentralization, censorship resistance (such as no KYC), extremely high security, and unalterable data. Decentralized exchanges avoid all the hassle of sign-ups. The trade happens directly between two users’ wallets.

 

Why run a DEX in the Plasm ecosystem?

One topic that is very high on any list in the blockchain industry is scalability solutions. Plasm Network provides those solutions. To give a complete picture of scaling, we will divide this into two parts, layer 1 scaling and layer 2 scaling. Where layer 1 scaling says, well, let’s make the blockchain itself better. Layer 2 scaling comes up with protocols that sit on top of the blockchain and use the blockchain in more efficient ways to provide the same kinds of security guarantees that a blockchain has. Besides layer 1 and layer 2 solutions, we at Plasm Network have something unique: dApp staking mechanism. Let’s have a closer look at these solutions.

Layer 1 scaling

NPoS

Plasm Network will implement nominated proof of stake (NPoS), an adaptation of proof of stake (PoS) in which an unlimited number of token holders can participate as nominators. NPoS is much more efficient than proof of work and considerably more secure and decentralized than PoS schemes without stake delegation. As soon NPoS is active in the Plasm ecosystem, it achieves high security and extra scalability levels. Learn more about NPoS in Web3 Foundation research documentation:

Overview of NPoS – Research at W3F

Owners: Alfonso Cevallos ==================================================================== The Polkadot blockchain…

w3f-research.readthedocs.io

 

Sharding

Polkadot is a sharded blockchain protocol. As such, it provides scalability by executing transactions in separate shards and providing a protocol to send messages between shards. Polkadot has the main chain, called the Relay Chain, with a number of shards called parachains.

Instead of every node in the network having to download and process everything, every node in the network only has to download and process a small portion of the data, named sharding.

Layer 2 scaling

Plasm Network will implement ZKRollups and OVM. We already reached the first milestone for implementing ZKRollups.

ZK Rollups are coming to Polkadot

The first milestone of Web3 Foundation’s Open Grant has been accepted.

medium.com

 

Explaining layer 2

Let’s say that you and I have a contract for some service, rather than publishing every little aspect of that contract on the blockchain and flooding it. We go off to the side and do a whole series of transactions, but every time we do a transaction, each of us signs it and confirms. When we’re finished, either one of us can go back to the blockchain and submit the record of all the transactions and confirm the transactions. Either one of us can submit it, and the blockchain executes it. So the blockchain only needs to know when we left with how much money staked on this transaction and when we came back and what the total change was. It doesn’t need to keep track of all the intermediate pieces. In such a way, layer 2 solutions help reduce fees for users and bring fast transaction throughput.

Rollups are powerful

Rollups are powerful because they can support not just payments. They can support the full generality of applications, the same applications that you can run directly on the Ethereum blockchain itself. But if you do those things inside of a rollup, theoretically, they become 100 times cheaper. So it’s very powerful, scalability technology. If you run an application on Ethereum, you can just run the same application inside our EVM rollup.

OVM

The OVM (Optimistic Virtual Machine) is a virtual machine designed to support all layer 2 protocols. It is a possible unification of all layer 2 protocols, meaning: Plasm Network will be for ZKRollup applications or any other layer 2 protocols.

Plasm Network will house all layer 2 scaling solutions. Users can choose which solution to use and make their use case possible with minimum overhead.

What about those transaction fees?

Rollups are a “hybrid” layer 2 scheme. Rollups move computation (and state storage) off-chain but keep some data per transaction on-chain. To improve efficiency, they use a whole host of fancy compression tricks to replace data with computation wherever possible. The result is a system where scalability with layer 1 in Plasm Network is a very favorable ratio. Whereas an Ethereum base-layer ERC20 token transfer costs, for example, ~45000 gas ($10), an ERC20 token transfer in a rollup takes up 16 bytes of on-chain space and costs under 300 gas ($0,08).

dApp staking

dApps Staking is a reward mechanism for developers of smart contracts. 50% of Plasm Network’s staking reward goes to application developers who have enhanced the value of the Plasm Network. Plasm allows the assignment of a smart contract administrator, called an “operator.” “Operators” can be “Nominated” by other dApps “Nominators.” As shown below, the operator of the smart contract receiving many nominations can obtain newly minted PLM tokens from the chain.

 

The concept of dApps Staking

dApps Staking Work Flow:

  1. Select a smart contract to nominate (stake)
  2. The nominator will receive a reward proportional to the amount that has been staked.
 

Bridges

One of the key value propositions of blockchain technology revolves around the promise of decentralization — the ability for networks to be “owned” and run by several, sometimes thousands or even millions of stakeholders rather than the conventional, more centralized corporate model of governance.

But as the number (and often the size) of blockchain networks continues to grow, they remain largely cut off from one another, like islands with their own communities and economies that can’t exchange information or value with the outside world. The siloed nature of today’s blockchain networks goes against the principle of decentralization and re-establishes the Balkanization of the existing centralized web (often called Web 2.0).

Plasm Network is addressing this problem by building “bridges” between networks. The move to a world where blockchains and systems are interoperable will allow applications to build on each other’s services and strengths.

A bridge is a connection that allows the transfer of tokens and/or arbitrary data from one chain to another. Both chains can have different protocols, rules, and governance models, but the bridge provides a compatible way to interoperate securely on both sides.

Polkadot was designed as a “blockchain of blockchains,” with the belief that no single blockchain can do everything. Plasm Network builds further on this mindset and already created a bridge with Cosmos. Other bridges like trustless Ethereum bridge and Binance Smart Chain are in development.

Open Interoperability as the Future of Blockchain Tech. By enabling different blockchain protocols to work together, bridges can help move us toward the next-generation decentralized web, ending the relevance of powerful centralized mediators that don’t have users’ interests in mind.

Conclusion

Deploying a DEX in the Plasm ecosystem on layer 1 will already give a DEX more scalability than running it on, for example, Ethereum. Adding a second layer, layer 2, will create more possibilities for all developers.

As a final touch, we make sure all developers earn rewards instead of paying for gas fees for running for keeping your smart contract alive. dApps staking rewards will be higher than gas fees.

DEXs build in the Plasm ecosystem can use our bridges with other blockchain projects to be integrated into their DEX.

About Kwikswap

Kwikswap Protocol is a multi-chain DEX on Ethereum, Plasm, Acala, and soon to be Polkadot. Kwikswap aims to be the one-stop-shop for traders to swap, add liquidity and create markets. Kwikswap Protocol is also about to launch a decentralized ecosystem where new start-ups and projects can be nurtured via Kwikstarter IDO launchpad and go to market on Kwikswap DEX.

Website | Twitter | Telegram | Discord | GitHub

About Plasm

Plasm Network is a multi-chain dApps hub on Polkadot that supports Ethereum and layer 2 solutions like ZK Rollups. Plasm aims to be a multi-chain smart contract platform that will support multiple blockchains and virtual machines like EVM and WASM.

Website | Twitter | Telegram | Discord | GitHub

Maarten Henskens

WRITTEN BY

Maarten Henskens

Belgian #9000 — Web3.0