Mainframe — Communication layer for web3

Written by crypto.passionnoon | Published 2018/03/27
Tech Story Tags: blockchain | mainframe | web3-communication-layer | web3 | software-development

TLDRvia the TL;DR App

DISCLAIMER: I am in no way associated with the MainFrame team. Neither am I a financial advisor, nor is this meant to be financial advice. Whatever follows, just reflects my understanding of the project, and my personal opinion on its future outlook.

Today i will be writing about mainframe project and what its set out to do. Mainframe is heavily based on swarm/pss and hence i will go through swarm/pss in earlier part of this article to get some background to mainframe project itself.

What is web3?

web3 is simply decentralised web.So traditionally we all have been using web2 which is driven client-server architecture.Than it got enhanced a bit where we use cloud to host our servers.But centralisation still remained.Now we are trying to remove centralisation by using decentralised peer to peer architecture and thats called web3.Indicated below are couple of diagrams from this excellent article.

Evolution from centralisation to decentralisation

WEB3 decentralised stack

Today we will be focusing on messaging aspect in above diagram indicated by whisper,telehash etc. In traditional centralised systems we have many commonly used messaging systems like activemq, kafka, qpid etc.Mainframe is set to provide one for decentralised systems.

Iam going to explain about messaging for ethereum blockchain in this article.Messaging for other blockchains are out of scope.

Swarm Network

Swarm is a network of computers that share data with each other.Swarm network is cornerstone to what mainframe is building or has already built for ethereum blockchain.

Swarm uses same p2p protocol as ethereum(devp2p) and the future vision is to have your eth node running both protocols(swarm and ethereum) and part of both networks.Swarm provides services such as file storage(like decentralised dropbox),decentralised database services and PSS(Postal Services over Storm).For this article we are most interested in PSS service provided by swarm.

Postal Services over Swarm(PSS)

PSS is a node to node messaging layer built on top of swarm network.There is already whisper messaging which is part of ethereum stack but its purpose is different and it routes messages between all nodes making it somewhat inefficient for direct node to node communication.

PSS on top of swarm network for node to node messaging

PSS uses message format defined by whisper protocol. Receipient address is partially specified in message so that its hard to snoop where the message is being sent to.Only node which are capable of decrypting will be able to read the message(both symmetric and asymmetric encryption are supported).This message forwarding will happen throughout the network till the timeout mentioned in message expires.In case of multicast, there wont be any address in message body and hence all nodes will read the message.You might be thinking that its inefficient way to route messages but devp2p uses something called kadelmia routing which makes this kind of routing efficient.More on that below.

So whats the use of these messages?Every message belongs to a topic(remember queue and topic) and you can attach code to be executed to the topic.So whenever a message is published to topic, the code gets executed.

Kadelmia Routing

This is a kind of routing for p2p networks which uses distributed hash tables to maintain address of nearest nodes present in the network.Important thing here is node wont have connectivity to all nodes in the network but subset of nodes.So routing table of each node will contain addresses of exponentially distanced nodes and not every node present in a network.

Kadelmia DHT

As you can see in the diagram above, node 0 has addresses of only 1,2,4 and 8 Id nodes.In this way, lookups are very fast and node routing table don’t need to contain references to entire network.More info about how this lookup works are in this excellent video

SWAP(Swarm Accounting Protocol for Service Wanted and Provided)

SWAP is the accounting protocol using by PSS to incentivise nodes which participate in PSS network.

Inspired by state channels, SWARM introduces a secure and scalable off-chain framework to support generic incentive systems playfully called ‘swap, swear and swindle’ games. The system relies on three pillars: communication, registration, and enforcement. (1) Peers engage in a local exchange (p2p communication) of data, promises, payments, messages, requests, deliveries etc. (swap) Peers will relay data between remote non-connected nodes to extend the scope of the network.(2) Participants pay a security deposit to a smart contract to back their promise of delivery and quality guarantees (swear). (3) Rules of service provision are enforced by a courtroom making nodes accountable in case of non-compliance (swindle).

Implementation of the above is achieved by using chequebook smart contracts which is offchain payment.So nodes send cheques to each other.In mainframe world,MFT tokens are used to incentivise nodes

More details in this excellent video and mainframe whitepaper.

MainFrame

Now lets focus on mainframe and what problems its trying to solve.

Challenges in current day Internet Software

Addressing:Since TCP/IP stack over which communication happens is easily traceable possible to trackdown where traffic has originated from with great accuracy.This will make it very hard to remain anonymous since geo coordinates can be easily identified.

Domain Name Registry:Using services such as whois ,its very easy to takedown domains by centralised organisations such as ICANN

Certificate Authorities: TLS/SSL layer security is provided by Certificate Authorities like symantec, digicert etc.(Padlock in your browser navbar shows if site is over https and secure.Click on it to know valid certificate details).But issue here is its very easy to get a certificate from these centralised authorities once domain is compromised and someone takes control of it.

Communication Apps: Current day communication apps and software like whatsapp,skype,slack,gmail,facebook etc all works on client-server architecture and suffers from centralised software problem where all your data is under control of one entity.And thats not a good thing to go by the recent events such as cambridge analytica data hack etc.

Mainframe communication platform

Mainframe is an unstoppable communications platform that combines the desired features of today’s best networking protocols and applications while also maintaining the highest level of security and user sovereignty. The platform consists of various protocol and transport layers incentivized by token economies, along with software development kits(SDKs) enabling easy integration with a variety of popular languages, operating systems,and devices, as well as smart contracts and oracles for token exchange and ease of interoperability with various popular blockchains.

Mainframe is built on Swarm/PSS and uses incentivization scheme based on SWAP protocol as explained above. Whitepaper explains in great lengths about how this incentivazation of MFT tokens works between nodes with useful diagrams.

As shown above, a typical mainframe node does all the things which swarm node do within swarm network.It can store chunks of file, provide database services, route packets so on and so forth.

TestNet/Proof of Concept

Mainframe has done a great job in implementing PSS in real world by providing a slack-like messaging app for mobile and desktop called Onyx.

They have demoed it in recent ethereum devcon and you can watch it here.

Token Utility(MFT)

Mainframe tokens have various uses within the Mainframe ecosystem:- They incentivize the timely and efficient relay of packets between peers.- They incentivize the delivery of packets from sender to receiver.- They incentivize reliable decentralized file storage.- They incentivize reliable decentralized data services.- They can be used as a medium of exchange for marketplaces on the Mainframe platform where digital goods and services can be bought and sold.

Roadmap

Mainframe has 3 milestones.Apollo,Hawthorne and Gettysburg.In each milestone they focus on improving onyx app as well as development of mainframe protocol.You can find more details in their whitepaper.

Team/Advisors

Quite a strong team with around 12 employees as found from the website with most of them based in London office.

Also their employees have spoken at various conferences including ethereum devcon.

Led by CEO Mick Hagen who in the past founded company called Zinch which links high school students and college recruiters.It was later acquired my Chegg.

CTO Carl Youngblood has more than 20 years of experience as full stack developer.He has a masters in CS from the University of Washington.

Profiles of management team.

Mainframe Management Team

They have lot of VC firms investment.These venture capital firms have also invested in Facebook, Square, Uber, Docker, Viv, Dollar Shave Club, Honest Company, and many more.

Token Metrics

Mainframe plans to sell 50% of tokens for 30k ETH.

Out of 30k ETH, they have sold 27k ETH in private presale.

Private Pre-Sale — Tranche 1Value: 21,000 ETHMFT Price: 0.00000582 ETH(171,821 MFT per 1 ETH)

Private Pre-Sale — Tranche 2Value: 6,000 ETHMFT Price: 0.00000647 ETH(154,559 MFT per 1 ETH)

Remaining 3k ETH worth of tokens are being airdropped or crowdgifted. More information here

Token split

Media:

Website: https://mainframe.com

Whitepaper: https://mainframe.docsend.com/view/j39qpui

Telegram: https://t.me/MainframeCommunity


Published by HackerNoon on 2018/03/27