Web3 middleware: The bet on infrastructures to accelerate Web3
The middleware playbook could be the long term goal for crypto gem hunting. Despite the six years of blockchain development along the likes of decentralized infrastructure and GameFi, there remains roadblocks that hinder blockchain utility.
The solution lies with middleware. Middleware connects users, institutions, developers and real world off-chain data all together with different dAPPs. Connecting the world to Web3, users possess decentralized identifiers (DIDs) to prove their identities in metaverse games. While no one can steal our identities and our work, decentralized naming services were created for such a purpose. To cultivate protocol development direction, we need institutions and retail participations to participate in governance. This is the reason for node services and proof of stake (POS) governance.
Data analytics will also be the key to connecting the real world and developers. Data generated from the real world, such as stock market data and consumer behavior data, is processed, verified and integrated into blockchains in the Web3 world. Most importantly, data privacy is well protected with oracle processing. Users do not have to worry about how their behavioral data, such as where they go and what they spend money on, will be protected. In terms of data processing on the blockchain network, middleware that is focused on APIs and tools like GraphQL are ready for developers. Software engineers can access on-chain data conveniently to develop in-house data analytics.
The four areas, namely decentralized identities, node service, database and oracles, represent future opportunities which deserve attention. While reading the middleware playbook, don’t skip the line, because the middleware will connect all of us with blockchain networks. This represents significant potential for cross-industrial utilities that can be integrated with blockchain adoption.
1. Introduction — the developed and the undeveloped areas
What does the blockchain world lack to increase its adoption?
Why do people still hesitate to use blockchain or cryptocurrency?
Is there something in the middle that is missing?
Could middleware solve the problem?
The cryptocurrency market has evolved into an environment where we can now identify several diverse subsectors of value.
We have witnessed the exponential growth of blockchain protocols and Layer 1s in 2021. The developed and developing categories in Layer 1 blockchain application infrastructure are DeX, Lending and borrowing, Liquidity providers, Bridge, Derivatives, NFT markets, Gaming and Storage protocols. However, it looks like blockchain industry is still adapting as it seeks to attract users from the physical world, Web2 companies and traditional finance (TradFi) institutions. For example, TradFI institutions do not tend to turn to DeFi lending and borrowing. Performing lending and borrowing in DeFi does not require reputation and creditability unlike the process of borrowing from the banks or taking out a mortgage for purchasing real estate. Also, Web2 companies do not have convenient ways to access the blockchain world. For example, the data fed from Amazon Web Services (AWS) analytics does not seem to have a convenient interface that allows it to be processed, verified and linked to blockchain protocols. Likewise, on-chain data has few ways to be illustrated on a Web2 interface for Web2 developers to build upon; the exceptions being Dune Analytics and Flipside Crypto. Web applications such as Dune are definitely fostering the adoption of blockchain analytics. However, such applications do not provide a direct relationship to developers in the form of API, indexing, JSON queries and HTTP queries/interface. A regular developer skilled in programming languages such as Java or Python still needs to learn Solidity and Rust/React to analyze blockchain data. Moreover, in Web3, there are often bad actors. “Rugpull” often happens when bad actors raise funds or attract investors to provide liquidity in a DeFi application only to suddenly disappear. Such machinations often leave no protection for investors. This is also one of the reasons why the value and adoption of the blockchain world is hitting barriers in the Web2 space.
There seems to be a missing middle layer for 1) resolving reputation and identities, 2) applications that attract more institutions, 3) more retail users and developers. There needs to be an interface layer to combat these inconveniences, akin to the datalink and network layer in an Open Systems Interconnnection (OSI) model. This is known as middleware.
2. Middleware and its potential market
The potential market and subsectors of middleware can be categorized in the following:
The first category is identity and creditability. First, the identity system is different from a draconian-style censorship oriented social credit system. The decentralized identity mainly focuses on using on-chain hash as a form of Web3 identification, so authentication can be provided for applications such as lending and borrowing. Web domains have also become a trend associated with sustained ownership. In Ethereum Name Service, buyers can buy up a large sector of domain and sell it to others as an ownership concept. In Web3, users can finally own a domain in a sense that they have the true ownership based on the transaction hash and wallet ID, which is related to DID’s original intention.
The decentralized identity and domain driven solution could provide a way out of rugpull, so that services such as loan agreements and debt refinancing can be safely carried out with reputation and Web3 ownership mechanisms.
The second type of middleware is the node service provided to allow ordinary users to participate in a blockchain network’s governance while getting rewarded. Different Institutions provide these node services on different blockchains. The importance of institutional participations should be addressed. For example, institutions can represent the community to vote for the development and coming events for the native chains once stake delegations are completed. Development and protocol directions are extremely important considering the long-term potential of a native chain or protocol. For example, institutions are well aware of conducting popular token farming in order for a native protocol DeFi to kick off and develop.
Institutions have been a hub for attracting and educating retail investors so the latter can glean financial information. They also act as a trading platform, like Interactive Brokers, American Trade and Robinhood in order to attract retail participation. Institutional participation will increase with higher retail participation. On top of that, the data generated from user activities will not be used to play with zero-sum game strategy. When institutions stake their tokens, they also provide rewards to retail participants. These effects are magnified in delegated POS protocols like Cosmos and Nominated POS like Polkadot.
Middleware could also provide intelligence on governance to institutions and investors. As institutions usually hire professional market players, professional development and governance is augmented. For example, governance proposals could be along the lines of “Bringing Liquid Staking and DeFi to the Cosmos Hub with Interchain Security” to innovate staking as a service with liquid staking. Liquid staking is a process where people can stake their tokens and get a derivative of the tokens in return. Therefore, token liquidity is restored while locked during staking.
Middleware for developers seeks to automate and analyze on-chain data. Blockchain on-chain data requires proficient coding skills from developers to do on-chain analysis. Developers need to have knowledge in Web3.js for chains like Arweave, Solidity for Ethereum and Rust for Polkadot, Near and Solana. Learning all these programming languages may hamper Web2 developers’ involvement with Web3. Therefore, middleware for developers will allow developers to access data analytics functions associated with blockchain data, and this needs to be combined with developer tools. For example, Python and Java are two of the most recognized coding languages. Doing SQL on Dune helps users to visualize on-chain data, but does not provide an interface the consists of Web2 endpoints with further room for development. For example, Dune does not provide API in Java or Python, so developers are unable to visualize using Seaburn and Matplot. Automation can also be achieved with more APIs and endpoint interfaces.
The last part needed for Web3 to connect real world is the Oracle. What is Oracle? Oracles are the systems that connect blockchains to real-world data and existing systems, and provide critical infrastructure for establishing a unified, interoperable Web3 ecosystem. Oracle connects data from the real world, for example user data from electrical vehicles, car parking data, e-commerce consumer data, identity data, financial data, stock price data and etc. Oracles verify and process data and reflect this data to the blockchain. The blockchain can then interface with the data and provide a private and public key relationship for the Oracle data. For example, if Nasdaq wishes to incorporate Asian stock data, it can integrate Oracle data and reflect the real-time stock price instantly as a mirror stock trading crypto platform.
3. Middleware Solutions– General Identities, Institutional Staking, Stable Income, APIs and Real-World Integrations
People need to showcase who they are. And identities, as well as their associated assets, cannot be replaced. This is how Web3 gives users the right to lay claim to identities around who they are, and what they own. DIDs function as Web3 identities. Meanwhile, the domain name is where users showcase their ownership of Web domains in the decentralized Web3 world.
The decentralized identity solution is well driven by several protocols, but privacy issues remain of concern. In Web3, there is an emphasis on privacy. Although many protocols advocate decentralization and security, most are still centralized with the majority stake owned by the protocol’s founding team. Also, the transparency of on-chain data is a tool for back actors to utilize and play zero sum games. However, the bright side of decentralized identity is that it is capable of pointing out bad actors and prevent them from participating in governance. If Web3 natives are not dealing with decentralized privacy protection driven identities, centralized parties such as government and big tech will roll out digital identities. In such a situation, the majority of the power in decentralized identity protocols will be owned by centralized parties. Web3 natives can either surrender power to them or to develop a complete privacy-driven solution for identities. With such a solution, the blockchain network can be bridged to more institutional and retail users, with a higher level of trust. With proven Web3 identity ownership, Web3 users and owners can deal with reputation-based scoring for uncollateralized lending and domain name services.
The architecture of decentralized identity can be explained via the following. First, the DID is created using the DID method, such as “did:key”, where “did:key” is composed of a string to compose a Uniform Resource Identifier, which functions like a URL, which also comprises a web address string. This URL becomes the main component of the DID that mainly communicates with machines while remaining readable by humans.
The base components of DIDs comprise the DID controller, DID subject and DID document. The DID controller describes where the entity is capable of changing the DID document. Meanwhile, the DID subject is the subject to be identified with given DID. For example, a person, group, organization, foundation, digital assets, intellectual property, asset, tokens and physical assets can be the subject labelled with a DID. To interact with the DID subject and controller, the DID document is the dataset that is associated with the DID subject. In the meantime, the DID document also incorporates the string of characters to provide as a socket to define the identifiers as decentralized identity properties. After providing such properties, the DID documents interaction with the subject. This is to authenticate the DID subject for a confirmation of real information. Subsequently, it provides a machine-readable component guide, which is to present a specification for machine communication context, for example a Json query interpretation. All 3 components must work together to complete a decentralized identity.
Ontology is a blockchain that focuses on a decentralized identity solution . It uses zero-knowledge proof to verify the user identities and assure privacy protection. The decentralized identity starts with KYC data verification that is submitted to the team, including facial biometric data. The user data is sent with an authentication request through the ONT gateway. After the authentication, the credential is stored on the local device with the ONT software development toolkit, then verified on ONT blockchain mainnet. The ontology ID starts with the ONT ID on the primary digital wallet, with Ontology Authenticator being the device to confirm the decentralized identity subject’s information. The Ontology Authenticator allows people to claim and register the identity. Users can scan QR code on ONTO to log in to OScore’s website and authorize OScore to read ONT ID wallet assets. Consequently, users can sign in scan the QR code to generate user credentials.
The ONT ID follows up with the Web 3 specification abovementioned. The ONT ID URL is generated in the following format:
While user credential information is protected by Zero knowledge proof and blockhash, the founding team still has access to the user’s information.
To be more specific on decentralized ID verification, the data flow is done by the end user who starts the process of obtaining owner credentials. The credential consumer then processes the credentials from the claimant end user. The trust anchor gateway is used to register the credential consumers and get the credential information. Meanwhile, the trust anchor verifies the KYC information by end users. Then the data is verified and submitted to the ONT blockchain mainnet.
ONT DID also leads to the reputation scoring framework OScore to create credit goals to sustain DeFi borrowings through reputation and creditability. The credit-based lending and borrowing aims mainly to lift the efficiency of collateral, which favors the borrowing of assets based on credit and under collateralization. OScore evaluates users by asset exchange volume, smart contract association, historical holdings and existing credit history. In the future development, Oscore has also been suggested for use in ICOs and Airdrops. With Wing Finance, WING tokens are token rewards for a higher Oscore, which are earned via the punctual return of borrowed assets or loans. This is similar to credit scoring on TransUnion in the Tradfi world. Users can combine their ONT DID and OScore to demonstrate a good credit history, for example timely mortgage repayment and mortgage restructuring. During each swap of their pools, Wing Finance needs to verify credentials through the ONT network and to record each transaction user. Bad actors such as flash loan attackers will thus stay away from the pools.
Another identity solution driven by blockchain is the EWT (Energy Web Token) protocol. This is a green energy-focused protocol built on Polkadot. EWT functions as a consortia Relay Chain to mainly provide parachain as a service and Dapp.
The decentralized identity functions as an identifier to trade energy. Digital Identities are assigned to assets and users, created on the Energy Web Chain. Energy Web Chain uses a crypto wallet to generate a cryptographic address such as the following:
There are many use cases in the energy web chain, such as grid operators and a renewable trading platform where users can trade the renewable energy they generated with EWT. Physical assets such as large-scale renewable energy facilities, advanced metering infrastructure are also tokenized. The Australian Energy Market Operator is also supporting EWT at a large scale with Der management and EDGE (Energy Demand and Generation Exchange).
After decentralized identities, reputation-scoring uncollateralized lending is the use product. Alendis and Metavisa are two of the most representative protocols. Metvisa’s reputation scoring with cross-chain development is based on credit history, on-chain behaviour preference, address correlation, asset holdings and portfolio, and address activity level. Up till now, the Metavisa has little to provide, on an extensive level, on the relationship between the reputation scoring system and the lending and borrowing system. However, the silver lining is that it aims for integration with games, DeFi and DAOs.
Another uncollateralized lending protocol is Atlendis. This is a capital-efficient DeFi lending protocol that enables crypto loans without collateral, where institutional borrowers can obtain competitive loan terms, and lenders get access to higher returns while having more granular control over their investment portfolios. When borrowers are whitelisted, the Atlendis protocol only uses a few targeted liquidity pool for borrowers in order to strengthen the security of the whole liquidity system. Borrowers do not need to lock up any collateral on Atlendis protocol which does not limit their liquidity level. Interest and principal are paid on the crypto loans at maturity. In this protocol, lenders can also choose borrowers that have higher levels of trust and sincerity. This is different from most other DeFi protocols. Most DeFi applications require institutional borrowers to over-collateralize their loans using crypto as collateral, limiting the wide range of use cases possible with crypto lending. After the lending and borrowing position agreement is completed, an NFT is given to each of the position.
2）Domain name service
The Internet DNS (domain name system) is hierarchical. The DNS is like the phone directory of the world wide web. At the surface level, people can read the domain names such as amazon.com and github.com. These domain names are actually translated from IP addresses for human-readable purposes. In reality, the IP or internet protocol is like physical addresses in real-world locations. For example, a domain name like www.example.com translates the addresses to addresses 18.104.22.168 (IPv4) and 2606:2800:220:1:248:1893:25c8:1946 (IPv6).
The Web3 domain name is known as the “read-write-trust web” with the product solution. The Web2 domain name service is, however, stored at centralized servers. This means that whoever owns the server has rights to delete, amend or change the ownership of the domain name service. The scenario is different under the Web3 domain name service where Web3 owners can avoid regulation, while the web interacts with the named domains owned by Web3 users. That Web3 domain can be done in a smart contract way that is stored, transferred and verified by a blockchain network. When the blockchain is combined with domains, the domain ID follows up with the specifications of the blockchain protocol so that users no longer have to copy long and complex string. Instead, while sending funds to that wallet address, senders just need to input a URL such as “dave.eth”.
Decentralized naming puts human-readable domain names into IP addresses like 35.012.288.176. This allows computers to locate numerical data and serve as a content website. ENS (Ethereum name service) is similar to DNS domain service, but it upgrades DNS into Web3 solutions so that it transfers content like human-memorized data or text into eth addresses. ENS can also be bought in NFT marketplace and provides hierarchical subdomains by the domain owners. When you buy a domain which has a certain meaning, it gives you a sense of ownership and confers value where the name has a close relationship with you, or your precious collectibles.
Having realized web domain and identity, reputation and creditability uncollateralized lending and borrowing are the next phase of development. In traditional finance, borrowers are required to submit their personal identity proof and assets for borrowing loans. In collateralized lending such as Meta visa and Atlendis, users could provide creditability proof for borrowing loans. This attracts traditional finance and institutional lending as it is similar to how lending works in banks. After all, uncollateralized lending and borrowing does not make sense to the collateralization of securities, as institutions like Lehman Brothers used to have a strong reputation but ended up as the cause of the 2008 Global Financial Crisis.
3.2 Node Service
The importance of institutional participation is addressed. As many governance proposals are driven by smart participants, institutions are more likely to provide professional governance to protocols. While retails delegate their stake into the institutional validators, these validators can also provide stable income to retail participants. In case retails are financially incentivized, more retail players will come into the space to delegate their stakes and participate in decentralized governance.
The above figure shows a list of validators that receive stake in a proof of stake ecosystem like eth 2.0 proof of stake system, cosmos delegated proof of stake system and Polkadot nominated proof of stake system.
These systems also work out with staking as a service protocols. For example, XPRT works with staking as a service for Cosmos, Sol, Eth and Persistence One, pStake, liquid staking application. Its sub arm, audit.one, is an institutional staking as a service application with pLend as the stablecoin lending platform.
3.3 Database Access and Web3 APIs
The data access area in regard to blockchain middleware is to access blockchain data with relevant and convenient data endpoints that favor developers. Blockchain data is crucial to blockchain adoptions because developers and investor need the data processing to analyze and develop more protocols and increase the general use cases of blockchain. For example, fixing smart contract bugs on Solana ecosystem will enhance security and drive more developer activities on Bonifa.
These aforementioned protocols provide direct data interface to developers for endpoint utilities. The first and most valuable data access protocol is the Graph, which provides GraphQL as a way for developers to index data from Dapps, layer 1 chains and NFT platforms. Indexing refers to the process where data can be used and interfaced with Web2 coding methods to acquire on-chain data.
The graph protocol comprises indexers, delegators, curators and fishermen. Delegators are network participants who delegate (i.e., “stake”) GRT to one or more Indexers. Delegators contribute to securing the network without running a Graph Node themselves. Delegators cannot be slashed for bad behavior, but there is a tax on Delegators to penalize poor decision-making that could harm the integrity of the network. Indexers are node operators in The Graph Network that stake Graph Tokens (GRT) in order to provide indexing and query processing services. In disputes, a deposit of a minimum of 10,000 GRT is required from the Fishermen and locked until the dispute is settled and a resolution has been given. If the dispute is rejected, the GRT deposited by the Fishermen will be burned, and the disputed Indexer will not be slashed. If the dispute is settled as a draw, the Fishermen’s deposit will be returned, and the disputed Indexer will not be slashed. If the dispute is accepted, the GRT deposited by the Fishermen will be returned, the disputed Indexer will be slashed and the Fishermen will earn 50% of the slashed GRT. During delegation of stake, a 0.5% charge is taken. This means if you are delegating 1,000 GRT, you will automatically burn 5 GRT. Curators are critical to the Graph decentralized economy. They use their knowledge of the Web3 ecosystem to assess and signal the subgraphs that should be indexed by The Graph Network. Through the Explorer, curators are able to view network data to make signaling decisions. The Graph Network rewards curators that signal good quality subgraphs, by letting them earn a share of the query fees that subgraphs generate. Curators are economically incentivized to signal early.
The graph provides considerable on-chain data through indexing. Such indexing favors developers. Here is a list of protocols where their data can be indexed by the Graph. The diversity of supported protocols is addressed, including music NFT protocol Audius, metaverse NFT protocol Decentraland, liquid staking defi protocol like Lido, dex protocol using off-chain oracle for order book balance like Dodo, normal dex like Uniswap and Sushi Swap and Web3 protocol like ENS (Ethereum Name Service).
Another API protocol for developers to achieve blockchain endpoint data is infura.io. Infura.io provides endpoint data retrieval for Json RPC methods like web3.js. It includes data for Ethereum (execution layer only), eth 2.0 staking (consensus data only), IPFS, Filecoin, Polygon PoS network, Arbitrum, Near, Aurora and StarkNet. JSON-PRC methods can be used to get data endpoints of Ethereum, Filecoin, Polygon, Optimism, Arbitrum, Near, Aurora and StarkNet.
3.3 Oracle and datalink
When smart contracts have to involve the real world and data outside blockchain networks, oracles act as the “hubs” to connect blockchain inside out in Web3 stacks. Subsequently, oracles become the infrastructure abstraction layer to bridge traditional and private systems to blockchain networks.
Because of such an abstraction layer, all the data is verified to become the cryptographic truth. In the traditional world, there are many crises due to hidden, probabilistic guarantees and no shared truth. Two of the most significant examples are Lehman Brothers and Wirecard. The former caused the Global Financial Crisis in 2008 while the latter got listed on the New York Stock Exchange by fraudulent means. Oracle systems try to solve problems by providing cryptographic guarantees that verify and process data with the blockchain network. This means the proven results are immutable, as a solution to counter scams.
As blockchain holds the virtual world data, it is also the interface to integrate real-world data. Oracles serve to link real-world assets such as off-chain integrations, produce a virtual machine for scoring to prove the launch of real and useful protocols, and provide a means to transaction contracts and large value assets with scoring loans, including mortgage loans, business loans, personal loans. One of the best-known protocols to link up data from other networks is Chainlink, which uses its oracle as a virtual machine to process, verify and connect to blockchain. Chainlink is an off-chain oracle and computing protocol to secure data from off-chain to on-chain. It applies to many cases like NFT, DEFI and other applications. The VRF proof of Chainlink first verifies the data on-chain, then randomly generates a cryptographic proof and random numbers to locate it, uploads to the blockchain network and gets verified. Chainlink Data Feeds work fast to connect smart contracts to the real-world data such as asset prices.
The Chainlink machine first collects qualitative data from the world’s data sources. For example, they draw data feed like traditional and crypto asset prices from data centers and data houses to their own oracle network. The Chainlink oracle network conducts origin proofs among data quality from multiple sources of data. The data is then validated from Chainlink mining or staking nodes at Chainlink 2.0 with economic incentives. The data privacy is then sustained by decentralized computation and the price data is reflected to the Ethereum network and shown in Aave liquidity pools.
4. Conservatives on identities and restriction of freedom
The decentralized identities are a two-edged sword. Although every cloud has a silver lining, identities that are stored in a centralized chain or centralized database leads to the restriction of freedom. These data, once exploited, can be vulnerable to hacker attacks and identity thieves. The more data is controlled by a small number of people, the less power Web3 users have. If that is what is about to happen, the Web3 model copies what we have now with big tech, big government entities and institutions. The awareness of privacy protection should be addressed more. It is because privacy has never been tied to significant economic incentives, thus hindering the development of decentralized identities with privacy-driven solutions. If the privacy-driven solution is not developed now, we may have to go with the big tech way such as Web2. Big tech and entities are driving the use of digital identity for mass adoption, but with centralized databases.
As blockchain adoption increases, middleware offers a way to accelerate blockchain utilities to decentralize identity, attract participation from institutions to retails, provide data application program interface and to link up with real-world data.
With middleware, Web3 development is accelerated. Users are able to own a unique decentralized identity. Users with a developer background will be able to utilize on-chain data as an off-chain way and API connections from blockchain endpoints. The participation of institutions would drive the activities of retail users to form a massive blockchain world.
The Web3 middleware infrastructure bet will come along with the complete development of Web3 adoption. In the future, much of the data can be bridged to blockchain and verified quickly. Institutional participants can run blockchain works with the staking reward to incentivize retail users. Web3 will thus accelerate the existing physical world’s shift to a new digital world.
About Huobi Research Institute
Huobi Blockchain Application Research Institute (referred to as “Huobi Research Institute”) was established in April 2016. Since March 2018, it has been committed to comprehensively expanding the research and exploration of various fields of blockchain. As the research object, the research goal is to accelerate the research and development of blockchain technology, promote the application of blockchain industry, and promote the ecological optimization of the blockchain industry. The main research content includes industry trends, technology paths, application innovations in the blockchain field, Model exploration, etc. Based on the principles of public welfare, rigor and innovation, Huobi Research Institute will carry out extensive and in-depth cooperation with governments, enterprises, universities and other institutions through various forms to build a research platform covering the complete industrial chain of the blockchain. Industry professionals provide a solid theoretical basis and trend judgments to promote the healthy and sustainable development of the entire blockchain industry.
Medium: Huobi Research
1. The author of this report and his organization do not have any relationship that affects the objectivity, independence, and fairness of the report with other third parties involved in this report.
2. The information and data cited in this report are from compliance channels. The sources of the information and data are considered reliable by the author, and necessary verifications have been made for their authenticity, accuracy and completeness, but the author makes no guarantee for their authenticity, accuracy or completeness.
3. The content of the report is for reference only, and the facts and opinions in the report do not constitute business, investment and other related recommendations. The author does not assume any responsibility for the losses caused by the use of the contents of this report, unless clearly stipulated by laws and regulations. Readers should not only make business and investment decisions based on this report, nor should they lose their ability to make independent judgments based on this report.
4. The information, opinions and inferences contained in this report only reflect the judgments of the researchers on the date of finalizing this report. In the future, based on industry changes and data and information updates, there is the possibility of updates of opinions and judgments.
5. The copyright of this report is only owned by Huobi Blockchain Research Institute. If you need to quote the content of this report, please indicate the source. If you need a large amount of reference, please inform in advance (see “About Huobi Blockchain Research Institute” for contact information) and use it within the allowed scope. Under no circumstances shall this report be quoted, deleted or modified contrary to the original intent.