What Is peaq Blockchain? DePIN Layer-1 Explained

# web3# blockchain# devops# tutorial
What Is peaq Blockchain? DePIN Layer-1 ExplainedOnFinality

Learn what peaq blockchain is, how it powers DePINs and the Machine Economy, and how to connect your dApp with RPC endpoints.

Quick recommendation: when to build on peaq

If you are building a DePIN, a machine-related dApp, or an app that needs to tokenize real-world assets like robots or sensors, peaq is worth evaluating. It is a layer-1 blockchain designed specifically for the Machine Economy, and it offers modular functions like Machine IDs and DePIN Data Verification that can accelerate your development. Before you commit, check whether peaq's architecture fits your use case: it is not a general-purpose smart contract platform like Ethereum, but rather a specialized chain with its own SDK (peaqOS) and a focus on machine-to-machine transactions. If you need to interact with peaq from your backend or frontend, you will need a reliable RPC endpoint. OnFinality provides public and dedicated RPC options for peaq, which you can explore on the peaq network page.

What is peaq blockchain?

peaq is a layer-1 blockchain built to power the Machine Economy. It enables robots, vehicles, sensors, and other machines to become economic participants: they can have identities, build reputation, transact, and earn money. peaq is designed for Decentralized Physical Infrastructure Networks (DePINs), which are networks that incentivize communities to build physical infrastructure using tokens. Examples include mobility networks, EV charging, and telecom networks.

peaq provides a set of modular DePIN functions that developers can use as building blocks. These include:

  • Machine IDs: verifiable identities for machines that work across chains.
  • DePIN Data Verification: ensures data from devices is trustworthy.
  • Payments: enables autonomous transactions, including agent-delegated spending.
  • Machine earnings: lets machines sell their spare capacity and earn to their own wallet.

Under the hood, peaq has a two-layer architecture: peaqOS (the operating system developers interact with) and the peaq Trust Layer (the decentralized infrastructure that secures ownership, reputation, and payments). Most teams build on peaqOS and never go deeper.

How does peaq work?

peaq is built on Substrate, the same framework that powers Polkadot and Kusama. This gives it shared security and interoperability with the Polkadot ecosystem. peaq uses a Nominated Proof-of-Stake (NPoS) consensus mechanism, which is energy-efficient and allows token holders to nominate validators.

The peaq chain is the home chain for the Trust Layer. State mirrors out to satellite chains so machines can transact wherever their counterparties are. peaqOS runs on the Trust Layer and abstracts it, providing a unified SDK for developers.

What can you build on peaq?

peaq is designed for real-world Web3 applications. Here are some examples:

  • DePINs: Decentralized networks that incentivize physical infrastructure, such as noise pollution mapping (Silencio) or weather data collection (SkyX).
  • Machine RWA: Tokenizing real-world assets like robots, vehicles, and storage devices, making them investable.
  • Autonomous agents: AI agents that need to transact on behalf of machines.
  • Machine-to-machine payments: Enabling machines to pay each other for services, such as a robot paying for charging.

peaq's ecosystem includes projects like Teneo (social data collection), DeNet (storage network), and XMAQUINA (humanoid robotics infrastructure).

peaq blockchain vs. other layer-1s

When comparing peaq to general-purpose layer-1s like Ethereum or Solana, consider the following:

Aspect peaq General-purpose L1s (e.g., Ethereum)
Focus Machine Economy and DePINs General smart contracts
SDK peaqOS with modular DePIN functions General-purpose SDKs (ethers, viem)
Identity Built-in Machine IDs Requires custom implementation
Data verification Built-in DePIN Data Verification Requires oracles or custom logic
Interoperability Polkadot ecosystem Varies by chain
Transaction fees Designed to be low and fast Varies

If your project is a DePIN or involves machines, peaq's built-in functions can save you significant development time. If you are building a typical DeFi app, a general-purpose chain might be more suitable.

How to connect to peaq: RPC endpoints

To interact with peaq from your application, you need an RPC endpoint. An RPC (Remote Procedure Call) endpoint is the URL your app uses to send requests to the blockchain. OnFinality provides both public and dedicated RPC endpoints for peaq.

Public endpoint

OnFinality offers a public RPC endpoint for peaq. You can find the exact URL on the peaq network page. The public endpoint is suitable for development and low-traffic applications, but for production, you should consider a dedicated node.

Dedicated nodes

For production applications, OnFinality offers dedicated nodes that provide higher rate limits, better reliability, and more control. You can learn more about dedicated nodes on the dedicated node page.

Example: connecting with ethers.js

Here is an example of how to connect to peaq using ethers.js:

const { ethers } = require("ethers");

// Replace with the actual RPC URL from OnFinality
const RPC_URL = "https://rpc.peaq.network";

const provider = new ethers.JsonRpcProvider(RPC_URL);

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block number:", blockNumber);
}

getBlockNumber();
Enter fullscreen mode Exit fullscreen mode

Note: The above URL is an example; use the official endpoint from the peaq network page.

Setting up your wallet for peaq

To use peaq with a wallet like MetaMask, you need to add the network manually. Here are the typical settings:

  • Network Name: peaq
  • RPC URL: (use the OnFinality endpoint)
  • Chain ID: 3338 (mainnet)
  • Currency Symbol: PEAQ
  • Block Explorer URL: https://peaq.subscan.io

For testnet (peaq agung), the chain ID is different. Check the peaq network page for the latest details.

Common pitfalls and troubleshooting

When building on peaq, you might encounter these issues:

  • Incorrect chain ID: Make sure you use the correct chain ID for the network you are targeting (mainnet vs. testnet).
  • RPC rate limits: Public endpoints have rate limits. If you hit them, consider upgrading to a dedicated node.
  • Transaction failures: Ensure you have enough PEAQ tokens for gas fees.
  • WebSocket support: If you need real-time updates, use a WebSocket endpoint. OnFinality supports WebSocket for peaq.

Key Takeaways

  • peaq is a layer-1 blockchain designed for the Machine Economy and DePINs.
  • It offers modular functions like Machine IDs and DePIN Data Verification.
  • peaq is built on Substrate and uses NPoS consensus.
  • To build on peaq, you need a reliable RPC endpoint; OnFinality provides public and dedicated options.
  • Always use the correct chain ID and network settings to avoid errors.

Frequently Asked Questions

What is peaq used for?

peaq is used to build decentralized applications that involve machines, robots, and physical infrastructure. It provides identity, reputation, payments, and machine-earning functions to enable the Machine Economy.

Is peaq a DePIN?

peaq itself is not a DePIN; it is a layer-1 blockchain that powers DePINs. DePINs are networks that incentivize communities to build physical infrastructure, and peaq provides the underlying infrastructure for them.

How do I get PEAQ tokens?

PEAQ tokens can be obtained through exchanges or by participating in the network as a validator or nominator. You can also earn them by contributing to DePINs built on peaq.

Can I use peaq with Ethereum tools?

Yes, peaq is EVM-compatible, so you can use tools like ethers.js, viem, and MetaMask. However, peaq also has its own SDK (peaqOS) for more advanced machine-specific features.

Where can I find peaq RPC endpoints?

OnFinality provides public and dedicated RPC endpoints for peaq. Visit the peaq network page for the latest endpoints and connection details.

For more information about RPC providers and how to choose one, see our guide on choosing an RPC provider. You can also explore all supported networks on our networks page and check RPC pricing for cost details.

Related resources

Originally published at OnFinality.