zerø

Docs

NEAR Expert Mode

Deep technical knowledge about NEAR Protocol powered by a specialized AI knowledge base. Get expert-level answers about protocol architecture, smart contract development, and ecosystem dynamics.

What is NEAR Expert Mode?

NEAR Expert Mode is a specialized AI system trained on comprehensive NEAR Protocol documentation, technical specifications, developer resources, and ecosystem knowledge. It provides authoritative answers to both beginner and advanced questions about NEAR.

Knowledge Base Architecture: Expert Mode uses retrieval-augmented generation (RAG) to fetch relevant documentation and combine it with AI language understanding for accurate, contextual answers.

What NEAR Expert Mode Knows

Protocol Architecture

  • Nightshade sharding mechanism and how it scales throughput
  • Proof-of-Stake consensus and validator economics
  • Account model vs Ethereum's address model
  • Gas mechanics and storage staking
  • Cross-shard communication and receipts
  • Protocol upgrades and governance

Smart Contract Development

  • Rust and JavaScript/TypeScript SDK patterns
  • near-sdk-rs best practices and common patterns
  • Cross-contract calls and callbacks
  • Storage collections (Vector, Map, UnorderedMap, Tree, etc.)
  • Testing strategies with workspaces and simulation testing
  • Security considerations and common vulnerabilities
  • Gas optimization techniques

Account & Access Keys

  • Full access keys vs function call keys
  • Account creation and sub-accounts
  • Implicit accounts (64-char hex addresses)
  • Access key allowances and restrictions
  • Multisig and account recovery patterns

Token Standards (NEPs)

  • NEP-141: Fungible Token standard
  • NEP-148: Fungible Token Metadata
  • NEP-171: Non-Fungible Token standard
  • NEP-178: NFT Approval Management
  • NEP-181: NFT Enumeration
  • NEP-297: Events standard
  • And other NEAR Enhancement Proposals

Developer Tooling

  • near-cli and near-cli-rs usage
  • cargo-near for building and deploying contracts
  • NEAR Workspaces for testing
  • NEAR Explorer and blockchain data access
  • RPC API endpoints and methods

Ecosystem Protocols

  • Ref Finance (DEX)
  • Aurora (EVM compatibility layer)
  • Rainbow Bridge (Ethereum bridge)
  • NEAR Name Service
  • Paras (NFT marketplace)
  • And major NEAR DeFi and NFT protocols

Example Queries for Expert Mode

Protocol Questions

text
How does NEAR's sharding work?
Explain Nightshade consensus
What's the difference between NEAR and Ethereum's account model?
How does cross-shard communication work in NEAR?
What are the storage staking requirements?

Smart Contract Development

text
How do I implement a cross-contract call in NEAR?
What's the best way to store large collections in NEAR contracts?
Show me a fungible token implementation following NEP-141
How do I test NEAR contracts with workspaces?
What are common security vulnerabilities in NEAR contracts?

Access Keys & Accounts

text
What's the difference between full access and function call keys?
How do I create a sub-account?
Explain NEAR's account naming system
How do access key allowances work?
Can I implement multisig on NEAR?

Gas & Economics

text
How much does it cost to deploy a contract on NEAR?
Explain NEAR's gas mechanics
How do I optimize gas usage in my contract?
What's the relationship between gas and storage?
How does NEAR handle refunds for unused gas?

Token Standards

text
Show me how to implement NEP-141 fungible tokens
What's the difference between NEP-141 and NEP-148?
How do NFTs work on NEAR?
Explain the NEP-297 events standard
How do I add metadata to my tokens?
Ask for Examples: Request code examples and implementations. Expert Mode can provide contract snippets and usage patterns.

Technical Depth

NEAR Expert Mode can handle questions at multiple complexity levels:

Beginner Questions

text
What is NEAR Protocol?
How do I get started with NEAR development?
What programming languages can I use on NEAR?

Intermediate Questions

text
How do I handle errors in cross-contract calls?
What's the best way to structure my contract storage?
How do I implement access control in my contract?

Advanced Questions

text
Explain how Nightshade handles state transitions across shards
What are the tradeoffs between different storage collection types?
How can I optimize my contract to minimize receipt overhead?
What's the relationship between chunk producers and validators?

Knowledge Base Sources

NEAR Expert Mode's knowledge comes from:

  • Official NEAR Protocol documentation (docs.near.org)
  • NEAR Enhancement Proposals (NEPs)
  • near-sdk-rs and near-sdk-js documentation
  • NEAR Nomicon (protocol specification)
  • Community wiki and developer guides
  • Example contracts and real-world implementations
Always Up-to-Date: A webcrawler crawls official NEAR documentation every 24 hours to keep the knowledge base current with new features, protocol upgrades, and best practices.

Combining Expert Mode with Other Features

With Blockchain Data

Ask Expert Mode to explain blockchain data:

text
Explain this transaction: [tx-hash]
What's happening in this contract call?
Analyze alice.near's transaction history and explain the patterns

With Code Review

text
Review this NEAR contract and suggest improvements:
[paste contract code]

Is this cross-contract call pattern correct?
[paste code snippet]

With Debugging

text
Why is my contract running out of gas?
I'm getting a "Cannot deserialize" error, what's wrong?
My cross-contract call isn't returning the expected value

Expert Mode can help diagnose common issues and suggest fixes based on NEAR development patterns.

Limitations

While NEAR Expert Mode is comprehensive, it has some limitations:

  • Real-Time Changes: Very recent protocol changes may not yet be in the knowledge base
  • Non-NEAR Topics: Expert Mode is specialized for NEAR; general blockchain questions are better suited for the standard AI
  • Project-Specific Code: Can provide patterns and examples but won't have access to your private codebase
  • No Code Execution: Can explain and suggest code but doesn't execute or test it
Verify Critical Code: Always test contract code in a development environment before deploying to mainnet, even if suggested by Expert Mode.

Use Cases

Learning NEAR Development

Use Expert Mode as an interactive tutorial:

text
I'm new to NEAR. Walk me through creating my first smart contract
What's the simplest way to create a fungible token?
Explain the NEAR development workflow step by step

Debugging and Troubleshooting

Get help understanding errors and issues:

text
Why am I getting "account has not been found" error?
My contract deployment failed with "insufficient balance"
How do I fix cross-contract call panics?

Architecture Planning

Discuss high-level contract design:

text
What's the best way to architect a DAO on NEAR?
How should I structure a multi-token staking contract?
Should I use multiple contracts or one monolithic contract?

Migration from Other Chains

Understand differences when coming from Ethereum or Solana:

text
I'm coming from Ethereum. What's different in NEAR?
How do I convert my Solidity contract to NEAR Rust?
What are the main differences between NEAR and Solana?

Expert Mode vs General AI

AspectNEAR Expert ModeGeneral AI
NEAR Protocol knowledgeSpecialized & deepGeneral knowledge
Code examplesNEAR-specific patternsGeneric examples
Documentation referencesDirect accessMay be outdated
Non-NEAR questionsLimitedComprehensive
Latest NEAR featuresUp-to-dateMay lag

NEAR Expert Mode automatically activates when you ask NEAR-specific questions. You don't need to manually enable it—Zero's Intents Classifier detects NEAR knowledge queries and routes them to Expert Mode automatically. For general blockchain concepts or non-NEAR topics, the general AI is used.

Privacy in Expert Mode

Your questions to NEAR Expert Mode are private:

  • Queries aren't logged or stored on servers
  • Conversation context exists only in your browser session
  • No tracking of what you're building or researching
  • Code snippets you share aren't retained

When you destroy your session, all Expert Mode conversations are permanently deleted.

Credit Usage

NEAR Expert Mode queries consume credits based on:

  • Complexity of the question
  • Amount of documentation retrieved
  • Length of the response generated

Simple questions use minimal credits. Complex architectural discussions or detailed code reviews use more.

Best Practices

  • Be Specific: "How do I implement cross-contract calls?" is better than "Tell me about contracts"
  • Provide Context: Mention if you're a beginner or advanced developer
  • Ask Follow-Ups: Dig deeper into topics by asking clarifying questions
  • Share Code When Relevant: Paste snippets for review or debugging help
  • Verify Examples: Test code examples before using in production
Beta Feature: NEAR Expert Mode is continuously improving. Feedback helps us enhance the knowledge base and response quality.