Date: 9-10:30 AM SGT, June 11th 2024 / 9-10:30 PM EST, June 10th 2024
Session Title: Web3 Landscape (I): Infrastructure
NTU I&E x HackQuest MOOC is free and open to all individuals interested in Web3. The MOOC is led by top voices in crypto including Yat Siu (Co-founder, Animoca), Ed Felten (Co-founder, Offchain Labs), Sergey Gorbunov (Co-founder, Axelar), Scott Moore (Co-founder, Gitcoin), Haider Rafique (CMO, OKX), Austin Griffith (Developer Onboarding, Ethereum Foundation), Anna Yuan (Stablecoins Lead, Solana Foundation), and many more. For those who prefer having a text summary and review material, this study note provides a recap of what’s covered during the MOOC. Happy learning!
Main Topic: The Evolution of Web3 Infrastructure and its Integration with AI
Objectives:
1.Understand the fundamentals of blockchain technology and its key concepts.
2.Explore the applications and challenges of Web3.
3.Learn about decentralized networks and incentivized GenAI agents.
4.Understand the setup and use of GaiaNet for decentralized AI applications.
Section 1: Fundamentals of Blockchain and Bitcoin
Blockchain is a collaborative ledger where new records/transactions are appended as “blocks” following pre-defined rules. Key aspects include:
●Transparency: Transactions are visible and verifiable by all network participants.
●Security: Data integrity is maintained through cryptographic hashes.
1.2 Bitcoin: The Digital Gold
Bitcoin serves as a real currency with three main functions:
●Store of Value: Preserves value over time.
●Medium of Exchange: Facilitates transactions for goods and services.
●Unit of Account: Provides a standard measurement of value.
Bitcoin is more like a store of value than a medium of exchange:
●Energy Comparison: Bitcoin's energy consumption per transaction (17,222,400 Wh) is vastly higher than Visa's (1.4 Wh), hence Bitcoin does not require frequent transactions (just like gold mining).
●Primary Utility: Due to its high energy costs, Bitcoin is better suited as a "store of value" rather than a "medium of exchange."
Blockchain Mechanism:
●Miners compete to solve a cryptographic puzzle to package the next block. ●The first miner to solve the puzzle wins and receives a block reward.
●The winner selects transactions for the new block, ensuring they follow network rules.
Tokenomics:
●Attackers need significant computing power, yielding worthless coins if successful.
●Incentivizes participants to mine valuable coins and secure the network instead of attacking it.
Section 2: Ethereum and Smart Contracts
2.1 Ethereum: The World Computer
Ethereum allows executing code against a global state store, enabling various applications such as:
●Tokenization: Creating digital tokens representing assets.
●Automated Token Sales (ICOs): Initial Coin Offerings for fundraising. ●Stablecoins: Cryptocurrencies pegged to stable assets like fiat currencies.
●NFTs: Non-fungible tokens representing unique digital assets. ●Decentralized Exchanges: Platforms for trading digital assets without intermediaries.
●DAOs: Decentralized Autonomous Organizations for governance and decision-making. ●Cross-Chain Bridges: Connecting different blockchain networks.
●Decentralized Identity (DID): Verifiable digital identities.
●High Transaction Fees: Costs associated with executing transactions.
●Limited Storage: Constraints on data storage capacity.
●Slow Transaction Speed: Time taken to process transactions.
●No Private Storage: Lack of privacy for stored data.
●Security Concerns: Vulnerabilities and risks in the network.
Section 3: Advanced Blockchain Platforms
Ethereum 2.0 introduces several improvements:
●Transition from PoW to PoS: Moving from Proof of Work to Proof of Stake for consensus. ●Beacon Chain: New chain for consensus.
●Shard Chains: Parallel chains for data processing.
●Reduced Gas Fees: Lower transaction costs.
●Reduced Energy Consumption: More environmentally friendly.
●Easier Node Operation: Simplified requirements for running nodes.
●Faster Transactions: Improved transaction speeds.
Layer 2 networks enhance scalability by executing transactions off-chain and periodically recording them on the mainnet.
Approaches:
●zk Rollup: Zero-knowledge proofs to verify off-chain transactions. ●Optimistic Rollup: Assumes transactions are valid by default but allows for challenges. 3.3 Alternative L1 Blockchains
Alternative Layer 1 blockchains use different consensus mechanisms and execution engines but face challenges such as:
●Limited Liquidity: Fewer assets available for trading.
●Limited Developer Adoption: Smaller developer communities.
●Not at Web2 Scale: Yet to achieve the scalability of traditional web applications.
Section 4: Integration of Web2 and Web3
Combining Web2 and Web3: Web5 integrates traditional Web2 services with advanced Web3 technologies to create a seamless, decentralized ecosystem.
Key Features:
●Peer-to-Peer Network: Provides services at Web2 scale, such as email, blogging, file sharing, messaging, and e-commerce, but in a decentralized manner.
●Web3 Infrastructure: Leverages blockchain technology for common services like payments, incentives, identities (IDs), and indexing and discovery.
How It Works:
●Decentralized Services: Web5 uses a peer-to-peer network to offer decentralized versions of traditional services.
●Interoperability: Combines the ease and familiarity of Web2 interfaces with the security and decentralization of Web3. ●Enhanced Security and Privacy: Users have greater control over their data, reducing risks associated with centralization.
Examples:
●Decentralized Email: Secure and private email communication without relying on central servers.
●Decentralized Blogging: Content creation and distribution without centralized platforms.
●File Sharing: Peer-to-peer file sharing with enhanced security and privacy.
●Decentralized Messaging: Encrypted messaging services that protect user privacy.
●E-commerce: Decentralized marketplaces and payment systems that eliminate intermediaries and reduce costs.
4.2 Web3 and AI Integration
Challenges with Closed Source AI:
●Censorship and Bias: Controlled and influenced by central authorities.
●Customization Difficulty: Hard to tailor for specific needs.
●High Costs: Expensive to use and maintain.
●Lack of Privacy: Vulnerable to data breaches.
●Limited Agent Capabilities: Restricted functionality.
Opportunities with Decentralized AI:
●Customizable AI Agents: Tailored for various roles (e.g., teaching assistant, customer support).
●Revenue Sharing: Fair distribution among users, developers, node operators, and knowledge creators using smart contracts.
Section 5: GaiaNet Protocol
This chart illustrates the GaiaNet Protocol Network, detailing the interactions between various components:
1.Users: They interact with the system through Frontend Apps, which include UIs, chatbots, and SaaS actions. Users pay for these services.
2.Frontend Apps: These applications discover and pay for API services provided by GaiaNet nodes. 3.GaiaNet Nodes: These nodes provide API services, utilizing compute resources, proprietary knowledge, and fine-tuned LLMs (Large Language Models). Node operators manage these nodes. The nodes are discoverable within the GaiaNet Protocol Network and function similarly to teaching assistants, offering support and information in various domains. They can provide services to other users and applications.
4.GaiaNet Protocol Network: This network handles the registration, staking, and payment processes. It facilitates the discovery and transaction between frontend apps and GaiaNet nodes.
5.Stakers: They stake tokens and participate in the network, earning rewards through revenue sharing.
6.Models and Embeddings:
●Models: Include fine-tuned models with private data, developed by model developers.
●Embeddings: Comprise proprietary knowledge bases created by knowledge authors.
7.Revenue Sharing: Revenue generated from the use of API services is shared among node operators, model developers, and knowledge authors, incentivizing contributions and maintaining the ecosystem.
5.1 Decentralized GenAI Agents Network
Key Components:
●Node Stack: Integrates multimodal LLMs (Large Language Models), RAG (Retrieval-Augmented Generation) workflows, and proprietary knowledge bases.
●Incentives: Earn tokens through node awards, staking, and service payments.
●Security: Uses smart contracts and DAO staking to ensure honesty and reliability.
●Dr. Michael Yuan initiated the GaiaNet node following the quick start instructions from GitHub, then used the node to search for "Where is Paris?" on Gaia, demonstrating the node's capabilities in providing detailed information.
Earn Tokens:
●Node Award: For being online and ready.
●Staking Award: For staking tokens in the network.
●Service Payments: Income from providing services.
Use Tokens:
●Stake to Node Operators: Support network security.
●Pay for Node Services: Access decentralized services.
●Slashing: Penalize dishonest node operators.
Blockchain and AI integration through decentralized networks provide secure, transparent, and efficient solutions for digital transactions and data management. The evolution from Web3 to Web5, combining the strengths of both Web2 and Web3, opens up new possibilities for decentralized applications and incentivized AI agents.
1.Question 1: Why are Large Language Models (LLMs) used in Web2 finance, and what challenges do they face on the blockchain?
Answer: LLMs handle complex NLP tasks in Web2 finance, using abundant computational resources. Their use on the blockchain is limited by high computational demands. However, smaller financial models can efficiently run on off-chain nodes, making them scalable and practical for tasks like reputation management.
2.Question 2: For federated learning in Web3, is running the model or running the network more important?
Federated learning shares data across nodes without centralization. Blockchain ensures data integrity. Establishing a network to connect nodes and mechanisms for staking and payments are essential. Efficient network operation is more crucial for effective data sharing and processing.
3.Question 3: How will AI play a role in Web3 infrastructure?
Web3 and the upcoming Web5 redefine AI infrastructure, instead of AI playing role to impact Web3 infrastructure. Web3 struggles with basic calculations, hindering AI tasks. Web5 improves this by using separate nodes for AI, avoiding blockchain interference. Decentralized AI is preferred for self-governance. Learning AI effectively involves exploring leading projects, not just books.
4.Question 4: Is Web5 going to be more decentralized or more secure?
Web5 blends Web2 and Web3, focusing on scalability over decentralization and security. It addresses blockchain limitations like high costs and scalability by using a hybrid infrastructure, combining centralized and decentralized elements for a more efficient web.