Web Serving

From Internet Computer Wiki
Revision as of 17:21, 30 August 2022 by Ais (talk | contribs)
Jump to: navigation, search

The Internet Computer is currently the only blockchain whose smart contracts can securely serve web content directly to the user’s browser. This is a crucial and distinguishing feature of the Internet Computer that allows dapps to run 100% on-chain inheriting the security of blockchain without sacrificing speed or affordability.

Enabling true web3

True Web3 functionality is only achievable by blockchain applications running fully decentralized, which includes smart contract logic, on-chain data storage and serving frontend to the user’s browser. Relying on centralized cloud providers (e.g. AWS, GCP) to host the frontend of dapps introduces a single point of failure. This not only includes security risks by possible tampering with the frontend, but dapps running on centralized servers can be taken down at any point, which negates the censorship resistant nature of blockchain.

Hosting dapps 100% on-chain provides the additional benefit of letting DAOs launched on the Internet Computer to completely control these applications with on-chain governance and not only the backend logic. This lets users be fully in control of these dapps realizing complete decentralization and democratization of web applications.


Processing HTTP requests

Blockchains differ in their processing of computation from regular web servers, which makes serving web a difficult task. To overcome this, the Internet Computer introduces something called boundary nodes. These nodes act as a layer that translates HTTP requests from users to messages that can be processed by smart contracts running on the Internet Computer. This allows users to update the state of the blockchain simply by interacting with a browser.

Reverse Gas Model

Requiring users to have tokens in order to use applications and pay gas fees is an enormous barrier of entry. One key feature of the Internet Computer that allows users to directly interact with the blockchain through a browser for free is the reverse gas model. Simply put, canisters pay for their own computation and storage costs using cycles. In other words it is the developers and not the end-users who pay for gas.

This offers a very similar model to Web2 applications, whose hosting is taken care of by developers. The reverse gas fee model allows users to experiment with dapps for free and allows dapps to scale infinitely by not putting up a wall in front of their users at the very first interaction.

Internet Identity

Users should not have to set up wallets in order to interact with dapps. To remove this hurdle the Internet Computer offers an alternative anonymous authentication solution called the Internet Identity. With it users can login to dapps running on the Internet Computer by simply using a biometric sensor on their device. In the background, Internet Identity uses novel cryptography and creates new ids for each dapp one authenticates with. This is a simple way for users to login and use dapps running on the Internet Computer without having to create a wallet, while they remain anonymous and untraceable across different applications.