Web Serving

From Internet Computer Wiki
Revision as of 16:43, 29 August 2022 by Ais (talk | contribs) (Added opening text and additions throughout.)
Jump to: navigation, search

Serving web content on-chain requires to serve both the backend computation, and the frontend interface from the blockchain. For a full web serving system, the blockchain should also facilitate full interaction (i.e. via tokens) and authentication.

Dapp code hosted and executed on-chain

Canister smart contracts on the Internet Computer serve web content directly to users. This is a distinguishing feature, on other blockchains a small part of the dapp logic runs in a smart contract, but the actual consumer-facing web or interface is hosted on a centralized cloud provider (e.g. AWS) instead of being served directly from the blockchain.

The Internet Computer serving dapps whose code is hosted and executed entirely on-chain unlocks the Web3 potential of smart contracts.

Reverse Gas Model (i.e. the "canister pays")

In dapps built on Ethereum (for example), users are required to connect a wallet or tokens to use them. This slows down adoption of dapps because using a dapp is not as simple as clicking on a website link; it requires users to buy tokens, install browser plugins, and again requires the user to engage with cloud hosted services. Internet Computer dapps run on a "Reverse Gas model" whereby users can interact with a dapp without having to pay in tokens since the canister can store a certain amount of cycles to pay for the user's needs.

As an example, the Motoko Playground dapp is hosted and executed entirely on-chain and it does not require visitors to pay for the computation: https://m7sm4-2iaaa-aaaab-qabra-cai.raw.ic0.app/

Internet Identity

Internet Identity is a blockchain authentication system that enables you to sign in securely and pseudonymously to dapps on the Internet Computer. This makes logging into dapps easy and safe for users without requiring any reliance on cloud service providers.