XION
DiscordGithub
  • Welcome to XION
  • XION'S Core
    • Concepts
      • Generalized Chain Abstraction
      • Intro to Account Abstraction
      • XION's Meta Accounts
      • Meta Accounts Design
      • Architecture & Tech Glossary
      • Use Cases
  • developers
    • Xion Quick Start
      • Zero to Dapp in 5 Minutes
        • Launch a User Map Dapp on XION in 5 Minutes
        • React Native Mobile Dapp on XION in 5 Minutes
      • Set Up Local Environment
        • Setting up your Local Smart Contract Development Environment for XION
          • Setting up your XION Smart Contract Development Environment on Windows (WSL2 + Ubuntu)
        • Set Up an Integrated Development Environment (IDE)
        • Interacting with Xion Chain using Xion Daemon
      • Your First Contract
        • Deploying Your First Smart Contract on XION
      • Gasless UX & Permission Grants
        • Enabling Gasless Transactions with Treasury Contracts
      • Your First DApp
        • Account Abstraction with Gasless Transactions
        • Interact with XION via your Backend Service
    • Web3 for Web2 Developers
      • Web2 vs Web3 App Architecture: A Comparison
      • Misconceptions and Misapplied Web2 Patterns
      • Recommended Architecture for Dapps on XION
    • Building for Mainnet
      • Xion Testnet: Your Development Playground
      • Building with Audited & Battle-Tested Contracts
      • Community Engagement: Building Support for Your dApp
      • Deploying to Xion Mainnet
        • Smart Contract Audits: Process, Costs & Support
        • Governance Process to Deploying Smart Contracts to Mainnet
    • Learn & Build
      • Token Factory
        • Creating, Minting, and Interacting with a Token Factory Token
        • Building a React dApp to Interact with Token Factory Tokens
        • Integrating a Token Factory Token in a Smart Contract
      • Websockets
        • WebSockets with Xion: Real-Time Communication
      • Mobile Development
        • Building a React Native Mobile App with Abstraxion (Xion.js)
      • Oracles
        • Creating a Smart Contract with Pyth Oracle Integration
      • Indexers: Optimized Data Retrieval
        • SubQuery
      • Use Cases
        • Building a Per-User Data Storage Dapp
    • Reference and Resources
      • Requesting XION Testnet Tokens
      • Public Endpoints & Resources
      • Block Explorers
      • Governance
        • Deploying Smart Contracts to Mainnet
      • Developer Tools: Abstract
      • IBC Denoms on XION Networks
      • Frequently Asked Questions
      • XION Token Contract Addresses on EVM Chains
  • Nodes & Validators
    • Run a Node
      • System Specifications
      • Build the Xion Daemon
      • Download the Xion Daemon
      • Configure the Xion Daemon
        • app.toml
        • client.toml
        • config.toml
      • Join the XION Network
        • xion-testnet-1
      • Confirm node is running
    • Become a Validator
      • Initial Setup
      • Obtain a XION Wallet Address
      • Obtain Funds
        • Testnet
      • Create Validator
    • IBC Relayers and Tokens
  • Others
    • Resources
Powered by GitBook
On this page
  • Misconception #1: "I need a backend server to run my dapp"
  • Misconception #2: "I’ll store user data in a database like MySQL or Firebase"
  • Misconception #3: "Users should register with email and password"
  • Misconception #4: "I’ll create an API layer between the frontend and the blockchain"
  • Misconception #5: "I can update my backend logic anytime"

Was this helpful?

Edit on GitHub
  1. developers
  2. Web3 for Web2 Developers

Misconceptions and Misapplied Web2 Patterns

As Web2 developers begin building in Web3, it's natural to lean on familiar tools, frameworks, and mental models. This however often lead to misapplied patterns that don’t align with the decentralized nature of blockchain development, especially when working with XION.

This guide outlines common misconceptions and design patterns brought over from Web2 that don’t translate well to Web3, and explains how to rethink your approach for building secure, performant, and user-friendly dapps on XION.

Misconception #1: "I need a backend server to run my dapp"

In Web2, your backend is the heart of your application, handling routing, business logic, database queries, and more. But in Web3, your smart contracts replace the backend. There is no centralized server between your frontend and the blockchain.

The Web3 mindset:

  • Business logic lives in CosmWasm smart contracts.

  • State is managed and stored on-chain.

  • The frontend communicates directly with the blockchain, not a backend.

Misconception #2: "I’ll store user data in a database like MySQL or Firebase"

Databases are standard in Web2 for storing everything from user profiles to app data. In Web3, data stored off-chain is not trustless, transparent, or verifiable.

The Web3 mindset:

  • Use smart contract on-chain storage for important, verifiable state.

  • If off-chain data is needed (e.g. large files), consider decentralized solutions like IPFS, Arweave, or Jackal.

  • Indexing services like SubQuery or Numia can help you efficiently read blockchain data.

Only use off-chain databases when the data is not critical to contract logic or on-chain interactions or you need do do complex data agregation.

Misconception #3: "Users should register with email and password"

Web3 applications rely on wallets, not usernames and passwords. Wallets represent a user's identity, and every action is verified using cryptographic signatures and therefore there's no need to manage credentials.

The Web3 mindset:

  • Wallets = Identity. A user’s address is their identity.

  • Authentication is done through message signing.

  • XION simplifies this even further: With the abstraxion library, developers can create a smooth, OAuth2-style login and registration experience directly in the frontend. Behind the scenes, every user that authenticates via Abstraxion is issued a Meta Account, a smart contract account on XION that abstracts away private key management that is linked to their authenticator of choice which includes:

    • Email

    • Social login (e.g., Google)

    • External wallets (e.g., Keplr, MetaMask)

    • Passkey support for biometric authentication (e.g., Face ID, fingerprint)

Misconception #4: "I’ll create an API layer between the frontend and the blockchain"

This introduces unnecessary centralization. If your frontend talks to a custom backend that relays messages to the blockchain, you reintroduce a point of failure.

The Web3 mindset:

  • Interact with smart contracts directly from the frontend using xion.js or cosmjs communicating with the blockchain through RPC, gRPC, REST APIs, or WebSockets via connected network nodes.

  • If needed, rely on indexers, to expose aggregated and filtered data which is usually just used for displaying data on the frontend.

Misconception #5: "I can update my backend logic anytime"

Smart contracts are immutable by default once deployed. You can't just push a quick update like you would on a backend server.

The Web3 mindset:

  • Treat every deployment as a versioned release.

  • Design your contracts to support migrations which also requires setting an admin for each instantiated contract.

  • Implement upgradability only when necessary using patterns like contract proxies or admin-controlled updates (with care).

PreviousWeb2 vs Web3 App Architecture: A ComparisonNextRecommended Architecture for Dapps on XION

Last updated 22 days ago

Was this helpful?