What is Matic Network?

Matic Network provides scalable, secure and instant Ethereum transactions using side chains.

Blockchain Smart contract platforms and cryptocurrencies have captured mass attention but still haven’t been able to achieve mass adoption due to the scalability and user experience issues. Even on Ethereum, which is the most widely used smart contracts platform, there have been no significant Dapps which have seen mass adoption. There have been a few cases where one or the other particular application temporarily succeeded in achieving a significant user base but it led to crippling of the entire network during the high load times. Essentially meaning that even the most advanced and widely used platforms are not ready for mass adoption.

On the other hand, there are a few smart contract platforms which boast of higher transaction throughput, but they trade off transaction speed with decentralization. Also many of the upcoming solutions propose their own blockchains neglecting the network effects DApps and other projects have already generated on platforms like Ethereum and others. Even more importantly they neglect the massive developer community and developer ecosystem that exists for platforms like Ethereum.

Matic Network strives to solve the scalability and usability issues while not compromising on decentralization and leveraging the existing developer community and ecosystem. Matic Network is an ​off/side chain scaling solution for existing platforms to provide scalability and superior user experience to Dapps/user functionalities.

We have chosen Ethereum as the first platform to showcase our scalability and we already have a part of implementation for Ethereum on Kovan Testnet for internal testing. It allows instant transfers, exchange and conversion of digital assets (e.g. crypto tokens) and cryptocurrencies in future (like Bitcoin using Swingby protocol ).

Matic strives to achieve high degree of decentralization with trust-less and decentralized execution while ensuring near instant transfers, low fees and conducive economics for micro transactions.

Matic’s open source foundation intends to provide Matic wallet, payment APIs and SDKs, products, identity solutions and other enabling solutions that will allow developers to design, implement and migrate DApps built on base platforms like Ethereum.

One of the key pillars of Matic Network’s ideology is user experience which is very poor for Blockchain applications as of now. Matic Team has already built high quality user experience Mobile/Web browser libraries which will enable businesses to create real world end user applications at large scales. Matic roadmap also includes ​supporting cross-chain transfers and third party​ Decentralized exchanges, liquidity pools etc.

Problems

Decentralized Apps are making huge progress but the current blockchain ecosystem is not prepared to scale as per the demand. Slow block confirmations, block size limitations and computations — in smart contract based blockchains — need to be solved before we target mass adoption by mainstream users. And most importantly, it needs awesome user experience.

Some of the problems associated with the current blockchain platforms are as follows:

Slow transactions

Blockchain transactions are slow and have variable, sometimes exasperating transaction times. Most blockchain protocols have a limit on the block size and it can take a certain amount of time to generate a block. Each transaction also has to wait for multiple block confirmations due to potential chain re-organisations.

These limitations are often necessary for a public blockchain as a block needs to be validated and must be downloaded by a certain number of nodes to keep it really decentralized.

High transaction fees

Day by day, the blockchain market is growing and crypto assets are increasingly being created, transferred, and sold, often involving multiple crypto tokens. Every decentralized application has it’s own token and economy. Paying them for their services requires on-chain transfers. Ethereum charges gas fees on each transaction.

Fees are an important factor to reward validators and prevent certain kind of security attacks like DoS. But, the problem is that fees vary depending upon the pending transaction pool size due to the limited block size.

Low transaction throughput

Public blockchains have to maintain a certain amount of time lag between various block production so as to ensure ample time for block propagation. Also the blocks size needs to be low so as to ensure quick propagation of the block through the network. This entails that number of transactions in a particular block needs to be fairly limited.

Scalability

Each block on a blockchain must be validated by multiple nodes and/or compute state in case of a smart contract based blockchain. Each node has to manage a copy of the state and all blocks. While the chain size is increasing day by day, maintaining and validating the whole blockchain is correspondingly getting more difficult. This is a huge risk for decentralization as an idea, overall.

Multiple micropayment channels

Some payment channel solutions solve the problem of micro-payments. However, opening and managing channels with multiple DApps or users is complex. Additionally, the speed and convenience of mediated payments over channels is still up for debate.

Poor usability

The current system is inherently bad for normal users. For example, users need to have ether and pay gas fees if they want to spend their ERC20 based tokens.

As the number of ICO increases, users may want to use DApps with different tokens as payment. Without on-chain trade, the convertibility of one crypto token to another represents a new challenge for both investors alike. It introduces complexity for managing multiple crypto tokens and exchanging tokens to pay on different platforms.

Matic Network

Matic Network solves these problems by building a decentralized platform using an adapted version of Plasma framework that provides a solution for faster and extremely low cost transactions with finality on a main chain.

Matic Network solves the low transaction throughput problem by using a ​Delegate layer to produce the blocks. Delegates enable the system to produce blocks at a very fast rate. The system ensures decentralization using PoS checkpoints which are pushed to the Ethereum mainchain. This enables Matic to theoretically achieve 2¹⁶ transactions on a single side chain.

We are also building a product ecosystem that will include user friendly mobile apps, desktop wallets and browser extensions which will provide a seamless experience for all users. So that users will be able to pay, transfer or hold crypto assets without worrying about the complexity of the underlying system.

Architecture

When a user is transferring ETH or ERC20 tokens, they have to wait for block confirmation times which ranges from 14 seconds to 20 seconds. Also you have to wait for multiple blocks to be sure of the finality of the block inclusion in the chain. Let’s say you are buying a coffee or paying tokens to watch a movie. On each transaction, you are not only paying fees but you also need to wait for it to get confirmed. That’s a deterrent for users to use the service.

As cryptocurrency gains favor, more transactions will jam the Ethereum network and gas fees will increase on an average for each transaction for faster confirmations by users. Note that gas fees vary as per traffic and confirmation time. We propose Matic as a solution to overcome these problems.

Here is how Matic works:

  1. User deposits crypto assets in Matic contract on mainchain (currently implemented with Ethereum blockchain only)
  2. Once deposited tokens get confirmed on the main chain, the corresponding tokens will get reflected on the Matic chain.
  3. The user can now transfer tokens to anyone they want instantly with negligible fees. Matic chain has faster blocks (approximately 1 second or less). That way, the transfer will be done almost instantly.
  4. Once a user is ready, they can withdraw remaining tokens from the main chain by establishing proof of remaining tokens on Root contract (contract deployed on Ethereum chain)

Remember any fungible crypto assets can be represented as ERC20 tokens on Matic chain. That way, the same method will work for any fungible crypto assets.

Check out our contracts on GitHub: https://github.com/maticnetwork/contracts

Consensus and security

To provide some context, Matic ecosystem will have the following actors:

  1. End Users
  2. DApp developers : Developers will be the businesses who would be using Matic to scale their applications and provide a better UI/UX to their end users
  3. Stakers : The stakers will play a very important role in the Matic Network. These stakers validate the transactions and propose checkpoints on the mainchain using PoS consensus mechanism with 2⁄3 majority. They also choose Delegates amongst themselves who satisfy a certain criteria to act as block producers.
  4. Delegates : These are block producers chosen by Stakers who enable faster blockchain generation times. They also have to provide a large stake as well as go satisfy various criteria such as KYC to be nominated as delegates.

Matic uses a dual strategy of Proof of Stake at the Checkpointing layer and Delegates at the Block Producer layer to achieve the faster blocktimes while ensuring ​high degree of decentralization by achieving finality on the main chains using checkpoints and fraud proofs.

Basically, anyone can stake their Matic tokens on root contract to become a Staker in the PoS checkpointing layer(contract deployed on Ethereum chain). This provides a high degree decentralized base layer for Matic chain.

Now, at the Matic block layer we have Authorities/Delegates selected by PoS Stakers on the base layer with Proof of Solvency who will be creating the Matic Blocks. To achieve faster block generation times these Delegates will be low in number. ​ This layer will achieve <2 second block generation times at extremely low to negligible transaction fees.

On Matic network’s checkpointing layer, basis our PoS mechanism, every few blocks on Matic block layer, a proposer will be chosen among the stakeholders to propose a checkpoint on the main chain. These checkpoints are created by proposer after validating all the blocks on the Matic block layer and creating the Merkle tree of the block hashes since the last checkpoint. The Merkle root is then broadcasted to the staker network for their signatures. The other stakeholders also verify the proof. They approve the proposed block, if it’s valid, by providing their signatures. The system needs 2⁄3 approvals of stakeholders be to propose “header block” to root contract. Once the checkpoint is proposed on the mainchain, anyone on the Ethereum mainchain can challenge the proposed checkpoint till a specified period of time. If no one challenges it till the passing of the challenge period, the checkpoint is formally included as a valid checkpoint on the main chain.

Following is a illustration of the “Header block”:

More on header block AKA checkpoint— https://ethresear.ch/t/plasma-checkpoint-cost-and-block-time/2016

Apart from providing finality on the mainchain, checkpoints have a very important role to play in withdrawals as they contain the proof-of-burn of tokens in the event of user withdrawal. It enables the users to prove their remaining tokens on root contract using Patricia Merkle proof and header block proof. Note that to prove remaining tokens, header block must be committed to Root Chain through PoS (Stakeholders). Withdraw process will take Ethereum gas fees as usual.

Through this mechanism, we achieve high transaction speed, high degree of decentralization and finality on Mainchain. In our first version which has Ethereum only as the base chain, Ethereum root contract enforces solvency and finality through header block(checkpoints) very efficiently.

Fraud Proofs

To enhance the security of the transactions, Matic Network also provides Fraud Proofs on the mainchain. This mechanism enables any individual on the mainchain to submit the details of the transactions which he/she thinks is fraudulent. If the challenge is successful, the stakes of the parties involved in the fraud are slashed and the challenger receives the slashed funds as an incentive to detect the fraud. This can be considered an ever running high reward bounty program for any parties who want to investigate the veracity of the transactions on the Matic Network.

Potential Use Cases

Matic Foundation is committed to provide a scalable and user friendly ecosystem for third party Decentralized applications to thrive on. Matic Foundation like Ethereum and other platform foundations will promote various Base chain Dapps(like Dapps built Ethereum currently, and NEO, EOS in future) to build and migrate their user facing applications / transactions on Matic Network. It will also award grants and funding to third party app developers to build various user cases on top of Matic Network like:

Payments

Matic will provide an interface for users and payment APIs and SDKs for DApps, merchant, and users to instantly accept or pay in crypto assets (e.g., ERC20 tokens, Ethers).

We have plans to roll-out this system in three phases:

  1. Ethereum and ERC20 token payments
  2. Multi-asset cross chain transfer and payment through atomic swaps and liquidity providers
  3. Fiat enabled payment system through fiat liquidity providers

Atomic swaps

Matic smart contracts will allow users to pay with any crypto token they prefer and receiver will receive payment in assets they prefer. Matic will handle conversation through atomic swap between cross-chain crypto assets.

Liquidity providers

The network will exchange any tokens to targeted tokens by leveraging 0x liquidity pool or other liquidity providers while transferring crypto assets. In case of fiat, we are planning to collaborate with fiat liquidity providers in all major currencies.

Decentralized Exchange (DEX)

Matic has all characteristics which an exchange platform should have — faster and cheaper trades. Matic will provide support for decentralized exchanges and enable trust-less, reliable and easy crypto trades. The decentralized exchange are the future for digital assets and provides better security and solvency instead of centralized exchanges.

Lending platform

The Matic Network will enable a platform for merchants to assess the creditworthiness of connected users via their transaction history. This enables merchants to lend tokens to users on the network when transacting with users that do not have sufficient funds. This will use Dharma protocol to provide tokenized debt to users.

Infrastructure

Users need a utilitarian yet user-friendly interface where MetaMask or web3 enabled browsers are not required. They don’t need to think or understand how Ethereum works under the hood. Matic Network interfaces will make it simple and seamless.

We will provide new infrastructure around Matic Network including friendly wallets for individual users and merchants, payroll dashboard, payment SDKs and other open source tools.

Dagger

We have already started building infrastructure for developers, starting with Dagger. Dagger is a tool or engine to track Ethereum accounts and events in real-time. You can learn more about Dagger here: https://medium.com/matic-network/ethereum-in-realtime-dagger-98ee2d717c76 and check how it works: https://medium.com/matic-network/understanding-dagger-453d90480c51

Developers can use Dagger to track their own smart contracts, accounts, and transactions. They can create custom service or integrate with third-party services through IFTTT or Zapier.

OpenSigner Wallet protocol support

We are developing a wallet implementing the OpenSigner protocol, which is an open protocol to connect web-based distributed applications to mobile crypto assets.

This wallet will help users to interact with DApps and sign transactions easily, while still keeping their private keys safe on their mobile. This should go a long way in making blockchains accessible to mainstream users.


Let us know what you think.

We will keep updating this article as needed. Stay tuned.

Stay in touch with us by following us on Twitter. If you have any questions, feedback, feature requests or need help, please contact us on Telegram: https://t.me/maticnetwork